Skip to content

fix(rust): unblock four adaptive-sampling parametric tests#7007

Draft
bm1549 wants to merge 1 commit into
mainfrom
brian.marks/rust-adaptive-sampling-unblock
Draft

fix(rust): unblock four adaptive-sampling parametric tests#7007
bm1549 wants to merge 1 commit into
mainfrom
brian.marks/rust-adaptive-sampling-unblock

Conversation

@bm1549
Copy link
Copy Markdown
Contributor

@bm1549 bm1549 commented May 22, 2026

Motivation

Enables four parametric tests for Rust now that DataDog/dd-trace-rs#227 fixes the underlying precedence and adds DD_TRACE_SAMPLE_RATE support.

What does this PR do?

Removes four missing_feature entries from manifests/rust.yml:

  • TestDynamicConfigSamplingRules::test_trace_sampling_rules_override_rate
  • TestDynamicConfigSamplingRules::test_trace_sampling_rules_with_tags
  • TestDynamicConfigV1::test_trace_sampling_rate_override_env
  • TestDynamicConfigV1::test_trace_sampling_rate_with_sampling_rules

Do not merge before DataDog/dd-trace-rs#227

The parametric scenario runs against both the dd-trace-rs main build (rust dev) and the released crates.io version (rust prod). Both fail on these four tests until dd-trace-rs#227 lands.

Sequence:

  1. Merge dd-trace-rs#227.
  2. Mark this PR ready for review; re-trigger CI. rust dev goes green.
  3. After the next dd-trace-rs release contains the fixes, rust prod also goes green.

Test plan

  • CI confirms the four tests pass against the dd-trace-rs main build after Fix ARM node #227 merges.
  • No other rust manifest entries regress.

Enables tests that now pass with the adaptive-sampling precedence fix
and DD_TRACE_SAMPLE_RATE support shipped in dd-trace-rs PR #227:

- TestDynamicConfigSamplingRules::test_trace_sampling_rules_override_rate
- TestDynamicConfigSamplingRules::test_trace_sampling_rules_with_tags
- TestDynamicConfigV1::test_trace_sampling_rate_override_env
- TestDynamicConfigV1::test_trace_sampling_rate_with_sampling_rules

The Rust tracer now:
- Respects the documented multi-source precedence (env rules survive
  an RC-rate-only update; the synthetic catch-all built from
  tracing_sampling_rate uses default provenance, DM -3).
- Parses DD_TRACE_SAMPLE_RATE as a global catch-all rate.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@bm1549 bm1549 added the ai-generated The pull request includes a significant amount of AI-generated code label May 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/rust.yml                                                      @DataDog/apm-rust

@datadog-datadog-prod-us1-2
Copy link
Copy Markdown

datadog-datadog-prod-us1-2 Bot commented May 22, 2026

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 3 Pipeline jobs failed

Testing the test | System Tests (rust, dev) / parametric / parametric (1)   View in Datadog   GitHub Actions

🔧 Fix in code (Fix with Cursor). 5 failed tests due to assertion errors on the sampling rate.

🧪 5 Tests failed

tests.parametric.test_dynamic_configuration.TestDynamicConfigSamplingRules.test_trace_sampling_rules_override_rate[library_env0, parametric-rust] from system_tests_suite   View in Datadog (Fix with Cursor)
assert 1.0 == 0.9 ± 9.0e-07
  comparison failed
  Obtained: 1.0
  Expected: 0.9 ± 9.0e-07

self = &lt;tests.parametric.test_dynamic_configuration.TestDynamicConfigSamplingRules object at 0x7f899e368b60&gt;
test_agent = &lt;utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7f89699b60f0&gt;
test_library = &lt;utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7f8969b26de0&gt;

    @parametrize(&#34;library_env&#34;, [{**DEFAULT_ENVVARS}])
...
tests.parametric.test_dynamic_configuration.TestDynamicConfigSamplingRules.test_trace_sampling_rules_with_tags[library_env0, parametric-rust] from system_tests_suite   View in Datadog (Fix with Cursor)
assert 0.55 == 0.8 ± 8.0e-07
  comparison failed
  Obtained: 0.55
  Expected: 0.8 ± 8.0e-07

self = &lt;tests.parametric.test_dynamic_configuration.TestDynamicConfigSamplingRules object at 0x7f899e368e60&gt;
test_agent = &lt;utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7f8969820860&gt;
test_library = &lt;utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7f8969822150&gt;

    @parametrize(
...
View all 5 test failures

Testing the test | System Tests (rust, prod) / parametric / parametric (1)   View in Datadog   GitHub Actions

🔧 Fix in code (Fix with Cursor). 5 failed tests due to assertion error in sampling rates. Obtained: 1.0, Expected: 0.9 ± 9.0e-07 at tests/parametric/test_dynamic_configuration.py:234.

🧪 5 Tests failed

tests.parametric.test_dynamic_configuration.TestDynamicConfigSamplingRules.test_trace_sampling_rules_override_rate[library_env0, parametric-rust] from system_tests_suite   View in Datadog (Fix with Cursor)
assert 1.0 == 0.9 ± 9.0e-07
  comparison failed
  Obtained: 1.0
  Expected: 0.9 ± 9.0e-07

self = &lt;tests.parametric.test_dynamic_configuration.TestDynamicConfigSamplingRules object at 0x7fd39aea0860&gt;
test_agent = &lt;utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7fd3661159a0&gt;
test_library = &lt;utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7fd366115010&gt;

    @parametrize(&#34;library_env&#34;, [{**DEFAULT_ENVVARS}])
...
tests.parametric.test_dynamic_configuration.TestDynamicConfigSamplingRules.test_trace_sampling_rules_with_tags[library_env0, parametric-rust] from system_tests_suite   View in Datadog (Fix with Cursor)
assert 0.55 == 0.8 ± 8.0e-07
  comparison failed
  Obtained: 0.55
  Expected: 0.8 ± 8.0e-07

self = &lt;tests.parametric.test_dynamic_configuration.TestDynamicConfigSamplingRules object at 0x7fd39aea0b30&gt;
test_agent = &lt;utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7fd36618db50&gt;
test_library = &lt;utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7fd366081580&gt;

    @parametrize(
...
View all 5 test failures

Testing the test | all-jobs-are-green   View in Datadog   GitHub Actions

🔧 Fix in code (Fix with Cursor). Some CI checks or statuses failed for System Tests (rust, prod) and (rust, dev) check runs.

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a8dc09f | Docs | Datadog PR Page | Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated The pull request includes a significant amount of AI-generated code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant