Skip to content

Conversation

@dmehala
Copy link
Collaborator

@dmehala dmehala commented Aug 16, 2025

This commit refactors the way remote configurations are applied to the tracer. Previously, if a remote configuration contained both valid and invalid fields, the valid parts could be partially applied, potentially leading to inconsistent behavior.

Now, the configuration is only applied if it is fully valid. Any invalid configuration is entirely rejected. This constitutes a breaking change.

This also report errors when an invalid configuration is rejected.

Changes:

  • Add fuzz test and input corpus for Remote Configuration.
  • Fix a crash when telemetry methods are invoked before initializing the module.
  • Improve unit test coverage of remote configuration.

@dmehala dmehala requested a review from a team as a code owner August 16, 2025 21:41
@dmehala dmehala requested review from Anilm3 and zacharycmontoya and removed request for a team August 16, 2025 21:41
@pr-commenter
Copy link

pr-commenter bot commented Aug 16, 2025

Benchmarks

Benchmark execution time: 2025-09-04 09:15:30

Comparing candidate commit 2fb3270 in PR branch dmehala/fix-rc-report-conf-status with baseline commit 274149a in branch main.

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

Copy link
Contributor

@zacharycmontoya zacharycmontoya left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for expanding the tests

Copy link
Contributor

@dubloom dubloom left a comment

Choose a reason for hiding this comment

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

LGTM, i'd be interested to know if all those PRs fix the segmentation fault in istio.

Base automatically changed from dmehala/fix-rc-sampling-2 to main September 3, 2025 09:38
@dmehala
Copy link
Collaborator Author

dmehala commented Sep 3, 2025

@dubloom I doubt the segmentation fault observed in Istio are related. It's worth trying tho.

dmehala and others added 2 commits September 4, 2025 11:12
This commit refactors the way remote configurations are applied
to the tracer. Previously, if a remote configuration contained both
valid and invalid fields, the valid parts could be partially applied,
potentially leading to inconsistent behavior.

Now, the configuration is only applied if it is fully valid. Any invalid
configuration is entirely rejected. This constitutes a breaking change.

This also report errors when an invalid configuration is rejected.

Changes:
  - Add fuzz test and input corpus for Remote Configuration.
  - Fix a crash when telemetry methods are invoked before intializing
    the module.
  - Improve unit test coverage of remote configuration.
Co-authored-by: Zach Montoya <zach.montoya@datadoghq.com>
@dmehala dmehala force-pushed the dmehala/fix-rc-report-conf-status branch from 6d37940 to 2fb3270 Compare September 4, 2025 09:12
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 92.79279% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.44%. Comparing base (274149a) to head (2fb3270).

Files with missing lines Patch % Lines
src/datadog/config_manager.cpp 95.23% 5 Missing ⚠️
src/datadog/telemetry/telemetry.cpp 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #234      +/-   ##
==========================================
+ Coverage   86.63%   87.44%   +0.81%     
==========================================
  Files          83       83              
  Lines        5425     5458      +33     
==========================================
+ Hits         4700     4773      +73     
+ Misses        725      685      -40     

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

@dmehala dmehala merged commit c6185cf into main Sep 4, 2025
24 checks passed
@dmehala dmehala deleted the dmehala/fix-rc-report-conf-status branch September 4, 2025 09:35
}

nlohmann::json to_json(const std::vector<TraceSamplerRule>& rules) {
std::vector<nlohmann::json> j;
Copy link

Choose a reason for hiding this comment

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

Maybe use j.reserve(rules.size()); to avoid possible reallocations?

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.

6 participants