Skip to content

feat(tracing): load stable configuration through libdatadog - #376

Open
pawelchcki wants to merge 3 commits into
mainfrom
stable-config
Open

pawelchcki wants to merge 3 commits into
mainfrom
stable-config

Conversation

@pawelchcki

Copy link
Copy Markdown

Summary

  • Pin libdatadog at 4fab32380890733100870a9a87db631a53f9e4ef and call libdd-library-config through a small Rust static library with a manual C ABI.
  • Add an opt-in C++ stable configuration loader for tracing. Values resolve from defaults, local stable configuration, environment variables, fleet stable configuration, and code, in that order. Configuration telemetry records the stable source and config ID.
  • Add CMake packaging and Bazel builds using rules_rs, with tests and usage documentation.

Dependency

Depends on DataDog/libdatadog#1770 for the libdd-library-config reader API used by the pinned submodule.

Testing

  • C++ test suite: 137 test cases, 199879 assertions passed.
  • Bazel: //:stable_config_loader_test passed.
  • cargo check --offline --locked and cargo fmt --check passed for the FFI crate.
  • git diff --check passed.

@pawelchcki
pawelchcki requested review from a team as code owners September 29, 2026 08:24
@pawelchcki
pawelchcki requested review from dubloom and removed request for a team September 29, 2026 08:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T08:33:37.422953Z 0f97c5e PR opened
🔒 Security Review ✅ Completed 2026-09-29T08:30:17.328782Z 0f97c5e PR opened
ℹ️ 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.

@datadog-prod-us1-4

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0f97c5e10b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/datadog/tracer_config.cpp Outdated
Comment thread src/datadog/span_sampler_config.cpp Outdated
Comment thread src/datadog/tracer_config.cpp
Comment thread src/datadog/tracer_config.cpp Outdated
Comment thread cmake/stable_config.cmake
Comment thread src/datadog/trace_sampler_config.cpp Outdated
Comment thread cmake/stable_config.cmake Outdated
@pr-commenter

pr-commenter Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-09-29 09:35:11

Comparing candidate commit 8187422 in PR branch stable-config with baseline commit df496e9 in branch main.

Found 1 performance improvements and 1 performance regressions! Performance is the same for 6 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 ----------------------------------'

scenario:BM_HexPadded_uint64/WorstCasePadding

  • 🟥 execution_time [+1.144µs; +1.370µs] or [+2.482%; +2.974%]

scenario:BM_TraceTinyCCSource

  • 🟩 execution_time [-3.280ms; -2.840ms] or [-3.966%; -3.435%]

This branch has not been deployed

No deployments
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.

1 participant