From 9574d6b91c2cc79faf0bf769cce68ae554a92f5b Mon Sep 17 00:00:00 2001 From: Adonis Puente Date: Fri, 28 Jun 2024 13:52:23 -0500 Subject: [PATCH] Finish microfrontend set up for chrome --- config/webpack.plugins.js | 6 ++++++ src/utils/sentry.ts | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/config/webpack.plugins.js b/config/webpack.plugins.js index 075c8d131..625b34108 100644 --- a/config/webpack.plugins.js +++ b/config/webpack.plugins.js @@ -92,6 +92,12 @@ const plugins = (dev = false, beta = false, restricted = false) => { authToken: process.env.SENTRY_AUTH_TOKEN, org: 'red-hat-it', project: 'cpin-001-insights', + _experiments: { + moduleMetadata: ({ release }) => ({ + dsn: process.env.SENTRY_DSN, + release, + }), + }, }), ]; }; diff --git a/src/utils/sentry.ts b/src/utils/sentry.ts index f258773b9..f89506974 100644 --- a/src/utils/sentry.ts +++ b/src/utils/sentry.ts @@ -43,8 +43,6 @@ const transport = makeMultiplexedTransport(makeFetchTransport, (args) => { return []; }); -// Actually initialize sentry with the group's api key - // TODO: WE NEED TO RUN THIS AGAINTS PRODUCTION WITH ADVISOR BE IN PROD AFTER MIGRATION -> function initSentry() { if (sentryInitialized) { @@ -72,7 +70,11 @@ function initSentry() { environment: `Prod${appDetails.beta}`, maxBreadcrumbs: 50, attachStacktrace: true, - integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration({ maskAllText: false, maskAllInputs: true })], + integrations: [ + Sentry.browserTracingIntegration(), + Sentry.replayIntegration({ maskAllText: false, maskAllInputs: true }), + SentryBrowser.moduleMetadataIntegration(), + ], tracesSampleRate: 0.2, debug: !!window.localStorage.getItem('chrome:sentry:debug'), replaysOnErrorSampleRate: 1.0,