Menu
Datadog Blog·December 1, 2026

Architecting Full-Host eBPF Profiling with OpenTelemetry Process Context Sharing

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 Blog

The Observability Gap Between Kernel and Application

Full-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.

OpenTelemetry Process and Thread Context Sharing

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.

  • Zero-instrumentation overhead for core application logic
  • Deterministic mapping between OS thread IDs and distributed trace spans
  • Low-latency context retrieval directly from eBPF maps
ℹ️

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.

eBPFOpenTelemetryObservabilityPerformance & ScalingDistributed TracingKernel

Comments

Loading comments...

Want the fundamentals behind stories like this? Take the free System Design Academy course with certificate.