obi

module
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: Apache-2.0

README

OpenTelemetry eBPF Instrumentation

Ask DeepWiki

This repository provides eBPF instrumentation based on the OpenTelemetry standard. It provides a lightweight and efficient way to collect telemetry data using eBPF for user-space applications.

OpenTelemetry e-BPF Instrumentation is commonly referred to as OBI.

Project Status

OBI is currently in Development. Users should expect breaking changes between minor releases while the project remains in v0.

If you are evaluating OBI for production use:

  • pin to a specific semver release tag instead of relying on latest, which is a moving, non-stable tag
  • review release notes before upgrading between minor versions
  • expect configuration, behavior, supported environments, and emitted telemetry to change between v0 minor releases
  • avoid assuming telemetry continuity for dashboards, alerts, or downstream processors before OBI declares those surfaces stable

For the project's versioning and stability policy, see VERSIONING.md. For the environments and artifact platforms OBI currently documents as supported, see SUPPORT_MATRIX.md.

Telemetry Schema

OBI's emission contract is defined as a Weaver-compatible schema registry under schemas/obi/.

It extends the upstream OpenTelemetry semantic conventions registry with the metrics, spans, and attributes OBI emits that are not covered upstream.

How to start developing

Requirements:

  • Docker
  • GNU Make
  1. First, generate all the eBPF Go bindings via make docker-generate. You need to re-run this make task each time you add or modify a C file under the bpf/ folder.
  2. To run linter, unit tests: make fmt verify.
  3. To run integration tests, run either:
make integration-test
make integration-test-k8s
make oats-test

, or all the above tasks. Each integration test target can take up to 50 minutes to complete, but you can use standard go command-line tooling to individually run each integration test suite under the internal/test/integration and internal/test/integration/k8s folder.

Zero-code Instrumentation

Below are quick reference instructions for getting OBI up and running with binary downloads or container images. For comprehensive setup, configuration, and troubleshooting guidance, refer to the OpenTelemetry zero-code instrumentation documentation, which is the authoritative source of truth.

For release artifact verification and installation details, see:

Installation

Binary Download

OBI provides pre-built binaries for Linux (amd64 and arm64). Download the latest release from the releases page.

Each release includes:

  • obi-v<version>-linux-amd64.tar.gz - Linux AMD64/x86_64 archive
  • obi-v<version>-linux-arm64.tar.gz - Linux ARM64 archive
  • obi-v<version>-linux-amd64.cyclonedx.json - CycloneDX SBOM for the AMD64 archive
  • obi-v<version>-linux-arm64.cyclonedx.json - CycloneDX SBOM for the ARM64 archive
  • obi-v<version>-source-generated.cyclonedx.json - CycloneDX SBOM for the source-generated archive
  • obi-java-agent-v<version>.cyclonedx.json - CycloneDX SBOM for the embedded Java agent and its Java dependencies
  • SHA256SUMS - Checksums for verification of the release archives and SBOM assets
Download and Verify
# Set your desired version (find latest at https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/releases)
export VERSION=1.0.0

# Determine your architecture
# For Intel/AMD 64-bit: amd64
# For ARM 64-bit: arm64
export ARCH=amd64  # Change to arm64 for ARM systems

Download the archive and checksum manifest:

# Download the archive for your architecture
wget https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/releases/download/v${VERSION}/obi-v${VERSION}-linux-${ARCH}.tar.gz

# Download checksums
wget https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/releases/download/v${VERSION}/SHA256SUMS

Verify the downloaded release assets:

# Verify the archive you downloaded
sha256sum -c SHA256SUMS --ignore-missing

Successful verification prints an OK result for each file you downloaded:

obi-v${VERSION}-linux-${ARCH}.tar.gz: OK

If verification fails, sha256sum reports FAILED instead. Re-download the affected files and make sure you are verifying assets from the same release version before proceeding.

Extract the archive:

tar -xzf obi-v${VERSION}-linux-${ARCH}.tar.gz

