DataDog/datadog-agent
By the numbers
Data collected on 2026-04-30 from main at commit f1b64d50.
A quantitative snapshot of the Datadog Agent codebase. Numbers come from git log, find, and direct file inspection. Per-person stats are intentionally excluded; for ownership info see Maintainers.
Size
The Agent is one of Datadog's largest open-source repositories.
xychart-beta horizontal
title "Source files by language"
x-axis ["Go", "Python", "Rust", "C / eBPF"]
y-axis "File count" 0 --> 12000
bar [10495, 523, 88, 66]| Language | Source files |
|---|---|
Go (*.go) |
10,495 |
Python (*.py) |
523 |
Rust (*.rs) |
88 |
C / eBPF (*.c) |
66 |
Markdown (*.md) |
315 |
The Go file count includes tests, generated mocks, and platform-specific shims. Tests typically end in _test.go. Generated mocks live alongside their definitions or under mocks/ subdirectories.
The repository also contains:
- ~50,000+ files total when including BUILD.bazel files, configuration, schemas, and documentation.
- A
LICENSE-3rdparty.csvof about 800 KB enumerating every third-party dependency and its license — a side effect of the Go module sprawl. - A
CHANGELOG.rstof about 730 KB covering ten years of releases.
Top-level layout
| Path | Role | Approximate size |
|---|---|---|
pkg/ |
Shared Go libraries (legacy + current) | ~64 subdirectories at top level |
comp/ |
Component framework bundles | ~48 bundles |
cmd/ |
Binary entry points | 24 binaries |
tasks/ |
Python Invoke tasks | ~80 task modules |
test/ |
Unit, integration, E2E tests | dozens of subtrees |
tools/ |
Development helper binaries | ~12 subtrees |
omnibus/ + packages/ |
Packaging logic | hundreds of files each |
docs/ |
Developer + public documentation | ~315 markdown files |
Activity
The Agent is one of the most active codebases at Datadog.
| Window | Commits |
|---|---|
| Last 90 days | 2,547 |
| Lifetime | 34,158 |
| First commit | 2016-02-09 |
| Latest commit (HEAD) | 2026-04-29 |
That works out to a mean of roughly 28 commits per day over the last quarter. The repo merges close to ten years of history through 2026.
Bot-attributed commits
Roughly 7.7% of the last 90 days of commits were authored by automation bots — renovate[bot], dependabot[bot], github-actions[bot], etc. Concretely: 196 of 2,547 commits (excluding co-authored credits).
A small additional fraction of commits include Co-authored-by: Claude … or Co-authored-by: Claude Opus / Sonnet … trailers, indicating AI-assisted but human-authored work. Five such trailers appear in the last 90 days.
These numbers are a lower bound on automation usage. Inline AI tools like Cursor or Copilot leave no trace in the git history; many commits attributed to humans were likely co-written with an assistant.
Activity hotspots
Tooling for full per-directory churn isn't included in this snapshot, but you can reproduce it with:
git log --since='90 days ago' --pretty=format: --name-only \
| sort | uniq -c | sort -rn | head -20Areas that consistently dominate the recent history (last 90 days):
pkg/network/andpkg/security/— System Probe and CWS see continuous eBPF + protocol work.comp/core/andcomp/forwarder/— ongoing migration frompkg/to the component framework.pkg/trace/— the Trace Agent sees a steady cadence of sampler and concentrator changes.tasks/and.gitlab/— CI changes are very high-frequency in this repo.pkg/logs/— adaptive sampling and source rework.
Languages and ecosystems
The Agent is a polyglot project. Each language plays a different role:
| Language | Where | Why |
|---|---|---|
| Go | Almost everywhere | Primary implementation language, ~95% of source files. |
| Python | tasks/, cmd/agent/dist/checks/, pkg/jmxfetch/ test fixtures |
Invoke build/test/release scripts; runtime check loader (CPython 3); JMX bridge driver. |
| C / C++ | pkg/ebpf/c/, rtloader/, kernel headers |
eBPF programs (kernel side) and the Python runtime loader (CPython embed). |
| Rust | rust/, pkg/dyninst/ adjacent |
Small auxiliary crates for newer subsystems. |
| Bazel Starlark | bazel/rules/, *.bazel files |
Build rules and toolchain definitions. |
| Ruby | omnibus/, chocolatey/ |
Legacy packaging system. |
| Java | (external) jmxfetch.jar |
JMX collection subprocess shipped alongside the Agent. |
Test-to-code ratio
A rough Go-only ratio:
find . -name '*_test.go' -not -path './.git/*' | wc -l # tests
find . -name '*.go' -not -name '*_test.go' -not -path './.git/*' | wc -l # sourceOut of 10,495 total Go files, several thousand have the _test.go suffix. The exact ratio varies wildly by package: pkg/network/, pkg/security/, and pkg/aggregator/ have heavy unit and integration test coverage; many comp/<x>/<y>/fx/ Fx-glue packages have minimal tests by design.
In addition to in-repo Go tests, an entire end-to-end test fleet lives under test/new-e2e/ and provisions real cloud infrastructure (AWS, GCP, Azure). E2E tests use fakeintake (test/fakeintake/) to assert payloads end up where they should.
Configuration surface
- Build tags: ~60+ defined in
tasks/build_tags.py. - Runtime configuration knobs: hundreds of
DD_*environment variables anddatadog.yamlkeys, computed frompkg/config/setup/. The schema is large enough that there is a dedicatedagent createschemasubcommand to dump it. - Feature flags: many features are gated by config keys rather than build tags, allowing operators to disable work at runtime.
Dependency footprint
go.mod is the single largest in the repository (93 KB), with 800 KB) reflects the long tail of indirect dependencies that come with collecting from every cloud provider, container runtime, OTel exporter, and language tracer the project supports.go.sum at ~692 KB. The presence of LICENSE-3rdparty.csv (
For details, see Dependencies.
Things that surprise newcomers
- The Agent is not one binary. The same repo produces 24 binaries under
cmd/. They share Go modules and the component framework but are deployed independently. - A single line of business logic can touch Go, Bazel, eBPF C, Python (Invoke), and YAML (CI) — every change tends to ripple outward.
- The check runtime loads CPython 3 via
rtloader/; that's why the Agent has a CMake build and a C++ ABI in addition to all the Go. - The
tasks/directory has more code than many entire open-source projects.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.