Use OpenTelemetry eBPF Instrumentation with Grafana
OpenTelemetry eBPF Instrumentation (OBI) works with the Grafana Cloud OTLP endpoint, and with any OpenTelemetry Collector or Prometheus-compatible backend. This page shows how to configure OBI for Grafana Cloud, and how to use other OpenTelemetry projects for capabilities that Grafana Beyla includes. To compare Beyla and OBI, refer to Compare Beyla and OpenTelemetry eBPF Instrumentation.
Configure OBI for 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:
applicationapplication_span_otelapplication_service_graphnetwork_flow_packetsapplication_runtime
Set the list in the metrics.features section of the OBI configuration file, or with the OTEL_EBPF_METRICS_FEATURES environment variable.
For example, OTEL_EBPF_METRICS_FEATURES=application,application_span_otel,application_service_graph,network_flow_packets,application_runtime.
Application Observability also uses traces and process metrics. To get them with OBI, enable traces with full context propagation, and provide a source for process metrics.
For host-hours pricing, Application Observability identifies hosts from the k8s.node.name or host.id resource attribute.
OBI sets these attributes for most deployment models, so you don’t need the Beyla application_host metric family, which exports the traces_host_info metric.
Add capabilities that Beyla includes
Beyla includes some capabilities for the Grafana ecosystem that aren’t part of OBI. The following sections describe how to get these capabilities with OBI and other OpenTelemetry projects.
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.ioIf 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 process scraper of the Host Metrics Receiver doesn’t report process.network.io, so this setup doesn’t provide that metric.
The scraper reports process.cpu.utilization only when you enable it.
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 include 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:
- Build a custom Collector with OBI as a receiver.
- Make sure the Collector integrates OpAMP. For integration instructions, refer to Get started with Fleet Management and OpenTelemetry Collector.
Next steps
- Compare Beyla and OpenTelemetry eBPF Instrumentation
- OpenTelemetry eBPF Instrumentation documentation
- Set up Beyla to use these capabilities without extra OpenTelemetry components