dd-trace-go
dd-trace-go copied to clipboard
ddtrace/tracer: remove agent_psr when rule_psr is set
What does this PR do?
APMAPI-22 Removes the '_dd.agent_psr' metric when '_dd.rule_psr' is set through sampling rules.
Motivation
The backend currently handles this because there is a precedence rule, but it should be fixed. Impact is sampling “reason” shown to the user in the frontend can be misleading/wrong
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.
- [ ] 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!
Benchmarks
Benchmark execution time: 2024-04-30 12:59:26
Comparing candidate commit 6fa2b0a138a06a525a1c37e6310c60cba9007ecb in PR branch shevchenko/remove-agent_psr-when-rule-sampling
with baseline commit 155ef2d1cc956f50c95ef03518360ffb6f9eecfe in branch main
.
Found 0 performance improvements and 0 performance regressions! Performance is the same for 43 metrics, 1 unstable metrics.