For the complete documentation index, see llms.txt. Markdown versions are available by appending .md to documentation URLs.

Go OpenTelemetry Instrumentation: Compare the Options

SigNoz Cloud - This page applies to SigNoz Cloud editions.
Self-Host - This page applies to self-hosted SigNoz editions.

Go has three ways to send traces to SigNoz. You can add the OpenTelemetry SDK to your code, you can build the instrumentation into your binary, or you can attach an eBPF agent to the running process. This page compares them so you can pick one and start.

The OpenTelemetry SDK attaches to source code, otelc attaches during go build, and the eBPF agent attaches to the running process
The three options differ in where they attach: your code, your build, or your running process

Compare the options

OpenTelemetry SDKCompile-timeeBPF
How it worksYou initialize the SDK and wrap libraries in your codeotelc injects the instrumentation during go buildA separate agent attaches probes to the running process
Code changeYesNoNo
RebuildYesYesNo
Elevated privilegesNoNoYes, root and a privileged container
Operating systemAnyAnyLinux only
Library coverageEvery library with a contrib package13 common libraries4 libraries
Custom spansYesThrough the OpenTelemetry APIThrough the global tracer provider
SignalsTraces, metrics, and logsTraces and Go runtime metricsTraces
Project statusStableStable since v1.0.0Work in progress

Choose your approach

Start with the OpenTelemetry SDK when you own the code and want full control. You choose which libraries to instrument, you add spans around your own business logic, and you send all three signals. This path costs you a few lines of setup code.

Reach for compile-time instrumentation when you want traces without touching the source. You add otelc to the build command, and the tool instruments the libraries it recognizes. Use it when a team owns many services and you want the same coverage in all of them.

Choose eBPF instrumentation only when you cannot rebuild the binary. A vendor binary or a frozen release artifact fits this case. The agent needs a privileged container, it runs on Linux only, and the OpenTelemetry project still labels it as work in progress.

Start here

Combine the approaches

Both zero-code options carry the spans you write yourself.

  • With compile-time instrumentation, the OpenTelemetry API works as usual. Create spans with otel.Tracer(...) and they join the injected traces. See Manual instrumentation in Go.
  • With the eBPF agent, set OTEL_GO_AUTO_GLOBAL=true. The agent then exports the spans your application sends to the OpenTelemetry global tracer provider.

Next steps

Get Help

If you need help with the steps in this topic, please reach out to us on SigNoz Community Slack. If you are a SigNoz Cloud user, please use in product chat support located at the bottom right corner of your SigNoz instance or contact us at cloud-support@signoz.io.

Is this page helpful

Last updatedSeptember 12, 2026

Edit on GitHub

Is this page helpful

On this page

Last updatedSeptember 12, 2026

Edit on GitHub