provide-telemetry
2026-03-24
Reset sampling policy between tests; correct config.py docs
2 files · 7+ · 1-
Reset sampling policy in autouse test fixture
2 files changed
conftest.pyAdded reset_sampling_for_tests() call to the reset_logger_state autouse fixture so sampling policy is cleared between testsCLAUDE.mdCorrected config.py description from 'Pydantic models' to 'stdlib @dataclass(slots=True)'
- A test that sets a signal’s sampling rate to 0.0 (e.g. test_rate_zero_never_samples) would cause apply_sampling to drop all events in the next test sharing the same xdist worker, producing empty log output and false passes. Adding reset_sampling_for_tests() to the autouse fixture fixes this cross-test contamination.
remediate
internal
1 file
conftest.py