OpenObserve Docs
IngestionProfiles

Zero-Code CPU Profiling with otelcol-ebpf-profiler

otelcol-ebpf-profiler is the Collector distribution that embeds the eBPF profiler as the profiling receiver. It samples on-CPU stacks on a Linux host and exports OTLP Profiles. No language SDK and no application restart. Do not use otelcol-contrib.

Use it for Go, Rust, C/C++, and other native runtimes. For Java, prefer async-profiler.

Send profiles

Copy the endpoint and Authorization header from Data Sources → Custom → Profiles. Save as ebpf-profiler-config.yaml:

receivers:
  profiling:
    samples_per_second: 20
    reporter_interval: 60s

exporters:
  otlp_http/openobserve:
    profiles_endpoint: http://<your-openobserve-host>/api/<your-org>/v1/profiles
    headers:
      Authorization: Basic <paste-from-Data-Sources>
      stream-name: default

service:
  pipelines:
    profiles:
      receivers: [profiling]
      exporters: [otlp_http/openobserve]

Do not set service.name in the Collector; it merges every process. Name each process instead:

OTEL_SERVICE_NAME=my-app ./your-app

Linux host, run as root:

sudo ./otelcol-ebpf-profiler --feature-gates=+service.profilesSupport --config=ebpf-profiler-config.yaml

Native symbols

otelcol-ebpf-profiler does not resolve C/C++/Rust symbols on the host. OpenObserve displays the frames it receives. Kernel frames can still show names (vfs_write); userspace stays FileID/native.

opentelemetry-ebpf-profiler#1388 adds an opt-in symtab tracer that reads .symtab on the host (then .dynsym, then a .gnu_debuglink debug file). It is not in otelcol-ebpf-profiler releases yet. After it ships, upgrade the profiler and enable symtab (for example --tracers=all,symtab). Keep the ELF symbol table. For Rust:

# Cargo.toml
[profile.release]
strip = false

strip = true removes .symtab. .dynsym only has exported symbols, so Rust internals still would not resolve. For Rust function names today, use pprof.

Verify in OpenObserve

Go demo:

eBPF profiler CPU flame graph of the Go demo

Rust demo:

eBPF profiler CPU flame graph of the Rust demo

Next steps

Need some help?

Was this page helpful?

Last updated on

On this page