This article explores the system design and architectural patterns used to bring full-host eBPF profiling into alignment with application telemetry. By leveraging OpenTelemetry process and thread context sharing, engineers can bridge the gap between kernel-level performance profiling and high-level service traces.
Read original on Datadog BlogFull-host eBPF profiling provides unprecedented visibility into CPU cycles, memory allocation, and kernel activity across an entire machine. However, raw eBPF profiles often lack application context, making it difficult to attribute resource consumption to specific microservices, HTTP requests, or distributed traces without significant overhead.
To solve this correlation challenge, systems architects must design a mechanism to pass metadata from the runtime environment down to the Linux kernel or capture it safely at runtime. By integrating OpenTelemetry conventions, threads and processes can publish their current trace ID and span ID contexts to a shared mechanism accessible by eBPF probes.
Architectural Trade-off
While storing trace contexts in eBPF maps provides rapid read access for profilers, it requires careful memory management and eviction policies to prevent map bloat during high-throughput request spikes.
Want the fundamentals behind stories like this? Take the free System Design Academy course with certificate.