-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: 🔧 Configura o Sentry na aplicação
- Loading branch information
Wellington Braga
committed
Aug 27, 2024
1 parent
323e64c
commit 3387dc0
Showing
16 changed files
with
212 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,4 +65,6 @@ coverage/* | |
# Snyk | ||
snyk-linux | ||
|
||
services.sqlite | ||
services.sqlite | ||
# Sentry Config File | ||
.env.sentry-build-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// This file configures the initialization of Sentry on the client. | ||
// The config you add here will be used whenever a users loads a page in their browser. | ||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/ | ||
|
||
import * as Sentry from "@sentry/nextjs"; | ||
|
||
// import * as Spotlight from "@spotlightjs/spotlight"; | ||
|
||
Sentry.init({ | ||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, | ||
|
||
// Adjust this value in production, or use tracesSampler for greater control | ||
tracesSampleRate: | ||
process.env.NEXT_PUBLIC_NODE_ENV === "development" ? 1.0 : 0.8, | ||
|
||
replaysOnErrorSampleRate: | ||
process.env.NEXT_PUBLIC_NODE_ENV === "development" ? 1.0 : 0.8, | ||
|
||
// This sets the sample rate to be 10%. You may want this to be 100% while | ||
// in development and sample at a lower rate in production | ||
replaysSessionSampleRate: | ||
process.env.NEXT_PUBLIC_NODE_ENV === "development" ? 1.0 : 0.8, | ||
|
||
// You can remove this option if you're not planning to use the Sentry Session Replay feature: | ||
integrations: [ | ||
Sentry.replayIntegration({ | ||
// Additional Replay configuration goes in here, for example: | ||
maskAllText: false, | ||
blockAllMedia: false, | ||
}), | ||
], | ||
|
||
environment: process.env.NEXT_PUBLIC_NODE_ENV, | ||
|
||
release: process.env.NEXT_PUBLIC_RELEASE, | ||
|
||
spotlight: process.env.NEXT_PUBLIC_NODE_ENV === "development", | ||
}); | ||
|
||
// if (process.env.NEXT_PUBLIC_NODE_ENV === "development") { | ||
// Spotlight.init(); | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on). | ||
// The config you add here will be used whenever one of the edge features is loaded. | ||
// Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally. | ||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/ | ||
|
||
import * as Sentry from "@sentry/nextjs"; | ||
|
||
Sentry.init({ | ||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, | ||
|
||
// Adjust this value in production, or use tracesSampler for greater control | ||
tracesSampleRate: | ||
process.env.NEXT_PUBLIC_NODE_ENV === "development" ? 1.0 : 0.8, | ||
|
||
environment: process.env.NEXT_PUBLIC_NODE_ENV, | ||
|
||
release: process.env.NEXT_PUBLIC_RELEASE, | ||
|
||
spotlight: process.env.NEXT_PUBLIC_NODE_ENV === "development", | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// This file configures the initialization of Sentry on the server. | ||
// The config you add here will be used whenever the server handles a request. | ||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/ | ||
|
||
import * as Sentry from "@sentry/nextjs"; | ||
|
||
Sentry.init({ | ||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, | ||
|
||
// Adjust this value in production, or use tracesSampler for greater control | ||
tracesSampleRate: | ||
process.env.NEXT_PUBLIC_NODE_ENV === "development" ? 1.0 : 0.8, | ||
|
||
environment: process.env.NEXT_PUBLIC_NODE_ENV, | ||
|
||
release: process.env.NEXT_PUBLIC_RELEASE, | ||
|
||
spotlight: process.env.NEXT_PUBLIC_NODE_ENV === "development", | ||
}); |
Oops, something went wrong.