Add and document Agent settings¶
Read the schema overview for node types and the keyword reference for supported fields. Use the interactive wizard to add a setting, or follow the manual steps below.
How do I add a new setting?¶
-
Determine the node type. If the setting holds a value (string, number, boolean, list, or dict that is the value), it is a setting node. If it groups other settings, it is a section node.
-
Choose the correct schema file.
- Settings for
datadog.yamlgo inpkg/config/schema/yaml/core_schema.yaml. - Settings for
system-probe.yamlgo inpkg/config/schema/yaml/system-probe_schema.yaml.
- Settings for
-
Find the correct parent. Locate the
propertiesblock of the parent section node under which the new setting belongs. -
Add the node with the mandatory keywords:
- Setting nodes require
typeand eitherdefaultorplatform_default. - Section nodes require
node_type: sectionandproperties.
- Setting nodes require
-
Add optional keywords as appropriate:
description— strongly encouraged for all settings.env_vars— list explicit env var names if the default (DD_+ uppercase path) is wrong or if aliases are needed.visibility: public— add when the setting should appear in configuration examples and public documentation (see How do I make a setting public?).
Minimal example:
How do I deprecate a setting?¶
Note
An automated setting deprecation workflow is still under development.
How do I make a setting public?¶
-
Write a
descriptionthat explains what the setting does, what the default means, and any caveats. Every public setting must have a description. The description is aimed at users not Agent developers. -
Add
visibility: publicto the setting or section node. -
Make every parent section public too. A setting node with
visibility: publicnested inside a non-public section is invalid. Every section in the path from the root to the setting must also havevisibility: publicand adescription. Without this the schema will be rejected.
The setting will appear in the configuration examples (ex: datadog.yaml.example) the next time the file is regenerated.
How do I document a public setting?¶
-
Write a clear
descriptioncovering:- What the setting does.
- What the default value means in practice.
- Any important caveats or links to external documentation.
-
Use the YAML
|block scalar for multi-line descriptions: -
Set
visibility: publicto include the setting in generated output.
Validate and regenerate¶
Follow the schema workflows to validate your changes and regenerate Go code and configuration examples.