eBPF Observability: Zero-Instrumentation Explained

Ready to get started?
Try OpenObserve Cloud today for more efficient and performant observability.

eBPF observability is a way to collect traces, metrics, and other telemetry by running small, safety-checked programs inside the Linux kernel. Because the kernel already sees every request, system call, and network packet, eBPF can show you how your applications behave without changing a single line of application code. That is what "zero-instrumentation" means.
If you have ever tried to add tracing to a large system, you know the pain: an SDK for every language, code changes in every service, and redeploys before you see any data. eBPF flips that model. Instead of teaching every application to report on itself, you watch the applications from the one place they all share: the operating system kernel.
This beginner's guide explains what eBPF is, how zero-instrumentation works step by step, what eBPF can and cannot see, the most popular tools, and how to send eBPF data to an observability backend like OpenObserve.
TL;DR
- eBPF lets you run small, safety-checked programs inside the Linux kernel without changing kernel source code or loading kernel modules.
- Zero-instrumentation means telemetry is collected from the kernel, so your applications need no SDK, no code changes, and no restarts.
- eBPF tools give you traces and rate, error, and duration (RED) metrics for HTTP, gRPC, and database calls in any language.
- eBPF can't see business context that only your code knows, such as user IDs or custom events, so add OpenTelemetry SDKs where you need it.
- The easiest way to start is to run OpenTelemetry eBPF Instrumentation (OBI), which reached a stable v1.0.0 in October 2026, and send its OTLP data to OpenObserve.
What is eBPF?
eBPF stands for extended Berkeley Packet Filter. The original BPF was created in the early 1990s to filter network packets efficiently. Over time, Linux extended it into a general-purpose way to run sandboxed programs inside the kernel. Today the name is mostly used as a word on its own, and the technology goes far beyond packets.
A simple way to think about eBPF: it gives you event listeners for the operating system. You write a small program and attach it to an event, such as "a process opened a network connection" or "this function in this binary was called." Whenever that event happens, the kernel runs your program, which can record what happened.
Three things make eBPF special:.
- It is safe. Every program is checked by the kernel's verifier before it runs, so a buggy eBPF program cannot crash your server.
- It is fast. Programs are compiled to native machine code and run right where the event happens.
- It is dynamic. You can load and unload programs on a running system, with no reboot and no kernel recompilation.
eBPF is used for networking (Cilium), security (Falco, Tetragon; see our Falco on Kubernetes guide), performance analysis (bpftrace), and, increasingly, application observability. You can learn more about the project at ebpf.io.
What does "zero-instrumentation" mean?
Instrumentation is the work of making an application emit telemetry such as traces, metrics, and logs. Traditionally that work happens inside the application. Zero-instrumentation (also called zero-code instrumentation) means the telemetry is collected from outside the application, so the application itself does not change.
There are three common ways to instrument an application:.

| Approach. | How it works. | Code changes. | Restart needed. | Languages. | Business context. |
|---|---|---|---|---|---|
| Manual SDK. | You add an OpenTelemetry SDK and create spans in code. | Yes. | Yes. | One setup per language. | Full. |
| Language agent. | An agent patches popular libraries when the app starts. | Little or none. | Yes. | Only languages with an agent (Java, Python, .NET, Node.js). | Partial. |
| eBPF. | Kernel hooks observe calls as they happen. | No. | No. | Any language on Linux. | Limited. |
eBPF is the only approach that works the same way for a Java service, a Go binary, and a Python script, without touching any of them. That is why it is so useful for getting broad visibility quickly. For a deeper look at the first two approaches, see our guide to auto-instrumenting distributed services.
How does eBPF observability work?
Here is what happens, step by step, when an eBPF observability agent starts collecting data:.
- The agent loads eBPF programs into the kernel. An observability agent, running as a normal process, asks the kernel to load small eBPF programs.
- The verifier checks every program. Before anything runs, the kernel verifier proves the program is safe: it cannot crash the kernel, loop forever, or read memory it should not.
- The JIT compiler turns it into native code. The verified program is compiled to machine code for your CPU so it runs with very little overhead.
- Programs attach to hooks. Each program is attached to an event, such as a system call, a kernel function, a function inside an application binary, or a network socket.
- Your applications run normally. When a service handles an HTTP request or queries a database, the kernel triggers the attached programs automatically.
- Programs record events in eBPF maps. Maps are shared memory areas where eBPF programs store events and counters.
- The agent turns events into telemetry. The agent reads the maps, stitches events into spans and metrics, and exports them, usually over OTLP, to an observability backend.

Here is the same flow for a single HTTP request. The checkout service has no SDK or agent, yet every step is recorded by eBPF programs in the kernel:.
The application never knew it was being observed. All of the data came from the kernel.
What are the types of eBPF hooks?
Where an eBPF program attaches decides what it can see. These are the hooks you will hear about most:.
| Hook. | What it watches. | Beginner analogy. | Stability. |
|---|---|---|---|
| Tracepoints. | Predefined events in the kernel, such as system calls. | Official doorbells the kernel installed on purpose. | Stable across kernel versions. |
| kprobes. | Almost any function inside the kernel. | A sensor you can stick on any internal kernel wire. | Can change between kernel versions. |
| uprobes. | Functions inside application binaries and libraries. | A sensor on a specific function in your app, like a TLS library. | Depends on the exact binary. |
| Network hooks (socket, TC, XDP). | Packets and socket traffic. | A camera at the network door. | Stable. |
Observability tools combine these. For example, a tool might use socket hooks to see HTTP traffic, and uprobes on a TLS library to read requests before they are encrypted. You do not need to write any of these programs yourself: the observability agent ships with them.
What are BTF and CO-RE in eBPF?
- BTF (BPF Type Format) is metadata that describes the kernel's data structures. It lets eBPF programs understand the kernel they are running on.
- CO-RE (Compile Once, Run Everywhere) uses BTF so one compiled eBPF program can run on many different kernel versions.
Together, they are why modern eBPF tools can ship one binary that works across distributions. It is also why many tools require a kernel with BTF enabled.
What can eBPF observability see?
Because the kernel sits under every application, eBPF can capture a lot without any code changes:.
- Distributed traces for HTTP, HTTPS, HTTP/2, and gRPC requests, including calls between services.
- RED metrics: request rate, error rate, and duration for every service and endpoint (see RED metrics monitoring).
- Database and messaging calls, such as PostgreSQL, MySQL, Redis, and Kafka client calls, depending on the tool.
- Service graphs that show which services talk to each other.
- Network flows between pods, nodes, and external endpoints.
- Continuous profiles that show which functions use the most CPU.
- Security events, such as unexpected process launches or file access.
OpenTelemetry eBPF Instrumentation, for example, supports Java, .NET, Go, Python, Ruby, Node.js, C, C++, and Rust applications, and protocols including HTTP/S, gRPC, Kafka, and several SQL and NoSQL databases (OBI documentation).
What can't eBPF observability see?
eBPF is powerful, but it is not magic. It sees what crosses the kernel and what it can hook, not what your code means. Keep these limits in mind:.
- Business context. The kernel does not know that a request belongs to a premium customer or which feature flag was on. Add those as span attributes with an SDK.
- Custom spans inside a function. If you want to time one step of a long function, you need code-level instrumentation.
- Some trace context propagation. Linking spans across services works well for common protocols, but asynchronous work, queues, and unusual frameworks may break the chain.
- Logs. eBPF tools focus on traces and metrics. Some, such as OBI, can enrich your existing logs with trace IDs, but they do not replace your logging pipeline.
- Non-Linux systems. Most eBPF observability tools support Linux only. eBPF for Windows exists as a separate project, but common observability agents do not target it yet.
eBPF vs traditional instrumentation: which should you use?
| eBPF (zero-instrumentation). | OpenTelemetry SDK. | |
|---|---|---|
| Setup effort. | One agent per host or node. | Changes in every service. |
| Language coverage. | Any language on Linux. | One SDK per language. |
| Time to first trace. | Minutes. | Days to weeks across many services. |
| Business context. | Limited. | Full. |
| Custom spans and attributes. | No. | Yes. |
| Works on third-party or legacy apps. | Yes. | Only if you can change the code. |
| Requirements. | Linux, recent kernel, elevated privileges. | Language runtime support. |
The best answer for most teams is both. Start with eBPF to get traces and RED metrics for every service on day one. Then add OpenTelemetry SDK instrumentation to your most important services where you need business context. Both produce standard OpenTelemetry data, so they can land in the same backend. If you are new to OpenTelemetry, start with what is OpenTelemetry.
What are the benefits of eBPF observability?
- No code changes: instrument services you cannot or do not want to modify, including third-party and legacy apps.
- Fast coverage: one agent per node can cover every service on it.
- Consistent across languages: the same data model for Java, Go, Python, Node.js, and more.
- Low overhead: programs run as native code in the kernel, close to the events they observe.
- Safe by design: the verifier stops unsafe programs before they run.
- Great fit for Kubernetes: run one agent per node and every new pod is observed automatically.
What are the requirements and limitations of eBPF observability?
- Linux only. Most tools also require specific CPU architectures; OBI supports amd64 and arm64.
- Kernel version and BTF. OBI needs Linux 5.8 or newer (or RHEL-family 4.18 with eBPF backports) with BTF enabled.
- Elevated privileges. eBPF agents need root or specific Linux capabilities to load programs. Treat them like any other privileged infrastructure component.
- Maturity. OBI reached its first stable release, v1.0.0, on October 30, 2026, so its configuration and stable telemetry now follow semantic versioning. Its release notes still list known issues, such as child spans occasionally starting before their parents and port-based discovery sometimes picking a helper process instead of the workload, so pin the version and canary upgrades.
- Overhead varies. It is generally low, but uprobes on very hot code paths cost more than tracepoints. Measure on a staging workload first.
What are the best eBPF observability tools?
| Tool. | What it does. | Best for. |
|---|---|---|
| OpenTelemetry eBPF Instrumentation (OBI). | Zero-code traces and RED metrics, exported as OpenTelemetry data. | Application observability across any language. |
| Pixie. | In-cluster Kubernetes observability with scriptable queries. | Live debugging inside Kubernetes clusters. |
| Cilium Hubble. | Network flow visibility for Cilium-based clusters. | Kubernetes networking and service dependencies. |
| Tetragon. | Security observability and runtime enforcement. | Detecting suspicious process and file activity. |
| OpenTelemetry eBPF profiler. | Continuous, whole-system CPU profiling. | Finding the code that uses the most CPU. |
| bpftrace. | One-line scripts for ad hoc kernel tracing. | Learning eBPF and quick investigations. |
OBI started life as Grafana Beyla, which was donated to the OpenTelemetry project in 2025. Because it is part of OpenTelemetry and exports standard OTLP data, it works with any OpenTelemetry-compatible backend. That makes it the most natural starting point for beginners.
How to send eBPF traces to OpenObserve, step by step
This walkthrough runs OBI on a single Linux host, sends its data to an OpenTelemetry Collector, and forwards it to OpenObserve. You will instrument a tiny Python web server without changing it.

