Skip to content

Commit

Permalink
Finish microfrontend set up for chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
adonispuente committed Jun 28, 2024
1 parent e8c0b38 commit 9574d6b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions config/webpack.plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
},
}),
];
};
Expand Down
8 changes: 5 additions & 3 deletions src/utils/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 9574d6b

Please sign in to comment.