How we built an async-aware Python profiler
Datadog's Python profiler now reconstructs parent-child relationships between asyncio tasks so flame graphs show "stacked stacks": the logical application path rather than independent per-task stacks.
Datadog's Python profiler now reconstructs parent-child relationships between asyncio tasks so flame graphs show "stacked stacks": the logical application path rather than independent per-task stacks.
Datadog's Java APM agent filters uninteresting classes by name during JVM startup using ClassNameTrie, a prefix trie encoded entirely in a single string constant and loaded with one ldc instruction.
JDK 25 adds an experimental JFR CPU-time sampling event (CPUTimeSample) that gives unbiased CPU profiles without relying on the unsupported HotSpot AsyncGetCallTrace API.
A Postgres `INSERT ... ON CONFLICT DO UPDATE ... WHERE` upsert still locks the conflicting row even when the WHERE clause blocks the update.
Datadog cut its Agent's Go binary sizes by up to 77% between versions 7.60.0 and 7.68.0 without removing features.
Five 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.
Datadog 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.
Datadog cut CPU in Go hot paths by removing compiler bounds checks in NormalizeTag (25% faster, 0.75% service CPU) and adding an ASCII fast path to NormalizeTagArbTagValue (90% faster, hundreds of thousands of dollars in projected annual savings), guided by production data showing nearly all inputs were ASCII.
Datadog's sixth-generation real-time timeseries database (RTDB) is a Rust rewrite that unifies two earlier engines, one for scalar metrics and one for DDSketch distributions, after earlier generations built on Cassandra, Redis, MDBM, a Go B+ tree and RocksDB.
Upgrading a data-processing service to Go 1.24 raised container memory by about 20% even though Go runtime metrics and heap profiles stayed flat.
Go 1.24's new map implementation, based on Swiss Tables and extendible hashing, cut roughly 500 MiB of live heap (about 1 GiB of RSS with GOGC=100) from a 3.5-million-entry routing cache map, enough to more than offset a separate Go 1.24 mallocgc memory regression.
Datadog rewrote its AWS Lambda Extension from a Go build of the full Datadog Agent into a purpose-built Rust sidecar (Project Bottlecap), cutting cold start overhead from about 450 ms to 70 ms, memory from 128 MiB to 77 MiB, and binary size from 55 MB to 7 MB.
Husky, Datadog's observability event store layered over object storage, keeps query cost low by controlling fragment count and layout through streaming compaction.
Datadog built a Ruby test impact analysis library for its Intelligent Test Runner that maps each test to the source files it executes, so tests unrelated to a commit's changed files can be skipped, cutting testing time roughly in half.
Datadog rewrote the Codiga static analyzer from Java to Rust after switching its parser from ANTLR to Tree-sitter, whose Java bindings lacked features like pattern matching.
Datadog's .NET continuous profiler measures memory in three ways.
Datadog built DogGraphs, an internal SwiftUI graphing library constrained to iOS 14 (no Canvas), with a result-builder API that type-checks graph compositions at compile time.
Datadog's .NET continuous profiler captures thrown exceptions through ICorProfilerCallback::ExceptionThrown and reads each exception's _message field by resolving System.Exception's ClassID from CoreLib metadata and computing the field offset with GetClassLayout.
Datadog's .NET continuous profiler samples managed threads every 10 ms instead of relying on ETW, perf or enter/leave hooks, which cost too much for 24/7 production use.
Datadog's .NET continuous profiler runs in-process as native C++ and Rust code loaded through the CLR's ICorProfilerCallback interface.
Recurring high-startup-latency pages on every deployment of Datadog's usage estimation `counter` service traced back to four stacked bottlenecks rather than one.
Profiling the Go-based Datadog Agent under heavy DogStatsD load showed that computing a unique context key per metric, especially sorting and deduplicating tags, dominated CPU.
Go 1.18's Linux CPU profiler no longer underestimates CPU bursts on multi-core systems.
Datadog's Containers team made kube-state-metrics usable as a library: an upstream PR made the KSM Builder extensible so the MetricStore could be swapped out, with neutral-to-slightly-better benchmark results.
An auxiliary LatencyReportActor running on Akka's default ForkJoinPool-based dispatcher burned 20-30% of a log-processing service's CPU.
Datadog built an always-on statistical profiler for Python because deterministic profilers like cProfile can add 2-3x overhead, too much for production.