This is documentation for the next version of Grafana Beyla documentation. For the latest stable release, go to the latest version.

Documentationbreadcrumb arrow Beylabreadcrumb arrow Set upbreadcrumb arrow Use OBI with Grafana
Open source

Use OpenTelemetry eBPF Instrumentation with Grafana

If you use upstream OpenTelemetry eBPF Instrumentation (OBI) instead of Grafana Beyla, some Beyla features aren’t available. OBI works with the Grafana Cloud OTLP endpoint, and with any OpenTelemetry or Prometheus collector. This page shows how to replace Beyla-only features with other OpenTelemetry projects, and how to configure OBI for Grafana Cloud. To compare Beyla and OBI, refer to Compare Beyla and OpenTelemetry eBPF Instrumentation.

Replace Beyla-only features

The following sections describe OBI alternatives for features that only Beyla provides.

Process metrics

Beyla provides the following metrics, which follow the OpenTelemetry semantic conventions for OS process metrics:

process.cpu.time
process.cpu.utilization
process.memory.usage
process.memory.virtual
process.disk.io
process.network.io

If you use OBI and need these metrics, run an OpenTelemetry Collector on each node, and configure the Host Metrics Receiver to report process metrics.

The Host Metrics Receiver sends metrics for all the processes in the system by default. Beyla sends process metrics only for the services and applications that it instruments. To report metrics only for the processes that OBI instruments, configure the Collector to filter out processes that don’t match your OBI service discovery configuration.

Survey mode

Beyla has a survey mode that discovers your services and detects their programming languages, without instrumenting them. Grafana Cloud Instrumentation Hub uses survey mode to help you configure instrumentation for your services.

OBI doesn’t have a replacement for survey mode. To follow the work to add survey mode to OBI, refer to the OBI survey mode issue.

Integration with Alloy or Collector

Beyla can run as a standalone process, or as a component inside Grafana Alloy, the Grafana Labs distribution of the OpenTelemetry Collector. When Beyla runs inside Alloy, you can manage it with Fleet Management, which lets you manage many collector deployments remotely.

To get similar functionality with OBI, follow these steps:

  1. Build a custom Collector with OBI as a receiver.
  2. Make sure the Collector integrates OpAMP. For integration instructions, refer to Get started with Fleet Management and OpenTelemetry Collector.

Grafana AI Observability support

OBI can generate spans and traces from your generative AI clients. To use these traces with Grafana Cloud AI Observability, configure your instrumentation pipeline:

  • Export OBI traces to an OpenTelemetry Collector that forwards them to Grafana Cloud.
  • In the OpenTelemetry Collector:
    • Add a sigil.generation.id attribute to each span. Set the value to gen_ followed by a random UUID, for example gen_01234567-90ab-cdef-0123-456789abcdef.
    • If a span doesn’t have a gen_ai.conversation.id attribute, use a transform processor to set it to the value of the gen_ai.response.id attribute.
    • Optional: To reduce costs, drop spans that don’t belong to a generative AI workload. For example, drop any span that doesn’t contain a gen_ai.* attribute.

Use OBI with Grafana Cloud Application Observability and Knowledge Graph

A base OBI installation provides basic functionality in Grafana Cloud Application Observability and Knowledge Graph. To get the most out of Application Observability, configure OBI to export the following metric families in the features section:

  • application
  • application_span_otel
  • application_service_graph
  • network_flow_packets
  • application_runtime

For full functionality, also enable traces with full context propagation, and provide a source for process metrics.