Commit 8ef14a9
ore: fix OpenTelemetryRateLimitingFilter suppressing every event (#36227)
The filter's `should_log` ran in both `Filter::enabled` and
`Filter::event_enabled`. tracing-subscriber calls both per event for a
per-layer filter: the first call inserted the callsite into
`last_logged`, the second saw it within the backoff window and returned
false — so every OpenTelemetry internal log was dropped, including the
first. Make `enabled` non-mutating and keep the rate-limit decision in
`event_enabled`.
Introduced in #34850 (commit 6e16efb "rate limit opentelemetry
internal logs").
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 92730d3 commit 8ef14a9
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
865 | 865 | | |
866 | 866 | | |
867 | 867 | | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
868 | 873 | | |
869 | 874 | | |
870 | | - | |
| 875 | + | |
871 | 876 | | |
872 | 877 | | |
873 | | - | |
| 878 | + | |
874 | 879 | | |
875 | 880 | | |
876 | 881 | | |
| |||
0 commit comments