IO-3162 Additional logging improvements.

This commit is contained in:
Patrick Fic
2025-02-28 13:59:48 -08:00
parent ba63e8054f
commit c0ffda27cf
4 changed files with 71 additions and 58 deletions

View File

@@ -1,14 +1,29 @@
import * as Sentry from "@sentry/react";
import { excludeGraphQLFetch } from "apollo-link-sentry";
import { useEffect } from "react";
import { createRoutesFromChildren, matchRoutes, useLocation, useNavigationType } from "react-router-dom";
import InstanceRenderManager from "./instanceRenderMgr";
const currentDatePST = new Date()
.toLocaleDateString("en-US", {
timeZone: "America/Los_Angeles",
year: "numeric",
month: "2-digit",
day: "2-digit"
})
.split("/")
.reverse()
.join("-");
const sentryRelease =
`${import.meta.env.VITE_APP_IS_TEST ? "test" : "production"}-${currentDatePST}-${process.env.VITE_GIT_COMMIT_HASH}`.trim();
//if (import.meta.env.PROD) {
Sentry.init({
dsn: InstanceRenderManager({
imex: "https://fd7e89369b6b4bdc9c6c4c9f22fa4ee4@o492140.ingest.sentry.io/5651027",
rome: "https://a6acc91c073e414196014b8484627a61@o492140.ingest.sentry.io/4504561071161344"
}),
release: sentryRelease,
ignoreErrors: [
"ResizeObserver loop",
@@ -28,22 +43,10 @@ Sentry.init({
createRoutesFromChildren,
matchRoutes
}),
Sentry.replayIntegration()
Sentry.replayIntegration(),
Sentry.browserProfilingIntegration()
],
// integrations: [
// Sentry.reactRouterV6BrowserTracingIntegration({
// useEffect,
// useLocation,
// useNavigationType,
// createRoutesFromChildren,
// matchRoutes
// }),
// Sentry.replayIntegration({
// maskAllText: false,
// blockAllMedia: true
// }),
// Sentry.browserTracingIntegration()
// ],
tracePropagationTargets: [
"api.imex.online",
"api.test.imex.online",
@@ -55,6 +58,6 @@ Sentry.init({
tracesSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
environment: import.meta.env.MODE,
//debug: import.meta.env.DEV
beforeBreadcrumb: excludeGraphQLFetch
});
//}