Skip to content

fix(tests): remove stale _dd.compute_stats:1 assertion from logs integration test#1136

Merged
duncanista merged 1 commit into
mainfrom
tianning.li/SVLS-8767
Mar 27, 2026
Merged

fix(tests): remove stale _dd.compute_stats:1 assertion from logs integration test#1136
duncanista merged 1 commit into
mainfrom
tianning.li/SVLS-8767

Conversation

@litianningdatadog

@litianningdatadog litianningdatadog commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

https://datadoghq.atlassian.net/browse/SVLS-8767

Summary

  • _dd.compute_stats was moved from general log tags to trace-only payloads in commit 55659d93
  • The test_logs integration test mock still required _dd.compute_stats:1 in the log body
  • The mock never matched → httpmock returned non-2xx → Flusher::send() retried infinitely → test hung forever

Test plan

  • cargo test --test logs_integration_test test_logs passes and completes in < 1s

🤖 Generated with Claude Code

…gration test

The _dd.compute_stats tag was moved from general log tags to trace-only
payloads in commit 55659d9. The integration test mock still required
this tag in the log body, causing the mock to never match, which triggered
an infinite retry loop in Flusher::send() and hung the test indefinitely.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes a hanging test_logs integration test by updating the httpmock request matcher to stop expecting a trace-only tag (_dd.compute_stats:1) in the logs payload.

Changes:

  • Remove the _dd.compute_stats:1 body assertion from the logs intake mock.
  • Eliminate the now-unused regexp_compute_state variable from the test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@duncanista
duncanista merged commit 672f268 into main Mar 27, 2026
55 checks passed
@duncanista
duncanista deleted the tianning.li/SVLS-8767 branch March 27, 2026 21:08
duncanista added a commit that referenced this pull request Apr 8, 2026
duncanista added a commit that referenced this pull request Apr 9, 2026
…1176)

## Summary

- Reverts #1118 (`feat(traces): [SVLS-8734] respect
Datadog-Client-Computed-Stats header`) which introduced logic to skip
backend stats when the tracer claims client-computed-stats, causing
stats to vanish entirely in some scenarios.
- Reverts #1136 (`fix(tests): remove stale _dd.compute_stats:1 assertion
from logs integration test`) which was a follow-up test adjustment for
#1118.

Restores the pre-v95 behavior where `_dd.compute_stats` is set solely by
`DD_COMPUTE_TRACE_STATS_ON_EXTENSION`, keeping the backend as a safety
net.

## Test plan

- [x] `cargo fmt --check` passes
- [x] `cargo clippy --all-targets -- -D warnings` passes
- [x] `cargo test` — all 513 tests pass

[SVLS-8734]:
https://datadoghq.atlassian.net/browse/SVLS-8734?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
zarirhamza pushed a commit that referenced this pull request Apr 9, 2026
…1176)

- Reverts #1118 (`feat(traces): [SVLS-8734] respect
Datadog-Client-Computed-Stats header`) which introduced logic to skip
backend stats when the tracer claims client-computed-stats, causing
stats to vanish entirely in some scenarios.
- Reverts #1136 (`fix(tests): remove stale _dd.compute_stats:1 assertion
from logs integration test`) which was a follow-up test adjustment for

Restores the pre-v95 behavior where `_dd.compute_stats` is set solely by
`DD_COMPUTE_TRACE_STATS_ON_EXTENSION`, keeping the backend as a safety
net.

- [x] `cargo fmt --check` passes
- [x] `cargo clippy --all-targets -- -D warnings` passes
- [x] `cargo test` — all 513 tests pass

[SVLS-8734]:
https://datadoghq.atlassian.net/browse/SVLS-8734?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
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.

3 participants