Commit 705ffa7
authored
fix: exclude 4xx client errors from Application Insights failures (#2865)
* fix: exclude 4xx client errors from Application Insights failures
Add TelemetryProcessor to mark 4xx responses as success=true.
Only 5xx server errors should appear in the Failures dashboard.
This reduces noise from expected client errors (400 Bad Request,
401 Unauthorized, 404 Not Found) in failure metrics and alerts.
* fix: use correct type for responseCode (string, not number)
Application Insights SDK types define responseCode as string.
Use parseInt() for proper type conversion before comparison.1 parent 485c191 commit 705ffa7
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
29 | 42 | | |
30 | 43 | | |
31 | 44 | | |
| |||
0 commit comments