Hello Team! Iam trying to configure Go application...
# support
a
Hello Team! Iam trying to configure Go application to send traces to SigNoz. Signoz deployed on k8s and Go app is also in k8s at another namespace. So I use this example Go app for testing https://github.com/SigNoz/sample-golang-app/tree/master Contenerized that app then I deployed in k8s and started Go app with command:
CMD SERVICE_NAME=goApp INSECURE_MODE=true OTEL_EXPORTER_OTLP_ENDPOINT=signoz-otel-collector.apm-signoz.svc.cluster.local:4317 go run main.go
. But I can't see traces and metrics in Services section in UI of Signoz. Nothing. I used troublshoot image from that namespace and it's OK
troubleshoot/main.go:46	Successfully sent sample data to signoz
Java apps working very well. Go app not. Please any ideas ?
p
Can you try moving the environments outside of the Dockerfile? Set these in the go application pod environment instead:
Copy code
SERVICE_NAME=goApp
INSECURE_MODE=true
OTEL_EXPORTER_OTLP_ENDPOINT=signoz-otel-collector.apm-signoz.svc.cluster.local:4317
Also, use the following instead in
CMD
section:
Copy code
CMD ["go", "run", "main.go"]
^ Although, I would recommend compiling the go code into a binary and using it instead of this.