Skip to content

docs: add a guide for adding or changing a configuration key - #410

Merged
mhlidd merged 3 commits into
mainfrom
matthew.li/agents-md-config-guide
Nov 24, 2026
Merged

mhlidd merged 3 commits into
mainfrom
matthew.li/agents-md-config-guide

Conversation

@mhlidd

@mhlidd mhlidd commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Add docs/configuration_keys.md, a step-by-step guide for adding or changing a configuration key (environment variable). Link it from docs/development.md (which AGENTS.md already points to) and docs/README.md. AGENTS.md is unchanged.

Also:

  • fix the comment in include/datadog/environment.h:
    • supported-configurations.json is at the repo root, not in metadata/.
    • config-inversion writes an empty string for ENV_DEFAULT_RESOLVED_IN_CODE, not the description. With DECIMAL it writes "".
  • fix the Verify supported configurations metadata step in .github/workflows/dev.yml: the error message ran the suggested command through backticks instead of printing it, and diff -u compared the wrong temporary file.

Motivation

Adding a configuration key touches several places: the environment.h list, the reading code, the generated supported-configurations.json, the central configuration registry, and tests. Two CI jobs fail if one is missed. Nothing in the repo described the whole flow. Other dd-trace repos have a similar guide.

Additional Notes

The guide is based on what the code and CI do now. I checked the commands by building config-inversion locally and running it from the repo root. supported-configurations.json is unchanged.

References

Jira ticket:

Contributor Checklist

  • I am the author of this pull request and I own it.
  • I reviewed every line of this pull request.
  • This pull request follows the Contributing Guidelines.

Link it from AGENTS.md and docs/README.md. Fix the environment.h comment: the
generated JSON is at the repo root, and ENV_DEFAULT_RESOLVED_IN_CODE emits an
empty default.
Move the configuration guide link out of AGENTS.md into
docs/development.md, which AGENTS.md already points to. Note that a new
ConfigName goes at the end of the enum.
@mhlidd
mhlidd marked this pull request as ready for review November 20, 2026 21:03
@mhlidd
mhlidd requested review from a team as code owners November 20, 2026 21:03
@mhlidd
mhlidd requested review from zacharycmontoya and removed request for a team November 20, 2026 21:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T21:04:31.310203Z 4b186f9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pr-commenter

pr-commenter Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-11-23 19:00:01

Comparing candidate commit 4f77ad6 in PR branch matthew.li/agents-md-config-guide with baseline commit 2850705 in branch main.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 8 metrics, 0 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The configuration guide matches the repository’s configuration code, metadata generator, and CI definitions. The changes affect documentation and comments only; no actionable issues were identified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 4b186f9

@xlamorlette-datadog xlamorlette-datadog left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is added procedure is to be applied internally, I think it could better fit in the Confluence internal documentation, not in the public documentation which should focus on things useful for all contributors, internal and external. Please give me some time to think about it.

@mhlidd

mhlidd commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

@xlamorlette-datadog The motivation here is that we've seen agents in other repos make changes they shouldn't be making, so the directive here is specifically to ensure that agents don't go rogue. We already have documentation for internal contributors here.

Also, I'd argue that this documentation is necessary for external contributors as well as they can create and modify configs as well. :)

@xlamorlette-datadog xlamorlette-datadog left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great!

Comment thread docs/add_configurations.md Resolved
Comment thread docs/add_configurations.md Resolved
Comment thread docs/add_configurations.md Resolved
Comment thread docs/configuration_keys.md Resolved
Comment thread docs/add_configurations.md Resolved
Comment thread docs/configuration_keys.md Resolved
Comment thread docs/add_configurations.md Resolved
Comment thread docs/add_configurations.md Resolved
Comment thread docs/add_configurations.md Resolved
Comment thread docs/add_configurations.md Resolved
Rename the guide to docs/configuration_keys.md and use the term
"configuration key" from the public documentation. Simplify the
per-component notes, move the development.md section to the bottom, and
fix the error message and diff path in the supported configurations CI
step.
@mhlidd mhlidd changed the title docs: add a guide for adding or changing a configuration docs: add a guide for adding or changing a configuration key Nov 23, 2026
@xlamorlette-datadog
xlamorlette-datadog removed the request for review from zacharycmontoya November 24, 2026 11:25
@mhlidd

mhlidd commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@xlamorlette-datadog Thanks for the suggestions - I resolved them in 4f77ad6.

@mhlidd
mhlidd merged commit 2b9b238 into main Nov 24, 2026
40 checks passed
@mhlidd
mhlidd deleted the matthew.li/agents-md-config-guide branch November 24, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants