Compare commits

...

2 Commits

Author SHA1 Message Date
Aditya Singh
17cda0e7ec Merge branch 'main' into feat/ignore-error 2026-08-10 17:05:31 +05:30
aks07
eba2b6cb9c fix(sentry): drop benign aborted/cancelled requests from error reporting
Aborted/cancelled in-flight requests are not real errors: they happen
when the user navigates away or a superseded request is cancelled.
Filter them in beforeSend so they stop surfacing as Sentry issues:
- axios: ECONNABORTED ("Request aborted"), ERR_CANCELED
- native fetch: AbortError

Clears e.g. SIGNOZ-UI-5A3 and SIGNOZ-UI-1MQ.
2026-08-10 17:02:10 +05:30

View File

@@ -376,7 +376,19 @@ function App(): JSX.Element {
tracesSampleRate: 0, // Ref: https://github.com/SigNoz/platform-pod/issues/2393#issuecomment-4603658055
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
beforeSend(event) {
beforeSend(event, hint) {
const error = hint?.originalException as
| { name?: string; code?: string | number }
| undefined;
// Ignore benign aborted/cancelled requests (axios + fetch).
if (error?.code === 'ERR_CANCELED' || error?.code === 'ECONNABORTED') {
return null;
}
if (error?.name === 'AbortError') {
return null;
}
// Drop the event if its level is 'warning' or 'info'
if (event.level === 'warning' || event.level === 'info') {
return null;