# The archive contains:
# - obi: Main OBI binary
# - k8s-cache: Kubernetes cache binary
# - LICENSE: Project license
# - NOTICE: Legal notices
# - NOTICES/: Third-party licenses and attributions
Optional: Download and Inspect SBOMs

CycloneDX SBOM files are optional metadata for supply-chain review and automation. They are not required to install or run OBI.

The release SBOMs describe the contents of the published archives and embedded components in CycloneDX JSON format. They can be consumed by dependency analysis and vulnerability scanning tools without extracting or executing the binaries.

Download the SBOMs you want to inspect:

# SBOM for the binary archive you downloaded
wget https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/releases/download/v${VERSION}/obi-v${VERSION}-linux-${ARCH}.cyclonedx.json

# SBOM for the embedded Java agent and its Java dependencies
wget https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/releases/download/v${VERSION}/obi-java-agent-v${VERSION}.cyclonedx.json

# Optional: verify the downloaded SBOM files against SHA256SUMS too
sha256sum -c SHA256SUMS --ignore-missing

Inspect the SBOM contents with common tools:

# List component names and versions from the archive SBOM
jq '.components[] | {name, version}' obi-v${VERSION}-linux-${ARCH}.cyclonedx.json

# Scan the SBOM with Grype
grype sbom:obi-v${VERSION}-linux-${ARCH}.cyclonedx.json

# Inspect the Java agent dependency graph
jq '.components[] | {name, version}' obi-java-agent-v${VERSION}.cyclonedx.json
Install to System

After extracting the archive, you can install the binaries to a location in your PATH so they can be used from any directory.

The Java agent is embedded in the obi binary, so no separate Java agent JAR installation is required. At runtime, OBI extracts the embedded Java agent into the user cache directory (typically $XDG_CACHE_HOME/obi/java or ~/.cache/obi/java) and reuses a checksum-named cached file across runs.

The following example installs to /usr/local/bin, which is a standard location on most Linux distributions. You can install to any other directory in your PATH:

# Move binaries to a directory in your PATH
sudo cp obi /usr/local/bin/
sudo cp k8s-cache /usr/local/bin/

# Verify installation
obi --version
Container Images

OBI is also available as container images:

# Set your desired version.
export VERSION=v0.7.0

# (Optional) Verify the signature of the container image
cosign verify --certificate-identity-regexp 'https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/' --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' otel/ebpf-instrument:${VERSION}

# (Optional) Verify the same release from GHCR
cosign verify --certificate-identity-regexp 'https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/' --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' ghcr.io/open-telemetry/opentelemetry-ebpf-instrumentation/ebpf-instrument:${VERSION}

# Pull the image
docker pull otel/ebpf-instrument:${VERSION}

# Or pull the same image from GHCR
docker pull ghcr.io/open-telemetry/opentelemetry-ebpf-instrumentation/ebpf-instrument:${VERSION}

# Run OBI in a container
# Note: OBI requires elevated privileges (--privileged) to instrument processes
# See https://opentelemetry.io/docs/zero-code/obi/setup/docker/ for more details
docker run --privileged otel/ebpf-instrument:${VERSION}

Successful cosign verify output states that the claims were validated and returns the signed image digest. If verification fails, confirm that the image tag exists in the registry you queried and that you are using the GitHub OIDC issuer and identity regexp shown above.

Examples

Contributing

See CONTRIBUTING

License

OpenTelemetry eBPF Instrumentation is licensed under the terms of the Apache Software License version 2.0. See the license file for more details.

Directories

