Skip to content

blog: Go Auto-instrumentation - Choosing between OBI and otelc #10951

Description

@kakkoyun

Blog Post Title

eBPF or Compile-Time? A Guide to Choosing Your OpenTelemetry Auto-Instrumentation

Blog Post Outline

OpenTelemetry now hosts two zero-code ways to instrument an application without editing its source: OBI (OpenTelemetry eBPF Instrumentation), which attaches at runtime using eBPF and works across languages, and otelc (OpenTelemetry Go Compile-Time Instrumentation), which rewrites Go code at build time. People keep asking which one they should reach for. This post answers that by explaining how each works and where each fits, so readers can make the call for their own environment.

It is a decision guide, not a ranking. Both projects are part of OpenTelemetry, and in many setups they solve different problems or work well together.

Outline:

  1. Why zero-code instrumentation exists, and the two mental models: attach at runtime vs. weave at build time.
  2. OBI in brief — eBPF, how it hooks in, language coverage, what it needs to run (privileges, kernel), what telemetry it produces.
  3. otelc in brief — compile-time rewriting for Go, how it hooks in, what changes in the build, what telemetry it produces.
  4. Trade-offs side by side: deployment model, operational requirements, signal fidelity and depth, language scope, maturity.
  5. When to use which — concrete scenarios (mixed-language fleet, no source access, Kubernetes DaemonSet vs. a Go service you build yourself, tightest span fidelity, etc.).
  6. Using them together, and how each fits the wider OpenTelemetry pipeline.
  7. Where each project is headed and how to get involved.

Technologies Used

  • OpenTelemetry eBPF Instrumentation (OBI)
  • OpenTelemetry Go Compile-Time Instrumentation (otelc)

All CNCF / open source.

Related Special Interest Groups (SIGs)

  • OpenTelemetry eBPF Instrumentation SIG (co-sponsor)
  • OpenTelemetry Go Compile-Time Instrumentation SIG (co-sponsor)
  • OpenTelemetry Go SIG.

Sponsoring SIG

eBPF Instrumentation SIG, Go Compile-Time Instrumentation SIG

Sponsor Name

@MrAlias, @mariomac, @txabman42, @jpkrohling

Additional Information

Co-authored effort across two SIGs, written as neutral education rather than a comparison that picks a winner. Non-commercial, no product pitch; every section gives both approaches equal treatment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions