Skip to content

docs: add configuration policy guidance#8429

Open
ADITYA-CODE-SOURCE wants to merge 1 commit into
open-telemetry:mainfrom
ADITYA-CODE-SOURCE:issue-8300-config-policy-doc
Open

docs: add configuration policy guidance#8429
ADITYA-CODE-SOURCE wants to merge 1 commit into
open-telemetry:mainfrom
ADITYA-CODE-SOURCE:issue-8300-config-policy-doc

Conversation

@ADITYA-CODE-SOURCE
Copy link
Copy Markdown
Contributor

Fixes #8300.

Why

  • We have an established convention around adding sys props / env vars and keeping declarative config aligned, but it is not documented in the knowledge base.
  • Contributors need a clear place to look when proposing configuration changes.

What

  • add docs/knowledge/configuration-policy.md documenting the configuration policy
  • document that new env vars / sys props should be added judiciously
  • document that declarative config should remain a strict superset of env/sysprop configuration
  • add the new guidance to docs/knowledge/README.md so it is discoverable from the knowledge index

Testing

  • ./gradlew --no-daemon --max-workers=1 -Dorg.gradle.jvmargs="-Xmx512m -XX:MaxMetaspaceSize=192m" spotlessCheck

@ADITYA-CODE-SOURCE ADITYA-CODE-SOURCE requested a review from a team as a code owner May 27, 2026 14:31
Comment thread docs/knowledge/README.md Outdated
| [other-tasks.md](other-tasks.md) | Dev environment setup, benchmarks, composite builds, native image tests, OTLP protobuf updates |
| File | Load when |
|------------------------------------------------|------------------------------------------------------------------------------------------------|
| [configuration-policy.md](configuration-policy.md) | Configuration changes, env vars/system properties, declarative config |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking at the comment posted by @jack-berg , this content could be a part of the api-design.md file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes I think api-design.md is appropriate. Config IS part of our API.

Comment thread docs/knowledge/configuration-policy.md Outdated
Declarative config should remain a strict superset of environment variable and system property
configuration.

If a change adds a new environment variable or system property, it should also add equivalent
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would imagine this issue would require stronger language:

..., it **must** also add equivalent declarative config support. 

Comment thread docs/knowledge/configuration-policy.md Outdated
## PR expectations for configuration changes

PRs that add configuration should include:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: start bullet points with Capital letters.

Comment thread docs/knowledge/configuration-policy.md Outdated
PRs that add configuration should include:

- the motivation for introducing new configuration
- the environment variable and system property names, if any
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Is 'if any' required?

This policy would be in-effect only if the environment variables and system properties are added, correct?

Comment thread docs/knowledge/configuration-policy.md Outdated

- the motivation for introducing new configuration
- the environment variable and system property names, if any
- the equivalent declarative config form, where applicable
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Similarly, if declarative config is supposed to be a strict superset, IMO, the 'where applicable' should be dropped because it will always be applicable.

Let me know if you feel this is wrong.

Comment thread docs/knowledge/configuration-policy.md Outdated
- the equivalent declarative config form, where applicable
- tests and documentation updates covering the new configuration path

## Use judgment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IMO, this should be towards the top as it should be the first step when considering adding new config options.

Comment thread docs/knowledge/configuration-policy.md Outdated

## PR expectations for configuration changes

PRs that add configuration should include:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion:

PRs that introduce new configuration options should include: 

@ADITYA-CODE-SOURCE ADITYA-CODE-SOURCE force-pushed the issue-8300-config-policy-doc branch from 57a49f8 to b5df7fb Compare May 29, 2026 16:40
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.96%. Comparing base (2f1d950) to head (b5df7fb).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8429   +/-   ##
=========================================
  Coverage     90.96%   90.96%           
  Complexity     7809     7809           
=========================================
  Files           892      892           
  Lines         23702    23702           
  Branches       2361     2361           
=========================================
  Hits          21561    21561           
  Misses         1420     1420           
  Partials        721      721           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ADITYA-CODE-SOURCE
Copy link
Copy Markdown
Contributor Author

@psx95 @jack-berg Updated — moved guidance into api-design.md, addressed all wording nits.
Rebased onto latest main and re-ran spotlessCheck.

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.

Document policy about adding new sys props / env vars and declarative config

3 participants