obi

module
v0.5.0 Latest Latest
Warning

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

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

README

OpenTelemetry eBPF Instrumentation

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.

🚧 This project is currently work in progress.

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.

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-<version>-linux-amd64.tar.gz - Linux AMD64/x86_64 archive
  • obi-<version>-linux-arm64.tar.gz - Linux ARM64 archive
  • SHA256SUMS - Checksums for verification
Download and Verify
# Set your desired version (find latest at https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation/releases)
VERSION=1.0.0

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

# 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 archive
sha256sum -c SHA256SUMS --ignore-missing

# Extract the archive
tar -xzf obi-v${VERSION}-linux-${ARCH}.tar.gz

# The archive contains:
# - obi: Main OBI binary
# - k8s-cache: Kubernetes cache binary
# - obi-java-agent.jar: Java agent
# - LICENSE: Project license
# - NOTICE: Legal notices
# - NOTICES/: Third-party licenses and attributions
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 OBI binary uses a default-deny approach for Java instrumentation, requiring the Java agent to be located in the same directory as the OBI executable. This ensures the agent is always available when OBI 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/

# The Java agent MUST be in the same directory as the OBI binary
sudo cp obi-java-agent.jar /usr/local/bin/

# Verify installation
obi --version
Container Images

OBI is also available as container images:

# Set your desired version (or use 'latest' for the most recent release)
VERSION=latest  # or VERSION=1.0.0 for a specific version

# Pull the image
docker pull docker.io/otel/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 docker.io/otel/ebpf-instrument:${VERSION}

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
ebpf-instrument command
Ebpf-instrument automatically instruments applications using eBPF.
Ebpf-instrument automatically instruments applications using eBPF.
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-genfiles command
configs
offsets command
offsets/http2 command
offsets/gin module
examples
vendoring command
internal
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/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 Alloy accessing them
Package config contains some configuration options that need to be in a public package to let Alloy accessing 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 an Iterator that allows for zero-copy string splitting.
Package split provides an Iterator that allows for zero-copy string splitting.
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 Beyla pipelines.
Package msg provides tools for message passing and queues between the different nodes of the Beyla pipelines.
pipe/swarm
Package swarm provides tools for the creation and coordination of the nodes that go inside the different Beyla pipelines
Package swarm provides tools for the creation and coordination of the nodes that go inside the different Beyla 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
test

Jump to

Keyboard shortcuts

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