Skip to content

chore: add supported configurations#284

Merged
BridgeAR merged 3 commits intomainfrom
dmehala/add-supported-configurations
Mar 2, 2026
Merged

chore: add supported configurations#284
BridgeAR merged 3 commits intomainfrom
dmehala/add-supported-configurations

Conversation

@dmehala
Copy link
Collaborator

@dmehala dmehala commented Feb 27, 2026

Description and Motivation

Read #281

BridgeAR and others added 2 commits February 26, 2026 16:15
The configuration macro is changed to a registry that includes types
and default values next to the configuration names.

This is used for compile time generation instead of using runtime
checks for the configurations (environment variables).

For safety, failing to parse configurations is now going to log a
warning instead. This aligns with other platforms / tracers to not
crash a customer in production where their staging configuration
might be valid and their production one not.

The macro must now be used for any new configuration added and a CI
job verifies that all entries do exist. If a new env is added
otherwise it should fail.

The CI will also verify that the generated file is up to date and
matches the remote registry. It would fail, if either is not the
case.

The behavior change is documented in the README.md.
@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.76%. Comparing base (32898b5) to head (daeb826).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #284      +/-   ##
==========================================
- Coverage   87.78%   87.76%   -0.02%     
==========================================
  Files          84       84              
  Lines        5658     5658              
==========================================
- Hits         4967     4966       -1     
- Misses        691      692       +1     

☔ 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.

@datadog-official
Copy link

datadog-official bot commented Feb 27, 2026

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 87.77% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: daeb826 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Feb 27, 2026

Benchmarks

Benchmark execution time: 2026-02-27 14:55:49

Comparing candidate commit daeb826 in PR branch dmehala/add-supported-configurations with baseline commit 32898b5 in branch main.

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

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

As discussed: I am fine with landing this right now without the additional improvements of the other PR by utilizing them in separate PRs.

The other PR has two benefits: we utilize compile time checks, the developers do not have to handle the type, the configurations are validated as early as possible, and the envs are checked more closely (the check was a bit brittle in the sense that changing the file could also easily break things). The README.md also contains less information here.

@dmehala and me discussed to have follow-up PRs where the configurations are improved a lot including the above improvements.

Comment on lines +5 to +13
if grep -R -n \
--include='*.c' \
--include='*.cc' \
--include='*.cpp' \
--include='*.cxx' \
--include='*.h' \
--include='*.hpp' \
--exclude='environment.cpp' \
'std::getenv' include src; then
Copy link
Member

Choose a reason for hiding this comment

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

As discussed: this is not a sufficient test. Instead, we should use a linter where we are able to utilize an AST to prevent false positives.

Due to the low number of repo contributing people, this should be fine for now.

@BridgeAR BridgeAR merged commit 9118a61 into main Mar 2, 2026
39 checks passed
@BridgeAR BridgeAR deleted the dmehala/add-supported-configurations branch March 2, 2026 12:07
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