Skip to content

open-telemetry/opentelemetry-go-compile-instrumentation

OpenTelemetry Logo
Go License Status Slack

Important

This is a work in progress and not ready for production use. 🚨

Overview

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:

  • Zero Runtime Overhead - Instrumentation is baked into your binary at compile time
  • Zero Code Changes - Automatically instrument entire applications and dependencies
  • Third-Party Library Support - Instrument libraries you don't control
  • Complete Decoupling - Keep your codebase free from instrumentation concerns
  • Flexible Deployment - Integrate at development time or in your CI/CD pipeline

Quick Start

1. Build the Tool

git clone https://github.com/open-telemetry/opentelemetry-go-compile-instrumentation.git
cd opentelemetry-go-compile-instrumentation
make build

The otel binary will be built in the root directory.

2. Try the Demo

Just prefix the original go build command with otel.

cd demo/basic
../../otel go build
./basic
[... output ...]

3. Run the Tests

make test

Community

Documentation

Video Talks

Get Help

Contributing

We welcome contributions! See our contributing guide and development docs.

This project follows the OpenTelemetry Code of Conduct.

About

OpenTelemetry Go Compile Instrumentation

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 15