Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
@@ -14,6 +14,7 @@
|
||||
* @see docs/improvement-plan/02-observability/sentry-wiring-web.md (Step 2)
|
||||
*/
|
||||
import * as Sentry from "@sentry/react-router";
|
||||
import { sanitizeSentryEvent } from "@hivegrid/error-reporter";
|
||||
|
||||
export interface ClientSentryConfig {
|
||||
dsn: string | undefined;
|
||||
@@ -81,19 +82,16 @@ export function initSentryClient(config: ClientSentryConfig = readClientSentryCo
|
||||
sendDefaultPii: false,
|
||||
integrations: [
|
||||
Sentry.reactRouterTracingIntegration(),
|
||||
Sentry.replayIntegration({
|
||||
maskAllInputs: true,
|
||||
maskAllText: false,
|
||||
blockAllMedia: false,
|
||||
}),
|
||||
],
|
||||
// Strip sensitive query-strings (`?token=...`, `?code=...`) from
|
||||
// transaction URLs before they are sent to Sentry.
|
||||
beforeSend(event) {
|
||||
return sanitizeSentryEvent(event as unknown as Record<string, unknown>) as typeof event | null;
|
||||
},
|
||||
beforeSendTransaction(event) {
|
||||
if (event.request?.url) {
|
||||
event.request.url = scrubSensitiveQueryParams(event.request.url);
|
||||
}
|
||||
return event;
|
||||
return sanitizeSentryEvent(event as unknown as Record<string, unknown>) as typeof event | null;
|
||||
},
|
||||
beforeBreadcrumb(breadcrumb) {
|
||||
const sanitized = sanitizeSentryEvent({ breadcrumbs: [breadcrumb] });
|
||||
return (sanitized?.breadcrumbs as Array<typeof breadcrumb> | undefined)?.[0] ?? null;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user