Bringing Application Context to Full-Host eBPF Profiling
- OpenTelemetry
- Java Flight Recorder
- Datadog
- libdatadog
AI Summary
This article details how Datadog and the OpenTelemetry project bridge the gap between low-level, full-host eBPF profilers and high-level application context. Traditional in-process profilers offer deep language runtime visibility at the expense of system-wide consistency, while eBPF profilers capture everything on a host but miss distributed operation context. To solve this, the authors describe a mechanism using Linux named memory mappings, `memfd_create`, `MADV_DONTFORK`, and thread-local storage (TLS) via ELF symbols to safely and efficiently expose request context to out-of-process profilers with minimal performance overhead.
Key Takeaways
- Explains the design tradeoffs between in-process runtime profilers and out-of-process eBPF profiling.
- Details the use of Linux named memory mappings and `memfd_create` for discoverable inter-process communication.
- Covers thread-local storage (TLS) challenges, access models, and language-specific hurdles such as Rust's lack of native dynamic TLS symbol export.
Why it matters
Connecting low-level system performance metrics with high-level application endpoints is critical for effective observability. This architectural approach demonstrates how to bridge the gap between kernel-level eBPF tracing and application runtimes without incurring heavy performance penalties.
Conversation0
What would you add from your experience?
Checking your session…
Every good conversation starts with one perspective.