Commit 4b5ede2
refactor(observability): share TRANSIENT_PROVIDER_HTTP_STATUSES const
Per CodeRabbit review on tinyhumansai#1529: the transient status set (408/429/502/
503/504) was duplicated between providers/ops.rs (typed StatusCode
match) and core/observability.rs (string match in before_send). Extract
a single pub const TRANSIENT_PROVIDER_HTTP_STATUSES: &[u16] so the two
suppression layers stay in lockstep — update here and both call sites
pick it up.
No behavior change: every status that was filtered before is still
filtered; every status that was reported before is still reported. The
before_send filter now parses the status tag as u16 (with the
parse-failure path joining the existing "missing tag" branch — keep,
not drop).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 7c2fa76 commit 4b5ede2
2 files changed
Lines changed: 22 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
23 | 38 | | |
24 | 39 | | |
25 | 40 | | |
| |||
77 | 92 | | |
78 | 93 | | |
79 | 94 | | |
80 | | - | |
| 95 | + | |
| 96 | + | |
81 | 97 | | |
82 | 98 | | |
83 | 99 | | |
84 | 100 | | |
85 | 101 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
90 | 106 | | |
91 | 107 | | |
92 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 157 | + | |
165 | 158 | | |
166 | 159 | | |
167 | 160 | | |
| |||
0 commit comments