Skip to content

Conversation

darccio
Copy link
Member

@darccio darccio commented Oct 17, 2025

What does this PR do?

Modifies TestOnRemoteConfigUpdate to ensure that we replace the pattern below with equivalent require.Equal calls, as the test might pass without running some assertions.

if p, ok := s.context.trace.samplingPriority(); ok && p > 0 {
	require.Equal(t, samplerToDM(samplernames.RuleRate), s.context.trace.propagatingTags[keyDecisionMaker])
}

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running ./scripts/lint.sh locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@darccio darccio requested a review from a team as a code owner October 17, 2025 16:12
@pr-commenter
Copy link

pr-commenter bot commented Oct 17, 2025

Benchmarks

Benchmark execution time: 2025-10-17 16:28:12

Comparing candidate commit c360a52 in PR branch push-rnqtmtwpyluy with baseline commit 585513f in branch main.

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

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Oct 17, 2025

⚠️ Tests

⚠️ Warnings

❄️ 2 New flaky tests detected

TestOnRemoteConfigUpdate from github.com/DataDog/dd-trace-go/v2/ddtrace/tracer (Datadog)
Failed

=== RUN   TestOnRemoteConfigUpdate
--- FAIL: TestOnRemoteConfigUpdate (0.05s)
TestOnRemoteConfigUpdate/DD_TRACE_SAMPLING_RULES=1.0_and_RC_rule_rate=1.0_and_revert from github.com/DataDog/dd-trace-go/v2/ddtrace/tracer (Datadog)
Failed

=== RUN   TestOnRemoteConfigUpdate/DD_TRACE_SAMPLING_RULES=1.0_and_RC_rule_rate=1.0_and_revert
    remote_config_test.go:261: 
        	Error Trace:	D:/a/dd-trace-go/dd-trace-go/ddtrace/tracer/remote_config_test.go:261
        	Error:      	Not equal: 
        	            	expected: -1
        	            	actual  : 2
        	Test:       	TestOnRemoteConfigUpdate/DD_TRACE_SAMPLING_RULES=1.0_and_RC_rule_rate=1.0_and_revert
    --- FAIL: TestOnRemoteConfigUpdate/DD_TRACE_SAMPLING_RULES=1.0_and_RC_rule_rate=1.0_and_revert (0.00s)

ℹ️ Info

🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: c360a52 | Docs | Was this helpful? Give us feedback!

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