Prerequisites for running OBI
You need:.
- A Linux machine (a VM is fine) with Docker installed.
- Kernel 5.8 or newer with BTF, on amd64 or arm64.
- An OpenObserve account: OpenObserve Cloud or a self-hosted install.
Step 1: Check that your Linux kernel supports eBPF
uname -r
ls /sys/kernel/btf/vmlinux
The first command should print 5.8 or higher. The second should print the file path. If it says "No such file or directory", your kernel does not expose BTF and OBI will not run.
Step 2: Start an uninstrumented application
Any HTTP service works. For this demo, start Python's built-in web server on port 8080:.
mkdir -p ~/ebpf-demo && cd ~/ebpf-demo
echo "hello from eBPF demo" > index.html
python3 -m http.server 8080
This is an ordinary process. There is no OpenTelemetry SDK and no agent attached to it.
Step 3: Configure the OpenTelemetry Collector to export to OpenObserve
In a new terminal, create otel-collector.yaml. Replace <org_id> and the authorization value with the details from the Data sources page in OpenObserve. For a local self-hosted instance, use http://localhost:5080/api/default as the endpoint.
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
exporters:
otlphttp/openobserve:
endpoint: https://api.openobserve.ai/api/<org_id>
headers:
Authorization: "Basic <base64(email:token)>"
sending_queue:
batch: {}
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlphttp/openobserve]
metrics:
receivers: [otlp]
exporters: [otlphttp/openobserve]
The sending_queue.batch block batches data in the exporter, which current Collector releases recommend instead of the separate batch processor. Keeping credentials in the Collector means the privileged eBPF agent never needs to hold them. For more options, see our OpenTelemetry Collector configuration guide.
Start the Collector:.
docker run -d --name otel-collector --network host \
-v "$(pwd)/otel-collector.yaml:/etc/otelcol-contrib/config.yaml" \
otel/opentelemetry-collector-contrib:latest
Step 4: Run OpenTelemetry eBPF Instrumentation (OBI) with Docker
Start OBI and tell it which application to watch by its port:.
docker run -d --name obi \
--pid=host \
--privileged \
--network host \
-e OTEL_EBPF_OPEN_PORT=8080 \
-e OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 \
otel/ebpf-instrument:v1.0.0
What each option does:.
--pid=hostlets OBI see processes outside its own container.--privilegedgives OBI the permissions it needs to load eBPF programs. In production, you can replace it with the specific Linux capabilities listed in the OBI security docs.OTEL_EBPF_OPEN_PORT=8080tells OBI to instrument the process listening on port 8080.OTEL_EXPORTER_OTLP_ENDPOINTsends traces and metrics to the Collector.
The OBI docs recommend pinning a release tag such as v1.0.0 rather than main or latest, which have no compatibility guarantees. Check the releases page before upgrading. If several processes on the host listen on the same port, select the application by executable path instead, because port-based discovery can pick the wrong process.
Prefer to skip the Collector? OBI can also export straight to OpenObserve. Point OTEL_EXPORTER_OTLP_ENDPOINT at https://<your-openobserve-host>/api/<your-org> and pass the Authorization and stream-name headers in OTEL_EXPORTER_OTLP_HEADERS. The OpenObserve OBI docs cover this setup, including the per-signal endpoints.
Step 5: Generate traffic to create traces
for i in $(seq 1 50); do curl -s http://localhost:8080/ > /dev/null; done
curl -s http://localhost:8080/missing-page > /dev/null
The second command creates a 404 so you can see an error in your data.
Step 6: View eBPF traces and RED metrics in OpenObserve
Open OpenObserve and go to Traces. You should see spans for GET / and GET /missing-page, with status codes and durations, even though the Python server has no instrumentation at all. Click a trace to open its waterfall: each span shows the service, operation, status, duration, and attributes that OBI captured from the kernel. In Metrics, look for HTTP server duration metrics, which give you request rate, error rate, and latency per service.
Here's what a trace looks like in OpenObserve. This example comes from a multi-service demo application rather than the single Python server, so it has more spans:.

