https://opentelemetry.io/blog/2025/go-compile-time-instrumentation/ OpenTelemetry * Docs * Ecosystem * Status * Community * Blog * English + Espanol + Francais + Ri Ben Yu (Japanese) + Portugues + Zhong Wen (Chinese) * + Light + Dark + Auto [ ] [ ] English * Espanol * Francais * Ri Ben Yu (Japanese) * Portugues * Zhong Wen (Chinese) * Blog + [*] 2025 o [*] Go Compile-Time Instrumentation o [ ] Go 2025 Goals + [ ] 2024 o [ ] Fuzzing Audit Results o [ ] Humans of OTel NA 2024 o [ ] OTel-docs Survey o [ ] Year in review o [ ] OTel-compliant Java logs from files o [ ] OTel for GenAI o [ ] OpenTelemetry Community Awards Winners o [ ] KubeCon NA '24 o [ ] OpenTelemetry Community Awards o [ ] Profiling state o [ ] 2024 GC Election Results o [ ] 2024 GC Candidates o [ ] Spring Starter stable o [ ] OpenTelemetry Arrow in Production o [ ] Prometheus and OpenTelemetry o [ ] 2024 GC Election o [ ] Planned Migration for go.opentelemetry.io o [ ] Multilingual website o [ ] Behind the scenes of the OpenTelemetry Governance Committee o [ ] Prometheus Compatibility Survey o [ ] Security Audit Results o [ ] KubeCon China 2024 o [ ] A new default bind address for the Collector o [ ] OpenTelemetry Getting Started Survey o [ ] Humans of OTel EU 2024 o [ ] Elastic Contributes Profiling Agent o [ ] New OTel features in Envoy and Istio o [ ] Collector vulnerability CVE-2024-36129 o [ ] LLM Observability o [ ] Go Contrib modules ownership o [ ] Java Metric Systems Compared o [ ] Collector container log parser o [ ] OTel Operator Q&A o [ ] OpenTelemetry Collector Survey o [ ] Collector Roadmap o [ ] Understanding OTel Errors o [ ] Collectors at scale with Ansible o [ ] Profiling support o [ ] Getting started with otelsql o [ ] OTel Collector Antipatterns o [ ] KubeCon EU '24 o [ ] Skyscanner using OTel Demo o [ ] Outreachy Internship + [ ] 2023 o [ ] Humans of OTel o [ ] Observe Spring Native o [ ] OTel in Focus Wrap-Up o [ ] Any Metric Receiver o [ ] Performance benchmarks o [ ] Python Logs Collection o [ ] OTel integration for Otterize network mapper o [ ] OpenTelemetry Protocol with Apache Arrow o [ ] Contribfest at KubeCon NA o [ ] OpenTelemetry in Cloud Foundry o [ ] Demo 1.6 Released o [ ] Tyk API Gateway's Native OpenTelemetry Integration o [ ] HTTP semconv are stable o [ ] Integrations Welcome! o [ ] OTel in Focus 2023/10 o [ ] 2023 GC Election Results o [ ] OpAMP Status o [ ] The Future of Observability Panel o [ ] 2023 GC Candidates o [ ] Synthetic HTTP testing o [ ] Go Metric SDK is Stable o [ ] KubeCon NA '23 o [ ] OTel in Focus 2023/09 o [ ] 2023 GC Election o [ ] Contributing to OTel o [ ] .NET Automatic Instrumentation v1.0.0 o [ ] Jaeger Collector Exporter Migration o [ ] PHP Release Candidate o [ ] OTel in Focus 2023/08 o [ ] OTel in Focus 2023/07 o [ ] Testing the OTel Demo o [ ] End-User Q&A: Migrating to OTel at Lightstep o [ ] OTel in Focus 2023/06 o [ ] End-User Q&A: OTel at Farfetch o [ ] K8s Runtime Observability o [ ] OTel in Focus 2023/05 o [ ] OTel Lambda Updates o [ ] Exponential Histograms o [ ] Histograms vs Summaries o [ ] End-User Discussions April 2023 o [ ] Why Histograms? o [ ] OTel in Focus 2023/04 o [ ] Sunsetting OpenCensus o [ ] OTel Demo Updates o [ ] ECS and OTel SemConv Convergence o [ ] KubeCon EU '23 o [ ] OTel in Focus 2023/03 o [ ] End-User Discussions Mar 2023 o [ ] PHP Auto-Instrumentation o [ ] End-User Q&A: OTel at Uplight o [ ] End-User Discussions Feb 2023 o [ ] OTel in Focus 2023/02 o [ ] New APAC Collector-SIG meetings o [ ] End-User Q&A: OTel with GraphQL o [ ] Submitting a CFP o [ ] Outreachy Call for participation '23 o [ ] OTel in Focus 2023/01 o [ ] HTTP semantic conventions o [ ] PHP Beta Release o [ ] End-User Discussions Jan 2023 o [ ] JMX Metric Insight + [ ] 2022 o [ ] eBay OpenTelemetry o [ ] OTel Demo App on Nomad o [ ] APAC End User Discussion Group o [ ] Front-end Overhaul Demo o [ ] Jaeger OTLP support o [ ] Project Update o [ ] Demo GA Release o [ ] 22 GC Election Results o [ ] OpAMP service usage o [ ] Collector builder with GCP o [ ] 2022 GC Candidates o [ ] Kubecon NA '22 o [ ] OTel Unplugged '22 o [ ] Community Manager o [ ] Tail Sampling o [ ] Debug OTel with OTel o [ ] 2022 GC Election o [ ] Exposing a Collector o [ ] Instrumenting Apache Kafka clients o [ ] Exponential Histograms o [ ] Go App Instrumentation o [ ] Instrument Nginx o [ ] OTel in Practice o [ ] .NET Auto-instrumentation Metrics o [ ] End User Resources o [ ] Kubernetes metadata o [ ] OpenTelemetry Community Demo o [ ] Instrument Apache Http Server o [ ] Metrics RCs o [ ] .NET Auto-instrumentation Beta o [ ] Tracing in Knative o [ ] Apache APISIX-Opentelemetry Integration o [ ] OpenTelemetry Tuesdays, Signing Off! o [ ] TroublesShooting Node.js Tracing Issues o [ ] Welcome o [ ] Erlang/Elixir, JS, and Ruby 1.0 + [ ] 2021 o [ ] Auto-instrumentation in Kubernetes o [ ] 2021 Governance Committee o [ ] C++ 1.0 o [ ] Trace-Based Testing with Malabi o [ ] 2021 GC election o [ ] Collector GA release o [ ] Swift 1.0 Beta o [ ] Python 1.0 o [ ] Women's day 2021 + [ ] 2019 o [ ] Governance Committee Explained View page source Edit this page Create child page Create documentation issue * Industry collaboration at the heart of open standards 1. Blog 2. 2025 3. Go Compile-Time Instrumentation Alibaba, Datadog, and Quesma Join Forces on Go Compile-Time Instrumentation By OpenTelemetry Governance Committee | Friday, January 24, 2025 Standards are only useful if they're widely adopted, and adoption is only effective if the available tooling facilitates it. I imagine SI units would not have been too popular when they were introduced if you had to build your own scales to weigh things in Kilograms! If you use OpenTelemetry in Go, you'll be familiar with the challenges of configuring instrumentation libraries to automatically generate telemetry from well-known open source components. Due to the compiled nature of the language, you currently have two options^1: * Use a separate binary that analyzes your Go process and attaches eBPF programs to hooks in your application -- see opentelemetry-go-instrumentation. * Manually configure instrumentation libraries in your code, for example see Instrument the HTTP server. For different reasons, it is possible that none of those options is viable, or optimal, in your environment. However, things are about to change! Industry collaboration at the heart of open standards Over the past few months, OpenTelemetry has received not one, but two donation proposals from industry leaders to provide a solution to the problem described above, and enable the use of zero-code, vendor-neutral, compile-time instrumentation in Go applications. These are: * Alibaba's donation proposal of opentelemetry-go-auto-instrumentation * Datadog's donation proposal of Orchestrion We are very grateful to Alibaba and Datadog for these donation proposals. This continues to demonstrate the convergence of the wider industry towards the standards defined by OpenTelemetry. Compile-time instrumentation leverages the standard Go toolchain's -toolexec mechanism to re-write Go source code before it is passed to the Go compiler, adding instrumentation in all relevant places (including dependencies as well as the Go standard library). The most exciting part of this announcement is that it won't be Alibaba's or Datadog's solution that "wins". In the true spirit of open source collaboration, these two organizations have decided to join forces and commit the necessary resources to bootstrap a new Go Compile-Time Instrumentation SIG, with the intention of providing a unified, vendor-neutral approach that picks the best aspects of each solution and benefits the community as a whole. They will be supported with further contributions from Quesma, bringing in experience on instrgen, OpenTelemetry's initial experimental approach to provide Go compile-time instrumentation based on -toolexec and which will be superseded as part of the initial efforts of this SIG. In the longer term, this SIG will focus on: * Developing compiler plugins or enhancements that inject instrumentation code automatically, ensuring minimal runtime performance overhead and compatibility with existing Go projects. * Providing standardized instrumentation patterns aligned with OpenTelemetry and other monitoring frameworks. If you are interested in contributing, or you simply want to find out more, here's some useful information about the SIG: * GitHub repository: opentelemetry-go-compile-instrumentation * CNCF Slack: #otel-go-compt-instr-sig * Meetings: Every other Thursday UTC: 08:00 - 09:00 (subscribe to this Google Group for calendar invites, or read more about our community calendar) We look forward to seeing this new SIG in operation, and cannot wait for the fruits of this awesome collaboration! --------------------------------------------------------------------- 1. Unless you want to "build your own scales", or the OTel equivalent, which is manually instrumenting third-party libraries. -[?] * -Previous * Next- Last modified January 24, 2025: Add blog post on Go Compile-Time Instrumentation SIG (#5956) (42cacdab) * * * * * * * * * * * * * * (c) 2019-2025 OpenTelemetry Authors | Docs CC BY 4.0All Rights Reserved