|
| 1 | +--- |
| 2 | +title: OpenTelemetry eBPF Instrumentation |
| 3 | +linkTitle: OBI |
| 4 | +description: |
| 5 | + Learn how to use OpenTelemetry eBPF Instrumentation for automatic |
| 6 | + instrumentation. |
| 7 | +weight: 3 |
| 8 | +cascade: |
| 9 | + OTEL_RESOURCE_ATTRIBUTES_APPLICATION: obi |
| 10 | + OTEL_RESOURCE_ATTRIBUTES_NAMESPACE: obi |
| 11 | + OTEL_RESOURCE_ATTRIBUTES_POD: obi |
| 12 | +cSpell:ignore: CAP_PERFMON |
| 13 | +--- |
| 14 | + |
| 15 | +OpenTelemetry libraries provide telemetry collection for popular programming |
| 16 | +languages and frameworks. However, getting started with distributed tracing can |
| 17 | +be complex. In some compiled languages like Go or Rust, you must manually add |
| 18 | +tracepoints to the code. |
| 19 | + |
| 20 | +OpenTelemetry eBPF Instrumentation (OBI) is an auto-instrumentation tool to |
| 21 | +easily get started with Application Observability. OBI uses eBPF to |
| 22 | +automatically inspect application executables and the OS networking layer, and |
| 23 | +capture trace spans related to web transactions and Rate Errors Duration (RED) |
| 24 | +metrics for Linux HTTP/S and gRPC services. All data capture occurs without any |
| 25 | +modifications to application code or configuration. |
| 26 | + |
| 27 | +OBI offers the following features: |
| 28 | + |
| 29 | +- **Wide language support**: Java, .NET, Go, Python, Ruby, Node.js, C, C++, and |
| 30 | + Rust |
| 31 | +- **Lightweight**: No code changes required, no libraries to install, no |
| 32 | + restarts needed |
| 33 | +- **Efficient instrumentation**: Traces and metrics are captured by eBPF probes |
| 34 | + with minimal overhead |
| 35 | +- **Distributed tracing**: Distributed trace spans are captured and reported to |
| 36 | + a collector |
| 37 | +- **Kubernetes-native**: Provides configuration-free auto-instrumentation for |
| 38 | + Kubernetes applications |
| 39 | +- **Visibility into encrypted communications**: Capture transactions over |
| 40 | + TLS/SSL without decryption |
| 41 | +- **Context propagation**: Propagate trace context across services automatically |
| 42 | +- **Protocol support**: HTTP/S, gRPC, and gRPC-Web |
| 43 | +- **Low cardinality metrics**: Prometheus-compatible metrics with low |
| 44 | + cardinality for cost reduction |
| 45 | +- **Network observability**: Capture network flows between services |
| 46 | +- **Database traces**: Capture database queries and connections |
| 47 | + |
| 48 | +## Requirements |
| 49 | + |
| 50 | +OBI requires the following to run: |
| 51 | + |
| 52 | +- Linux kernel version 5.8 or later (or 4.18 for Redhat Enterprise Linux) |
| 53 | +- An x86_64 or arm64 processor |
| 54 | +- Runtime support for eBPF (most modern Linux distributions) |
| 55 | +- Administrative privileges (root access) or the specific capabilities listed in |
| 56 | + the [configuration reference](security/) |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | +## Compatibility |
| 61 | + |
| 62 | +OBI is tested with the following Linux distributions: |
| 63 | + |
| 64 | +- Ubuntu 20.04 LTS, 21.04, 22.04 LTS and 23.04 |
| 65 | +- CentOS 7, 8, and 9 |
| 66 | +- AlmaLinux 8, 9 |
| 67 | +- Rocky Linux 8, 9 |
| 68 | +- Red Hat Enterprise Linux 8, 9 |
| 69 | +- Debian 11, 12 |
| 70 | +- openSUSE Leap 15.3, 15.4 |
| 71 | +- SUSE Linux Enterprise Server 15 SP4 |
| 72 | + |
| 73 | +- OBI also supports RedHat-based distributions: RHEL8, CentOS 8, Rocky8, |
| 74 | + AlmaLinux8, and others, which ship a Kernel 4.18 that backports eBPF-related |
| 75 | + patches. |
| 76 | + |
| 77 | +- For instrumenting Go programs, compile with at least Go 1.17. OBI support Go |
| 78 | + applications built with a major **Go version no earlier than 3 versions** |
| 79 | + behind the current stable major release. |
| 80 | +- Administrative access rights to execute OBI. |
| 81 | + |
| 82 | +## Limitations |
| 83 | + |
| 84 | +OBI has its limitations too. It only provides generic metrics and transaction |
| 85 | +level trace span information. Language agents and manual instrumentation is |
| 86 | +still recommended, so that you can specify the custom attributes and events you |
| 87 | +want to capture. |
| 88 | + |
| 89 | +While most eBPF programs require elevated privileges, OBI allows you to specify |
| 90 | +finer grained permissions to run with minimum required permissions, such as: |
| 91 | +`CAP_DAC_READ_SEARCH`, `CAP_SYS_PTRACE`, `CAP_PERFMON`, `CAP_BPF`, |
| 92 | +`CAP_CHECKPOINT_RESTORE`, and others. |
| 93 | + |
| 94 | +Some OBI functionality requires further permissions, for example using the |
| 95 | +network observability probes with Linux Traffic Control requires |
| 96 | +`CAP_NET_ADMIN`, but it's a feature you have to optionally enable. |
| 97 | + |
| 98 | +For a comprehensive list of capabilities required by OBI, refer to |
| 99 | +[Security, permissions and capabilities](security/). |
| 100 | + |
| 101 | +## Get started with OBI |
| 102 | + |
| 103 | +- Follow the [setup](setup/) documentation to get started with OBI either with |
| 104 | + Docker or Kubernetes. |
0 commit comments