DataDog/datadog-agent
How to contribute
This section is the practical reference for working in the repository: development workflow, testing, debugging, conventions, and the build tooling.
The canonical sources of truth are:
AGENTS.mdat the repo root — the structured overview that AI assistants are expected to read.CONTRIBUTING.md→docs/public/guidelines/contributing.md.- datadoghq.dev/datadog-agent — the rendered developer site.
The pages in this section summarize the relevant parts of those documents and add context that comes from reading the code.
Subsections
- Development workflow — branches, PRs, merge queue, release notes.
- Testing — unit, integration, E2E, kernel matrix testing.
- Debugging — flares, expvar, pprof, gohai.
- Patterns and conventions —
dda inv-only rule, build tag etiquette, component patterns. - Tooling —
ddaand Invoke task catalog, Bazel, pre-commit, code generation.
Quick reference
| Task | Command |
|---|---|
| Install dev tools | dda inv install-tools |
| Build the core Agent | dda inv agent.build --build-exclude=systemd |
| Run all tests | dda inv test |
| Run tests for one package | dda inv test --targets=./pkg/aggregator |
| Run Go linter | dda inv linter.go |
| Run all linters | dda inv linter.all |
Tidy go.mod and BUILD.bazel |
dda inv tidy |
| Add release note | dda inv release.add-release-note <title> |
| Bazel build (eBPF) | bazel build //pkg/ebpf:all_ebpf_programs |
| Run E2E in one area | dda inv new-e2e-tests.run --targets=./tests/<area>/... |
Definition of done
A change is "done" when:
- It builds for every relevant binary. Use
dda inv *.buildto verify; CI also covers the matrix. dda inv linter.goanddda inv linter.allpass. Pre-commit hooks catch most lint issues locally.- Tests cover the change. Add or update unit tests; if the change affects a user-visible payload, add or update an E2E test (
test/new-e2e/). - Release notes are present. New features and bug fixes go through
dda inv release.add-release-note. - Documentation is updated in the same PR. Code comments, doc-strings,
docs/public/, and anyAGENTS.mdfiles that mention the changed area must reflect the new state. The repo treats stale docs as bugs. - CODEOWNERS-listed teams have approved. The merge queue enforces this.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.