Commit graph

4 commits

Author SHA1 Message Date
Gabriel Dos Santos
04214c73fe
feat(config): Add sensitive schema keyword and IsSensitive config API (#59480)
### What does this PR do?

Implements the `sensitive` schema keyword (as documented in `doc/reference/agent-schema/keywords.md`, but unused until now):

- **Schema:** `sensitive: true` on a setting (default `false`). `schema.lint` checks it's a boolean on a setting node.
- **Config API:** `IsSensitive(key)` and `FilterSensitiveEnvVars(envVars)` (drops the env vars bound to sensitive settings) on `model.Reader`, and `SetSensitive(key)` on `model.Setup`. The set of env vars bound to sensitive settings is computed once when the schema is built and stays internal.
- **Linter:** a `forbidigo` rule rejects `SetSensitive` calls outside the generated settings code (and `nodetreemodel`, which tests it).

<details>
<summary>All 66 settings marked <code>sensitive: true</code></summary>

- `additional_endpoints`
- `agent_telemetry.additional_endpoints`
- `api_key`
- `apm_config.additional_endpoints`
- `apm_config.debugger_additional_endpoints`
- `apm_config.debugger_api_key`
- `apm_config.debugger_diagnostics_additional_endpoints`
- `apm_config.debugger_diagnostics_api_key`
- `apm_config.profiling_additional_endpoints`
- `apm_config.symdb_additional_endpoints`
- `apm_config.symdb_api_key`
- `apm_config.telemetry.additional_endpoints`
- `app_key`
- `autoscaling.endpoint.api_key`
- `cloud_foundry_cc.client_secret`
- `cluster_agent.auth_token`
- `compliance_config.endpoints.additional_endpoints`
- `config_files_discovery.forwarder.additional_endpoints`
- `container_image.additional_endpoints`
- `container_lifecycle.additional_endpoints`
- `data_observability.forwarder.additional_endpoints`
- `data_streams.forwarder.additional_endpoints`
- `database_monitoring.activity.additional_endpoints`
- `database_monitoring.metrics.additional_endpoints`
- `database_monitoring.samples.additional_endpoints`
- `event_management.forwarder.additional_endpoints`
- `evp_proxy_config.additional_endpoints`
- `evp_proxy_config.api_key`
- `external_metrics_provider.api_key`
- `external_metrics_provider.app_key`
- `genresources.additional_endpoints`
- `installer.registry.auth`
- `installer.registry.password`
- `kubeactions.forwarder.additional_endpoints`
- `logs_config.additional_endpoints`
- `logs_config.api_key`
- `multi_region_failover.api_key`
- `network_devices.autodiscovery.configs`
- `network_devices.config_management.forwarder.additional_endpoints`
- `network_devices.metadata.additional_endpoints`
- `network_devices.netflow.forwarder.additional_endpoints`
- `network_devices.snmp_traps.community_strings`
- `network_devices.snmp_traps.forwarder.additional_endpoints`
- `network_devices.snmp_traps.users`
- `network_path.forwarder.additional_endpoints`
- `network_pcap.forwarder.additional_endpoints`
- `ol_proxy_config.additional_endpoints`
- `ol_proxy_config.api_key`
- `orchestrator_explorer.orchestrator_additional_endpoints`
- `private_action_runner.credentials.values`
- `private_action_runner.opms_extra_headers`
- `private_action_runner.private_key`
- `process_config.additional_endpoints`
- `process_config.orchestrator_additional_endpoints`
- `proxy.http`
- `proxy.https`
- `remote_configuration.api_key`
- `runtime_security_config.activity_dump.remote_storage.endpoints.additional_endpoints`
- `runtime_security_config.endpoints.additional_endpoints`
- `sbom.additional_endpoints`
- `sds_result.forwarder.additional_endpoints`
- `security_agent.internal_profiling.api_key`
- `service_discovery.forwarder.additional_endpoints`
- `software_inventory.forwarder.additional_endpoints`
- `synthetics.forwarder.additional_endpoints`
- `system_probe_config.internal_profiling.api_key`

</details>

### Motivation

Gives the config one explicit source of truth for which settings hold credentials, instead of each consumer guessing from key names. For example, the scrubber's key rules miss `apm_config.symdb_additional_endpoints` and the other prefixed `*_additional_endpoints`, `proxy.*` and `installer.registry.auth`. Consumers like the scrubber or Autodiscovery can build on this in follow-ups.

### Additional Notes

The tagged list is a first pass for agent-configuration to review; `secret_backend_config` and `multi_secret_backends` can embed backend credentials and may need tagging too. `proxy.*` is tagged, but the schema declares it without env vars (`DD_PROXY_*` is read in code), so `FilterSensitiveEnvVars()` doesn't remove those.

🤖 Generated with [Claude Code](https://claude.com/claude-code)






Co-authored-by: gabe.dossantos <gabe.dossantos@datadoghq.com>
2026-11-09 21:47:04 +00:00
Joseph Gette
27c142d87e
Merge the consul, etcd and zk go build tags into kvstore (#57157)
### What does this PR do?

Replaces the `consul`, `etcd` and `zk` Go build tags with a single `kvstore` tag. It gates the Consul, etcd and ZooKeeper autodiscovery config providers in `comp/core/autodiscovery/providers` and their no-op stubs.

### Motivation

The three tags are always set together (agent, FIPS and Heroku flavors) and never apart, so they add constraint noise without selecting anything on their own. They can't simply be dropped: the IoT agent and the cluster agents rely on the no-op stubs to avoid linking the three clients.

### Describe how you validated your changes

`go list -deps` with each side's own tags is identical to main for agent (linux, windows), fips, heroku, iot, cluster-agent and cluster-agent-cloudfoundry. The CI go-deps report will show false diffs until #57105 merges.

Co-authored-by: joseph.gette <joseph.gette@datadoghq.com>
2026-10-06 08:18:05 +00:00
Joseph Gette
3df4718c9c
Collapse zlib and zstd go build tags (#54501)
### What does this PR do?

Removes the `zstd` Go build tag and gates on `zlib` alone. The compression selector goes from three variants to two (`zlib.go` / `no-zlib.go`); `zlib-no-zstd.go` is deleted.

### Motivation

`zstd` was set in exactly the same builds as `zlib`, and no `!zlib && zstd` variant existed, so the tag never selected anything on its own. The zstd implementation stays: `comp/trace/compression/fx-zstd` and `pkg/serverless/trace` import it without any tag.

### Describe how you validated your changes

`go list -deps` with each side's own tags is identical to main for agent (linux, windows), dogstatsd and serverless-init. The CI go-deps report on this PR will show a false `impl-zstd` addition until #57105 merges.

Co-authored-by: joseph.gette <joseph.gette@datadoghq.com>
2026-10-01 17:06:07 +00:00
Ofek Lev
47e5a39d12
Move dev docs to a dedicated root directory (#56908)
### What does this PR do?

Moves the maintained Datadog Agent developer documentation from `docs/public/` to `doc/`, together with its site support files. Published page URLs stay the same.

### Motivation

AI coding agents use repository documentation to guide their changes. Moving maintained guidance into `doc/` gives them one directory to consult, with unfinished and deprecated pages kept in `docs/` until they are reviewed for incorporation or removal.

### Describe how you validated your changes

```text
$ dda run docs build
Syncing dependencies
Build started
No issues found
Build finished in 3.80s

$ dda run docs check-links
🔍 6852 Total (in 973ms) 🔗 989 Unique ✅ 6566 OK 🚫 0 Errors 👻 200 Excluded ⛔ 86 Unsupported


$ dda inv linter.docs-links
Synchronizing dependencies
The documentation references this repository properly

$ dda inv invoke-unit-tests.run --tests=docs_repo_links,docs_links
Synchronizing dependencies
................................
----------------------------------------------------------------------
Ran 32 tests in 0.087s

OK
...
----------------------------------------------------------------------
Ran 3 tests in 0.024s

OK
Running tests from module docs_repo_links_tests

Running tests from module docs_links_tests
```

### Additional Notes

`docs/README.md` lists every retained page and its reason. Unpublished pages, deprecated component guidance, and empty placeholders remain temporarily while their content is reviewed for removal or incorporation.

Co-authored-by: ofek.lev <ofek.lev@datadoghq.com>
2026-09-25 15:18:19 +00:00