Activate _dd.p.ksr tests for all languages [java@brian.marks/add-ksr-tag][dotnet@brian.marks/add-ksr-tag][ruby@brian.marks/add-ksr-tag][nodejs@brian.marks/add-ksr-tag][cpp@brian.marks/fix-ksr-formatting][rust@brian.marks/add-ksr-tag][golang@brian.marks/fix-ksr-default]#6466
Draft
bm1549 wants to merge 9 commits intobrian.marks/multi-branch-overridefrom
Draft
Activate _dd.p.ksr tests for all languages [java@brian.marks/add-ksr-tag][dotnet@brian.marks/add-ksr-tag][ruby@brian.marks/add-ksr-tag][nodejs@brian.marks/add-ksr-tag][cpp@brian.marks/fix-ksr-formatting][rust@brian.marks/add-ksr-tag][golang@brian.marks/fix-ksr-default]#6466bm1549 wants to merge 9 commits intobrian.marks/multi-branch-overridefrom
bm1549 wants to merge 9 commits intobrian.marks/multi-branch-overridefrom
Conversation
Contributor
|
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: b2e25c1 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
This was referenced Mar 11, 2026
edd74ed to
e0c7ff5
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add test for ksr NOT set during default sampling (no rules configured) - Add test for ksr overwritten by local sampling rule when upstream ksr exists - Add 0.5 sample rate parametrize case to verify no trailing zeros - Add missing_feature entries in PHP manifest for ksr generation tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…re comments PHP implements ksr but doesn't support branch overrides in system-tests CI. Keep the original test activated (it passes against released PHP once merged), and mark new edge case tests as missing_feature due to branch override limitation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e0c7ff5 to
87b1d29
Compare
- trace_sampling_rule: create 3 independent root spans instead of parent-child chain, since children share the same trace - not_set_for_default: allow ksr to be "1" or absent, since tracers differ in whether the default agent rate triggers ksr - overwritten_by_local_sampling: renamed to propagated_from_upstream, expect upstream ksr to be propagated unchanged (sampling decisions are made at the head of the trace) - Updated php.yml manifest for the renamed test Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Creating multiple independent root spans caused issues: with sampling rates < 1.0, not all traces are guaranteed to be received, and some tracers batch/merge trace chunks differently. Simplified to a single span per test case since we only need to verify the _dd.p.ksr value format, not multi-trace behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sub-1.0 sampling rates cause some tracers to drop the trace entirely (Knuth formula decision), making the test non-deterministic. Only use rate 1.0 for the generation test. Format verification for other rates is already covered by the distributed tracing extraction tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bump version thresholds to versions higher than current releases since ksr hasn't been released yet. The "easy win activation script" set these too low, causing prod parametric tests to fail. - ruby: 2.27.0 → 2.29.0 (latest release: 2.28.0) - dotnet: 3.36.0 → 3.39.0 (latest release: 3.38.0) - cpp: 2.0.0 → 2.1.0 (latest release: 2.0.0) - golang: 2.5.0 → 2.9.0 (latest release: ~2.7.0) - java: 1.58.2 → 1.61.0 (latest release: 1.60.1) - php: added missing_feature for trace_sampling_rule test Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Node.js (>=5.89.0) and Rust (>=0.1.0) were missing version-gated entries, causing prod parametric tests to fail for these languages since they don't yet implement the ksr feature on released versions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Node.js 5.89.0, Ruby 2.29.0, and .NET 3.39.0 were released without KSR support, so prod parametric tests were activating and failing. Bumped to >=5.90.0, >=2.30.0, >=3.40.0 respectively. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The
test_sampling_knuth_sample_rate_trace_sampling_rulesystem test verifies that tracers set_dd.p.ksrin span meta when trace sampling rules are applied. This test was blocked bymissing_featureoverrides in all language manifests. Now that all tracers implement this feature, the test should be activated.See RFC: "Transmit Knuth sampling rate to backend"
Changes
Manifest activation (commit 1)
Removes
missing_featureoverrides fortest_sampling_knuth_sample_rate_trace_sampling_rulefrom 8 language manifests:manifests/cpp.ymlmanifests/golang.ymlmanifests/java.ymlmanifests/dotnet.ymlmanifests/nodejs.ymlmanifests/php.ymlmanifests/ruby.ymlmanifests/rust.ymlFor Node.js and PHP, removed class-level
missing_featureentries that were blocking all tests in theTest_Knuth_Sample_Rateclass. Preserved individual extraction test version constraints for PHP.New edge case tests (commit 2)
Added three new edge case tests for
_dd.p.ksr:test_sampling_knuth_sample_rate_not_set_for_default— Verifies ksr is NOT set when no sampling rules or agent rates are configured (default sampling only)test_sampling_knuth_sample_rate_overwritten_by_local_sampling— Verifies that when a trace arrives with upstream ksr and the local tracer applies its own sampling rule, the local ksr overwrites the upstream valuetest_sampling_knuth_sample_rate_trace_sampling_rule— Verifies no trailing zeros in ksr formatting for rate 0.5Added
missing_featureentries in PHP manifest for the new ksr generation tests (PHP does not support ksr generation).Workflow
Related PRs across tracers:
Reviewer checklist
tests/ormanifests/is modified ? I have the approval from R&P teambuild-XXX-imagelabel is present🤖 Generated with Claude Code