Replies: 1 comment
|
Hi! There are two separate things I would change here. First, receivers:
otlp:
protocols:
http:
endpoint: 0.0.0.0:4318But from your Go app, if the Collector is running as a sidecar in the same Kubernetes pod, point the exporter to Second, this error means the Go exporter is using HTTPS while the Collector receiver is plain HTTP: So your Go exporter should be configured like this: exp, err := otlptracehttp.New(
context.Background(),
otlptracehttp.WithEndpoint("localhost:4318"),
otlptracehttp.WithInsecure(),
)Or, if your OpenTelemetry Go version supports it, use the URL form explicitly: exp, err := otlptracehttp.New(
context.Background(),
otlptracehttp.WithEndpointURL("http://localhost:4318/v1/traces"),
)For verifying the sidecar before adding Tempo, I would replace the exporters:
otlp:
endpoint: localhost:4317
tls:
insecure: trueThat points the Collector exporter back to receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
exporters:
debug:
verbosity: detailed
service:
pipelines:
traces:
receivers: [otlp]
exporters: [debug]Then trigger one request in your app and check the Collector sidecar logs: kubectl logs <pod-name> -c otel-collectorIf the app is sending traces correctly, you should see trace/span output from the debug exporter. After that works, replace the exporters:
otlp:
endpoint: tempo.monitoring.svc.cluster.local:4317
tls:
insecure: trueSo the short version is: use |
Uh oh!
There was an error while loading. Please reload this page.
Hey all!
I was using a simple app to test and get a feel of OpenTelemetry - and I was running into an issue with the HTTP Receiver. I wanted to use an HTTP Receiver to confirm whether my Sidecar deployment is correct - but I see this error
2023/09/17 04:51:18 traces export: Post "https://0.0.0.0:4318/v1/traces": http: server gave HTTP response to HTTPS clientI have a Go application and using this - (tried both WithInsecure() and without it
When the insecure() is not there - I get above error log
2023/09/17 04:51:18 traces export: Post "https://0.0.0.0:4318/v1/traces": http: server gave HTTP response to HTTPS clientWhen I add it - there are no logs at all.
If I just have a collector setup and an app in a sidecar , is there a way to confirm whether my image is sending traces to the colleector?
I do not see any logs in the otel-collector or my go app container for successful data being sent to the collector.
I tried adding insecure , insecureSkip , etc. to my collector yaml - but have not found the correct setting yet.
Would appreciate any pointers or recommendations - I am basically trying to setup something minimal where I can have collectors running as sidecars with my app deployments - send that data to a tempo backend , and visualize the traces - and approaching it piece by piece. Thank you!
This is my
otel-collector-config.yaml. (have not configured the backend yet for tempo)This is my deployment with the sidecar
go-otel-dep.yamlAll reactions