Troubleshooting
Diagnose issues with Go compile-time instrumentation.
You are viewing the English version of this page because it has not yet been fully translated. Interested in helping out? See Contributing.
Enable debug logging
To see what the tool does during a build, enable debug mode:
otelc --debug go build -o myapp .
Debug output, including a debug.log file, is written to the tool’s working
directory (by default a .otelc-build directory in your module). Inspect it to
see which rules matched and what instrumentation was injected.
No telemetry is produced
- Confirm the binary was built through
otelcand not plaingo build. - Confirm your application actually uses a supported library, and that the version you depend on is within the supported range declared by the instrumentation rules.
- Check the exporter configuration: with
OTEL_EXPORTER_OTLP_ENDPOINTunset or wrong, telemetry has nowhere to go. SetOTEL_LOG_LEVEL=debugto surface export errors. - Check that the instrumentation wasn’t disabled through
OTEL_GO_ENABLED_INSTRUMENTATIONSorOTEL_GO_DISABLED_INSTRUMENTATIONS.
Clean up build artifacts
If a build behaves unexpectedly, remove the artifacts created by previous setup and build phases and rebuild from a clean state:
otelc cleanup
Getting help
- GitHub issues for bugs
- GitHub discussions for questions
- The #otel-go-compt-instr-sig channel on the CNCF Slack
Feedback
Was this page helpful?
Thank you. Your feedback is appreciated!
Please let us know how we can improve this page. Your feedback is appreciated!