From here you can build dashboards on traces and metrics with SQL or PromQL, and set alerts on error rate or latency.
How to run eBPF observability on Kubernetes
On Kubernetes, the same idea scales naturally: run one OBI instance per node, and it observes every pod on that node, adding Kubernetes metadata such as namespace, pod, and deployment names. The OpenObserve OBI docs show how to deploy OBI as a DaemonSet with its official Helm chart and export to OpenObserve. To see the whole cluster as well as its applications, our guide to centralizing logs across Kubernetes, AWS, and on-prem servers covers the OpenObserve Collector Helm chart. For broader cluster monitoring, see Kubernetes monitoring with OpenTelemetry and OpenObserve's Kubernetes monitoring.
eBPF observability best practices for beginners
- Start small. Instrument one host or one namespace first and compare the data with what you expect.
- Pin agent versions. eBPF tools evolve quickly; upgrade deliberately and read the release notes.
- Check kernel support everywhere. Mixed fleets often include a few older kernels without BTF.
- Keep credentials out of the agent. Route data through an OpenTelemetry Collector.
- Measure overhead. Compare CPU and latency with and without the agent on a staging workload.
- Add SDKs where it matters. Use eBPF for coverage and SDKs for business context on critical paths.
- Watch cardinality. Automatic metrics per endpoint can create many series; group or drop noisy routes if needed. Our guide to high cardinality explains why it matters.
How does OpenObserve help with eBPF observability?
eBPF agents collect the data; you still need somewhere to store, search, and alert on it. OpenObserve is an open source (AGPL-3.0) observability platform that ingests OpenTelemetry traces, metrics, and logs natively, so eBPF data from OBI lands next to SDK traces and application logs.
With OpenObserve you can:.
- Explore traces from eBPF and SDK instrumentation side by side, with distributed tracing views and service graphs.
- Query RED metrics with PromQL or SQL and build dashboards per service.
- Correlate traces with logs and infrastructure metrics during an incident.
- Alert on error rates, latency, and SLO burn rates.
- Keep costs predictable with compressed columnar storage on object storage.
Once OBI runs on every node, the service graph shows which services call each other, their request counts, and their error rates, built entirely from kernel-level data:.

Get started with eBPF observability in OpenObserve
eBPF observability lets you see inside every service on a Linux host without changing code, adding SDKs, or restarting anything. Small programs run safely in the kernel, watch requests as they happen, and hand the results to an agent that exports standard OpenTelemetry data.
It is not a complete replacement for code-level instrumentation: the kernel cannot see business context. But as a way to get traces and RED metrics for every service on day one, it is hard to beat. Start with OBI on a single host, send the data to OpenObserve, and add SDK instrumentation where you need more detail.
Ready to try it? Sign up for OpenObserve Cloud or download OpenObserve and send your first eBPF traces in minutes.
Frequently Asked Questions
About the Author
Follow OpenObserve on Google
Add OpenObserve as a preferred source to see more of our articles in Google Search and Top Stories.