Path Synopsis
cmd
config-docs command
config-docs generates a Markdown configuration reference from the OBI JSON schema.
config-docs generates a Markdown configuration reference from the OBI JSON schema.
generate-port-lookup command
generate-port-lookup reads the default /etc/services spec from the https://github.com/openbsd/src repository and generates a Go file (protocol.go by default) with a lookup table mapping well-known ports to service names for use by the transport package.
generate-port-lookup reads the default /etc/services spec from the https://github.com/openbsd/src repository and generates a Go file (protocol.go by default) with a lookup table mapping well-known ports to service names for use by the transport package.
k8s-cache command
obi command
OBI automatically instruments applications using eBPF to collect distributed traces, metrics, and logs without requiring code changes.
OBI automatically instruments applications using eBPF to collect distributed traces, metrics, and logs without requiring code changes.
obi-schema command
obi-schema generates a JSON schema from the OBI configuration struct.
obi-schema generates a JSON schema from the OBI configuration struct.
configs
offsets command
offsets/http2 command
offsets/pq command
offsets/gin module
examples
vendoring command
internal
test/analyzer/collectt
Package collectt detects incorrect use of *testing.T inside EventuallyWithT callbacks.
Package collectt detects incorrect use of *testing.T inside EventuallyWithT callbacks.
test/analyzer/collectt/cmd/collecttlint command
collecttlint runs the collectt analyzer as a standalone checker.
collecttlint runs the collectt analyzer as a standalone checker.
test/cmd/grpc/client command
Package main implements a simple gRPC client that demonstrates how to use gRPC-Go libraries to perform unary, client streaming, server streaming and full duplex RPCs.
Package main implements a simple gRPC client that demonstrates how to use gRPC-Go libraries to perform unary, client streaming, server streaming and full duplex RPCs.
test/cmd/grpc/server command
Package main implements a simple gRPC server that demonstrates how to use gRPC-Go libraries to perform unary, client streaming, server streaming and full duplex RPCs.
Package main implements a simple gRPC server that demonstrates how to use gRPC-Go libraries to perform unary, client streaming, server streaming and full duplex RPCs.
test/collector
Package collector implements a test OTEL collector to use in unit tests
Package collector implements a test OTEL collector to use in unit tests
test/integration/components/ai/anthropic/mock-server command
Package main implements a mock Anthropic API server for integration testing.
Package main implements a mock Anthropic API server for integration testing.
test/integration/components/ai/bedrock/mock-server command
Package main implements a mock AWS Bedrock Runtime API server for integration testing.
Package main implements a mock AWS Bedrock Runtime API server for integration testing.
test/integration/components/ai/gemini/mock-server command
Package main implements a mock Google AI Studio (Gemini) API server for integration testing.
Package main implements a mock Google AI Studio (Gemini) API server for integration testing.
test/integration/components/ai/openai/mock-server command
Package main implements a mock OpenAI API server for integration testing.
Package main implements a mock OpenAI API server for integration testing.
test/integration/components/ai/qwen/mock-server command
Package main implements a mock Qwen (DashScope) API server for integration testing.
Package main implements a mock Qwen (DashScope) API server for integration testing.
test/integration/components/docker
Package docker provides some helpers to manage docker-compose clusters from the test suites
Package docker provides some helpers to manage docker-compose clusters from the test suites
test/integration/components/jaeger
Package jaeger provides some convenience data structures for integration testing.
Package jaeger provides some convenience data structures for integration testing.
test/integration/components/kube
Package kube contains some tools to setup and use a Kind cluster
Package kube contains some tools to setup and use a Kind cluster
test/integration/components/promtest
Package promtest provides some convenience functions for prometheus handling in integration tests.
Package promtest provides some convenience functions for prometheus handling in integration tests.
test/integration/components/testserver/grpc/client
Package grpcclient implements a simple gRPC client that demonstrates how to use gRPC-Go libraries to perform unary, client streaming, server streaming and full duplex RPCs.
Package grpcclient implements a simple gRPC client that demonstrates how to use gRPC-Go libraries to perform unary, client streaming, server streaming and full duplex RPCs.
test/integration/components/testserver/grpc/server
Package main implements a simple gRPC server that demonstrates how to use gRPC-Go libraries to perform unary, client streaming, server streaming and full duplex RPCs.
Package main implements a simple gRPC server that demonstrates how to use gRPC-Go libraries to perform unary, client streaming, server streaming and full duplex RPCs.
pkg
appolly/discover/exec
Package exec provides the utilities to analyze the executable code
Package exec provides the utilities to analyze the executable code
config
Package config contains some configuration options that need to be in a public package to let external collectors access them
Package config contains some configuration options that need to be in a public package to let external collectors access them
export/attributes/names
Package attr contains definition of the attribute names of for the metrics, especially for the metrics whose reported attributes are selected in the attributes.select YAML option
Package attr contains definition of the attribute names of for the metrics, especially for the metrics whose reported attributes are selected in the attributes.select YAML option
export/connector
Package connector provides tools for sharing the connection of diverse exporters (Prometheus, OTEL...) from different nodes
Package connector provides tools for sharing the connection of diverse exporters (Prometheus, OTEL...) from different nodes
export/debug
Package debug provides some export nodes that are aimed basically at debugging/testing
Package debug provides some export nodes that are aimed basically at debugging/testing
export/imetrics
Package imetrics supports recording and submission of internal metrics
Package imetrics supports recording and submission of internal metrics
export/otel/metric/components/x
Package x contains support for OTel metric SDK experimental features.
Package x contains support for OTel metric SDK experimental features.
export/otel/perapp
Package perapp is a placeholder for the future global and per-service support of different metrics/traces export options.
Package perapp is a placeholder for the future global and per-service support of different metrics/traces export options.
internal/appolly
Package appolly provides public access to eBPF application observability as a library
Package appolly provides public access to eBPF application observability as a library
internal/ebpf/ringbuf
Package ringbuf provides some type aliases to prevent testing/compilation errors in non-linux environments due to the use of Cilium's ringbuf package, which is only available on Linux.
Package ringbuf provides some type aliases to prevent testing/compilation errors in non-linux environments due to the use of Cilium's ringbuf package, which is only available on Linux.
internal/ebpf/tcmanager
line below avoids linter errors on Mac
line below avoids linter errors on Mac
internal/goexec
Package goexec provides the utilities to analyze the executable code
Package goexec provides the utilities to analyze the executable code
internal/helpers/container
Package container provides helper tools to inspect container information
Package container provides helper tools to inspect container information
internal/rdns/ebpf/xdp
Package xdp provides DNS message parsing functionality for the XDP-based DNS response tracker.
Package xdp provides DNS message parsing functionality for the XDP-based DNS response tracker.
internal/split
Package split provides a generic Iterator for zero-copy splitting of strings and byte slices.
Package split provides a generic Iterator for zero-copy splitting of strings and byte slices.
kube/kubecache/meta/cni
Package cni provides utilities for working with Container Network Interface (CNI) configurations.
Package cni provides utilities for working with Container Network Interface (CNI) configurations.
obi
pipe/msg
Package msg provides tools for message passing and queues between the different nodes of the OBI pipelines.
Package msg provides tools for message passing and queues between the different nodes of the OBI pipelines.
pipe/swarm
Package swarm provides tools for the creation and coordination of the nodes that go inside the different OBI pipelines
Package swarm provides tools for the creation and coordination of the nodes that go inside the different OBI pipelines
pipe/swarm/swarms
Package swarms provides helper functions for operating OBI swarms
Package swarms provides helper functions for operating OBI swarms
test/integration
Package integration provides reusable integration test utilities for downstream projects, whilst allowing each project to maintain their own project-specific configuration.
Package integration provides reusable integration test utilities for downstream projects, whilst allowing each project to maintain their own project-specific configuration.
transform
Package transform provides some intermediate nodes that might filter/process/transform the events
Package transform provides some intermediate nodes that might filter/process/transform the events
scripts
ci-analysis command
ci-analysis parses gotestsum JSON reports and Docker log artifacts from GitHub Actions, then generates a Markdown flaky-test analysis report.
ci-analysis parses gotestsum JSON reports and Docker log artifacts from GitHub Actions, then generates a Markdown flaky-test analysis report.
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL