> ## Documentation Index
> Fetch the complete documentation index at: https://docs.odigos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenTelemetry eBPF Instrumentation (OBI)

> OBI is OpenTelemetry’s eBPF-based auto-instrumentation.

Odigos can run **[OpenTelemetry eBPF Instrumentation (OBI)](https://opentelemetry.io/docs/zero-code/obi)** for workloads where the `opentelemetry-ebpf-instrumentation` distro is selected.

<CardGroup cols={2}>
  <Card title="OpenTelemetry OBI" icon="telescope" href="https://opentelemetry.io/docs/zero-code/obi">
    Upstream concepts, requirements, and capabilities.
  </Card>

  <Card title="OBI on GitHub" icon="code" href="https://github.com/open-telemetry/opentelemetry-ebpf-instrumentation">
    Source, releases, and issues.
  </Card>
</CardGroup>

## OBI Support

OBI can be enabled by selecting it as a container override for specific workloads. This can be configured either
from the Odigos UI or directly on a [Source object](/oss/pipeline/sources/introduction).

### Enabling OBI from the UI

<Steps>
  <Step title="Open the source drawer and edit the detected container">
    Select the source you want to instrument. In the source drawer, click the edit (pencil) icon next to the
    detected container.

    <Frame>
      <img src="https://mintcdn.com/odigos/hTGQ8BCEhhNz2oGB/images/oss/instrumentations/obi/obi1.png?fit=max&auto=format&n=hTGQ8BCEhhNz2oGB&q=85&s=4a1edef1046f0ab1a579c4edb4f7d9ce" alt="Edit detected container in the source drawer" width="1693" height="1926" data-path="images/oss/instrumentations/obi/obi1.png" />
    </Frame>
  </Step>

  <Step title="Choose the opentelemetry-ebpf-instrumentation distro">
    In the **Otel Distro Name** drop-down, choose **`opentelemetry-ebpf-instrumentation`** and click the check
    mark to save.

    <Frame>
      <img src="https://mintcdn.com/odigos/hTGQ8BCEhhNz2oGB/images/oss/instrumentations/obi/obi2.png?fit=max&auto=format&n=hTGQ8BCEhhNz2oGB&q=85&s=a3def545718649f08138f82e1c66e1c5" alt="Select opentelemetry-ebpf-instrumentation as the Otel distro" width="1588" height="1928" data-path="images/oss/instrumentations/obi/obi2.png" />
    </Frame>
  </Step>

  <Step title="Verify the source is instrumented with OBI">
    After refreshing, the detected container should report that it is instrumented with
    `opentelemetry-ebpf-instrumentation`.

    <Frame>
      <img src="https://mintcdn.com/odigos/hTGQ8BCEhhNz2oGB/images/oss/instrumentations/obi/obi3.png?fit=max&auto=format&n=hTGQ8BCEhhNz2oGB&q=85&s=7976a4c854bf7810c1f856e7ff47d713" alt="Source instrumented with OBI" width="1588" height="1422" data-path="images/oss/instrumentations/obi/obi3.png" />
    </Frame>
  </Step>

  <Step title="Remove OBI instrumentation">
    To remove OBI instrumentation, open the runtime override config again and click the delete (trash) icon
    next to the **Otel Distro Name** field.

    <Frame>
      <img src="https://mintcdn.com/odigos/hTGQ8BCEhhNz2oGB/images/oss/instrumentations/obi/obi4.png?fit=max&auto=format&n=hTGQ8BCEhhNz2oGB&q=85&s=eaff4da5ca010e1635b49a5125dcc99e" alt="Remove OBI override from runtime config" width="1588" height="1788" data-path="images/oss/instrumentations/obi/obi4.png" />
    </Frame>
  </Step>
</Steps>

<Note>
  By default, OBI does not need to restart your containers to begin instrumenting them. Because of this,
  choosing OBI as your container override will not trigger a pod restart. In some cases, however, your
  specific application may still require a pod restart (for example, when switching from a pre-existing
  instrumentation to OBI or vice-versa). You can trigger a pod restart using the **Restart** button in the
  source drawer.
</Note>

### Enabling OBI from a Source object

If editing a [Source object](/oss/pipeline/sources/introduction) directly, OBI is enabled through the
`containerOverrides` field. For example:

```yaml theme={null}
apiVersion: odigos.io/v1alpha1
kind: Source
metadata:
  name: my-workload
  namespace: default
spec:
  workload:
    kind: DaemonSet
    name: sample-app
    namespace: default
  containerOverrides:
    - containerName: foo
      otelDistroName: opentelemetry-ebpf-instrumentation
```

In this case, `containerName` is the name of the container to instrument in this workload, and the required
`otelDistroName` is **`opentelemetry-ebpf-instrumentation`**.

### Limitations

OBI's instrumentation is based on HTTP header propagation. For encrypted traffic, context propagation will not work unless both
workloads (client and server) are instrumented with OBI as explained in [the official OBI docs](https://opentelemetry.io/docs/zero-code/obi/distributed-traces/#context-propagation-at-network-level).
