Bringing application context to full-host eBPF profiling
OpenTelemetry now has two accepted OTEPs letting full-host eBPF profilers recover application context that out-of-process sampling cannot see. Process context (OTEP 4719) publishes resource attributes such as service.name and instance ID as a protobuf payload in a named `OTEL_CTX` memory mapping created via memfd_create/prctl with MADV_DONTFORK. Profilers find it through /proc/<pid>/maps and read it with process_vm_readv, using a seqlock-style update marker for consistent reads. Thread context (OTEP 4947) exposes a compact record of 28 required bytes, usually fitting in one 64-byte cache line, through an ELF TLS symbol `otel_thread_ctx_v1`, so span attach/detach costs little more than swapping one thread-local pointer; an initial JNI-based Java path costing ~146 ns per update showed why this mattered.
Related posts
- Making Rust observability reliable at scale with OpenTelemetry
Datadog Engineering mediumAdeptDatadog built dd-trace-rs, an opinionated Rust tracer on top of the OpenTelemetry Rust SDK, to fix fragmented traces, inconsistent sampling and context loss across Rust services. Upstream, they rewrote OpenTelemetry's active-context slot as a stack that tolerates out-of-order and overlapping scopes, which made some context operations 2–4x faster. They also fixed the tracing-opentelemetry bridge and a tracing subscriber callback bug so OpenTelemetry spans attach correctly inside tracing spans. On the Datadog side, a custom sampler defers keep/drop decisions and a span processor flushes whole trace chunks, emitting statistics for dropped spans; together these cut ingestion volume 20x while tripling indexed spans per service.
- Hardening eBPF for runtime security: Lessons from Datadog Workload Protection
Datadog Engineering hardMasterFive years of running Datadog Workload Protection, an eBPF-based runtime security agent supporting kernels from 4.15 to 6.18, distilled into six production lessons. They cover getting programs to load, attach and keep firing across kernels and distributions; capturing and enriching data correctly; auditing eBPF use to reduce attack surface; coexisting with other eBPF users on a host; controlling performance cost; and shipping changes safely. Concrete pitfalls include verifier differences between kernels, inlined or renamed hook points, missed 32-bit compat syscalls and per-syscall tracepoints, and gaps from io_uring, openat2 and unusual exec paths like binfmt_misc. Mitigations include a CI matrix of tested kernels, the shared open source ebpf-manager Go library that refuses to start without a minimal set of loaded programs, and wrappers that hide verifier quirks.
- Strobelight: A profiling service built on open source technology
Meta Engineering mediumAdeptStrobelight is Meta's fleet-wide profiling orchestrator, running 42 profilers (mostly eBPF-based, plus ad-hoc bpftrace scripts) on every production host with safeguards against PMU counter conflicts, concurrency limits and queuing. Default continuous profiling uses dynamic sampling that retunes run probability daily per service to hit target sample counts, with sample weights normalizing data for cross-host and cross-service comparison. LBR data feeds Meta's FDO pipeline (CSSPGO and BOLT), cutting CPU cycles up to 20% for top services, and one efficiency win alone saved an estimated 15,000 servers annually. Stack Schemas and thread-local Strobemeta enrich stacks with tags and request metadata, while a centralized symbolization service built on DWARF, gsym and blazesym avoids on-host debug-info parsing, relying on frame pointers in all user-space binaries.
- Scaling real-time file monitoring with eBPF: How we filtered billions of kernel events per minute
Datadog Engineering mediumAdeptDatadog built file integrity monitoring on eBPF to capture file changes with process and container context, which periodic scans, inotify and auditd could not provide at scale. Their infrastructure produces over 10 billion file events per minute at roughly 5 KB each. Agent-side rule matching cuts what reaches the backend to about one million events per minute. In-kernel prefiltering goes further: static approvers are derived from detection rules, and dynamic discarders are pushed at runtime into LRU eBPF maps. Together they drop up to 94% of events before they hit the ring buffer, which lowers CPU use and prevents dropped events.
- Client Tracing: Understanding Mobile and Desktop Application Performance at Scale
Slack Engineering mediumAdeptSlack extended its backend distributed tracing to iOS, Android and JavaScript clients so engineers could pinpoint why client actions like channel switches are slow. API calls are broken into queue, HTTP request and parse spans, with trace IDs propagated in HTTP headers to join client and server spans. SQLite access is split into wait, execute and save spans, and a general view-load trace schema covers cache-then-network screens. Slack built its own Swift/Kotlin/JS tracing API instead of OpenTracing because thread-local context breaks on highly concurrent mobile code. The API passes an explicit TraceContext, samples traces (1% of API requests), and flushes open traces when the app is backgrounded.