This project provides a tool to automatically instrument Go applications with OpenTelemetry at compile-time. It modifies the Go build process to inject OpenTelemetry code into the application without requiring manual changes to the source code.
Highlights:
git clone https://github.com/open-telemetry/opentelemetry-go-compile-instrumentation.git
cd opentelemetry-go-compile-instrumentation
make build
The otelc binary will be built in the root directory.
Just prefix the original go build command with otelc.
cd demo/app/basic
../../../otelc go build
./basic
[... output ...]
make test
otel.instrumentation.goWe welcome contributions! See our contributing guide and development docs.
This project follows the OpenTelemetry Code of Conduct. Please also review our AI usage policy if you use AI tools in your workflow.
Here is a list of community roles with current and previous members:
For more information about the maintainer role, see the community repository.
For more information about the approver role, see the community repository.
For more information about the emeritus role, see the community repository.
No additional overhead from the instrumentation tool itself, on top of the overhead incurred by the injected OpenTelemetry SDK code. ↩
Overall
Maintained
Code review
Contributors
Latest release
Releases this year
(top 24 of 33)
4,241 followers · starred Oct 2025
1,437 followers · starred Oct 2025
412 followers · starred Oct 2025
5,122 followers · starred Aug 2026
This project provides a tool to automatically instrument Go applications with OpenTelemetry at compile-time. It modifies the Go build process to inject OpenTelemetry code into the application without requiring manual changes to the source code.
Highlights:
git clone https://github.com/open-telemetry/opentelemetry-go-compile-instrumentation.git
cd opentelemetry-go-compile-instrumentation
make build
The otelc binary will be built in the root directory.
Just prefix the original go build command with otelc.
cd demo/app/basic
../../../otelc go build
./basic
[... output ...]
make test
otel.instrumentation.goWe welcome contributions! See our contributing guide and development docs.
This project follows the OpenTelemetry Code of Conduct. Please also review our AI usage policy if you use AI tools in your workflow.
Here is a list of community roles with current and previous members:
For more information about the maintainer role, see the community repository.
For more information about the approver role, see the community repository.
For more information about the emeritus role, see the community repository.
No additional overhead from the instrumentation tool itself, on top of the overhead incurred by the injected OpenTelemetry SDK code. ↩
Overall
Maintained
Code review
Contributors
Latest release
Releases this year
(top 24 of 33)
4,241 followers · starred Oct 2025
1,437 followers · starred Oct 2025
412 followers · starred Oct 2025
5,122 followers · starred Aug 2026