mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 13:43:03 -05:00
a079f168df
* metricts-sentry * fixes * refactor * mixpanel integration * improvements * improvements * fixes * changeset * fixes * fixes * Update .changeset/few-scissors-sleep.md Co-authored-by: Jordi Sala Morales <jordism91@gmail.com> * Update manifest.json Co-authored-by: Jordi Sala Morales <jordism91@gmail.com> * Update vite.config.ts Co-authored-by: Jordi Sala Morales <jordism91@gmail.com> * fixes * fixes * fixes * lint --------- Co-authored-by: Jordi Sala Morales <jordism91@gmail.com>
16 lines
806 B
TypeScript
16 lines
806 B
TypeScript
import * as Sentry from '@sentry/react';
|
|
|
|
export const initializeSentry = () => {
|
|
if (import.meta.env.VITE_SENTRY_DSN && import.meta.env.PROD) {
|
|
Sentry.init({
|
|
dsn: import.meta.env.VITE_SENTRY_DSN,
|
|
integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration()],
|
|
release: `penpot-exporter@${APP_VERSION}`,
|
|
// Tracing
|
|
tracesSampleRate: 1.0, // Capture 100% of the transactions
|
|
// Session Replay
|
|
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.
|
|
});
|
|
}
|
|
};
|