Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blog post on Go Compile-Time Instrumentation SIG #5956

Merged
merged 19 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions content/en/blog/2025/go-compile-time-instrumentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
title:
Alibaba, Datadog and Quesma Join Forces on Go Compile-Time Instrumentation
chalin marked this conversation as resolved.
Show resolved Hide resolved
danielgblanco marked this conversation as resolved.
Show resolved Hide resolved
linkTitle: Go Compile-Time Instrumentation
date: 2025-01-17
danielgblanco marked this conversation as resolved.
Show resolved Hide resolved
svrnm marked this conversation as resolved.
Show resolved Hide resolved
svrnm marked this conversation as resolved.
Show resolved Hide resolved
author: OpenTelemetry Governance Committee
danielgblanco marked this conversation as resolved.
Show resolved Hide resolved
issue: https://github.com/open-telemetry/community/issues/2509
sig: Governance Committee
cSpell:ignore: instrgen quesma toolexec
---

Standards are only useful if they're widely adopted, and adoption is only
effective if the available tooling facilitates it. I imagine
[SI units](https://en.wikipedia.org/wiki/International_System_of_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](/docs/languages/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](https://github.com/open-telemetry/opentelemetry-go-instrumentation/).
- Manually configure instrumentation libraries in your code, for example see
[Instrument the HTTP server](/docs/languages/go/getting-started/#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](https://github.com/open-telemetry/community/issues/2344)
of
[opentelemetry-go-auto-instrumentation](https://github.com/alibaba/opentelemetry-go-auto-instrumentation)
- Datadog's
[donation proposal](https://github.com/open-telemetry/community/issues/2497)
of [Orchestrion](https://github.com/datadog/orchestrion)

danielgblanco marked this conversation as resolved.
Show resolved Hide resolved
danielgblanco marked this conversation as resolved.
Show resolved Hide resolved
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](https://github.com/open-telemetry/community/blob/main/projects/go-compile-instrumentation.md),
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](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/dafdad14b7858c7f491c8cb72e4bc7deaf9378e3/instrgen/README.md),
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:
danielgblanco marked this conversation as resolved.
Show resolved Hide resolved

- 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.
danielgblanco marked this conversation as resolved.
Show resolved Hide resolved

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](https://github.com/open-telemetry/opentelemetry-go-compile-instrumentation)
- CNCF Slack:
[#otel-go-compt-instr-sig](https://cloud-native.slack.com/archives/C088D8GSSSF)
- Meetings: Every other Thursday UTC: 08:00 – 09:00 (subscribe to
[this Google Group](https://groups.google.com/a/opentelemetry.io/g/calendar-go)
for calendar invites, or read more about
[our community calendar](https://github.com/open-telemetry/community/?tab=readme-ov-file#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.
40 changes: 40 additions & 0 deletions static/refcache.json
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,10 @@
"StatusCode": 200,
"LastSeen": "2024-08-20T08:40:41.563366481Z"
},
"https://cloud-native.slack.com/archives/C088D8GSSSF": {
"StatusCode": 200,
"LastSeen": "2025-01-17T12:58:36.720595Z"
},
"https://cloud-native.slack.com/archives/CJFCJHG4Q": {
"StatusCode": 200,
"LastSeen": "2024-08-09T10:45:09.309237-04:00"
Expand Down Expand Up @@ -3347,6 +3351,10 @@
"StatusCode": 200,
"LastSeen": "2025-01-06T11:23:54.720969-05:00"
},
"https://en.wikipedia.org/wiki/International_System_of_Units": {
"StatusCode": 200,
"LastSeen": "2025-01-17T12:58:25.584113Z"
},
"https://en.wikipedia.org/wiki/JSON": {
"StatusCode": 200,
"LastSeen": "2025-01-06T11:23:32.692041-05:00"
Expand Down Expand Up @@ -4295,6 +4303,10 @@
"StatusCode": 200,
"LastSeen": "2024-08-06T15:18:42.027775+02:00"
},
"https://github.com/alibaba/opentelemetry-go-auto-instrumentation": {
"StatusCode": 206,
"LastSeen": "2025-01-17T12:58:30.442533Z"
},
"https://github.com/alolita": {
"StatusCode": 206,
"LastSeen": "2025-01-13T12:11:00.000033-05:00"
Expand Down Expand Up @@ -4847,6 +4859,10 @@
"StatusCode": 206,
"LastSeen": "2025-01-13T12:41:52.17647-05:00"
},
"https://github.com/datadog/orchestrion": {
"StatusCode": 206,
"LastSeen": "2025-01-17T12:58:33.133351Z"
},
"https://github.com/dattto": {
"StatusCode": 200,
"LastSeen": "2024-12-17T15:37:33.267299-05:00"
Expand Down Expand Up @@ -6403,6 +6419,10 @@
"StatusCode": 206,
"LastSeen": "2025-01-16T14:23:17.554218-05:00"
},
"https://github.com/open-telemetry/community/blob/main/projects/go-compile-instrumentation.md": {
"StatusCode": 206,
"LastSeen": "2025-01-18T20:45:35.792292Z"
},
"https://github.com/open-telemetry/community/blob/main/reports/ADA_Logics-collector-fuzzing-audit-2024.pdf": {
"StatusCode": 206,
"LastSeen": "2025-01-16T14:23:17.415384-05:00"
Expand Down Expand Up @@ -6451,6 +6471,14 @@
"StatusCode": 200,
"LastSeen": "2024-10-15T15:52:36.027937+01:00"
},
"https://github.com/open-telemetry/community/issues/2344": {
"StatusCode": 206,
"LastSeen": "2025-01-18T20:45:29.87596Z"
},
"https://github.com/open-telemetry/community/issues/2497": {
"StatusCode": 206,
"LastSeen": "2025-01-18T20:45:32.577654Z"
},
"https://github.com/open-telemetry/community/issues/828": {
"StatusCode": 206,
"LastSeen": "2025-01-13T11:43:27.58776-05:00"
Expand Down Expand Up @@ -8735,10 +8763,18 @@
"StatusCode": 206,
"LastSeen": "2025-01-07T10:33:12.688711-05:00"
},
"https://github.com/open-telemetry/opentelemetry-go-compile-instrumentation": {
"StatusCode": 206,
"LastSeen": "2025-01-17T12:58:34.746413Z"
},
"https://github.com/open-telemetry/opentelemetry-go-contrib": {
"StatusCode": 206,
"LastSeen": "2025-01-07T10:31:43.730419-05:00"
},
"https://github.com/open-telemetry/opentelemetry-go-contrib/blob/dafdad14b7858c7f491c8cb72e4bc7deaf9378e3/instrgen/README.md": {
"StatusCode": 206,
"LastSeen": "2025-01-17T13:21:30.685258Z"
},
"https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CONTRIBUTING.md#code-owners": {
"StatusCode": 206,
"LastSeen": "2025-01-16T11:38:11.841222-05:00"
Expand Down Expand Up @@ -14207,6 +14243,10 @@
"StatusCode": 200,
"LastSeen": "2024-06-18T10:36:39.590318+02:00"
},
"https://groups.google.com/a/opentelemetry.io/g/calendar-go": {
"StatusCode": 200,
"LastSeen": "2025-01-17T12:58:38.699931Z"
},
"https://groups.google.com/a/opentelemetry.io/g/calendar-maintainer-meeting": {
"StatusCode": 200,
"LastSeen": "2024-06-18T10:36:41.220362+02:00"
Expand Down
Loading