Skip to content

POC: Add native C++ stable configuration loader - #375

Draft
pawelchcki wants to merge 3 commits into
mainfrom
stable-config-nors
Draft

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

Conversation

@pawelchcki

@pawelchcki pawelchcki commented Sep 29, 2026 •

Copy link
Copy Markdown

I created alternative PR to #376 - to see how much work it would be to support the stable config without the shared library.

Description

Add an opt-in native C++ stable configuration loader using yaml-cpp 0.9.0. The dependency is pinned for CMake and Bazel, and the CMake install includes its license.

Port local and fleet YAML layering, process selectors, templates, configuration source precedence, config IDs, and telemetry from the Rust-based implementation. Add CMake and Bazel tests plus usage documentation.

Motivation

Provide stable configuration without a Rust toolchain or FFI in dd-trace-cpp builds.

Additional Notes

  • macOS: full CMake suite passed (144 test cases, 199,928 assertions).
  • Bazel stable configuration test passed with Bzlmod and legacy WORKSPACE.
  • Installed CMake consumers passed with static and shared builds.
  • Linux: static target compiled, and an installed consumer matched live process arguments and environment variables.
  • Windows runtime was not exercised.

@pr-commenter

pr-commenter Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-09-29 15:00:44

Comparing candidate commit 03029c9 in PR branch stable-config-nors with baseline commit df496e9 in branch main.

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 ----------------------------------'

@pawelchcki pawelchcki changed the title Add native C++ stable configuration loader POC: Add native C++ stable configuration loader Sep 29, 2026
- Share one lookup context between selectors and templates.
- Parse tags with the same map helper as configuration values.
- Read config files in one sized read.
- Simplify agent URL source ranking and origin selection.
- Merge duplicate trace sampling rule branches.
- Use default arguments instead of extra finalize_config overloads.

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