mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: improve sentry handling + upgrade version
This commit is contained in:
parent
58385e4183
commit
0c6ce121b0
5 changed files with 32 additions and 46 deletions
|
|
@ -16,7 +16,7 @@
|
||||||
"@radix-ui/react-icons": "^1.1.1",
|
"@radix-ui/react-icons": "^1.1.1",
|
||||||
"@radix-ui/react-switch": "^1.0.3",
|
"@radix-ui/react-switch": "^1.0.3",
|
||||||
"@radix-ui/react-tooltip": "^1.0.5",
|
"@radix-ui/react-tooltip": "^1.0.5",
|
||||||
"@sentry/nextjs": "^7.92.0",
|
"@sentry/nextjs": "^7.93.0",
|
||||||
"@stitches/react": "^1.2.8",
|
"@stitches/react": "^1.2.8",
|
||||||
"@tiptap/extension-code-block-lowlight": "^2.1.11",
|
"@tiptap/extension-code-block-lowlight": "^2.1.11",
|
||||||
"@tiptap/extension-collaboration": "^2.0.0-beta.199",
|
"@tiptap/extension-collaboration": "^2.0.0-beta.199",
|
||||||
|
|
|
||||||
|
|
@ -4,27 +4,31 @@
|
||||||
|
|
||||||
import * as Sentry from "@sentry/nextjs";
|
import * as Sentry from "@sentry/nextjs";
|
||||||
|
|
||||||
Sentry.init({
|
if (process.env.NODE_ENV !== "development") {
|
||||||
dsn: "https://5a456d54654c494b9a416c19e3b94573@o4505007882436608.ingest.sentry.io/4505008095625216",
|
const DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;
|
||||||
|
|
||||||
// Adjust this value in production, or use tracesSampler for greater control
|
Sentry.init({
|
||||||
tracesSampleRate: 1,
|
dsn: DSN,
|
||||||
|
|
||||||
// Setting this option to true will print useful information to the console while you're setting up Sentry.
|
// Adjust this value in production, or use tracesSampler for greater control
|
||||||
debug: false,
|
tracesSampleRate: 1,
|
||||||
|
|
||||||
replaysOnErrorSampleRate: 1.0,
|
// Setting this option to true will print useful information to the console while you're setting up Sentry.
|
||||||
|
debug: false,
|
||||||
|
|
||||||
// This sets the sample rate to be 10%. You may want this to be 100% while
|
replaysOnErrorSampleRate: 1.0,
|
||||||
// in development and sample at a lower rate in production
|
|
||||||
replaysSessionSampleRate: 0.1,
|
|
||||||
|
|
||||||
// You can remove this option if you're not planning to use the Sentry Session Replay feature:
|
// This sets the sample rate to be 10%. You may want this to be 100% while
|
||||||
integrations: [
|
// in development and sample at a lower rate in production
|
||||||
new Sentry.Replay({
|
replaysSessionSampleRate: 0.1,
|
||||||
// Additional Replay configuration goes in here, for example:
|
|
||||||
maskAllText: true,
|
// You can remove this option if you're not planning to use the Sentry Session Replay feature:
|
||||||
blockAllMedia: true,
|
integrations: [
|
||||||
}),
|
new Sentry.Replay({
|
||||||
],
|
// Additional Replay configuration goes in here, for example:
|
||||||
});
|
maskAllText: true,
|
||||||
|
blockAllMedia: true,
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
// 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: "https://5a456d54654c494b9a416c19e3b94573@o4505007882436608.ingest.sentry.io/4505008095625216",
|
|
||||||
|
|
||||||
// Adjust this value in production, or use tracesSampler for greater control
|
|
||||||
tracesSampleRate: 1,
|
|
||||||
|
|
||||||
// Setting this option to true will print useful information to the console while you're setting up Sentry.
|
|
||||||
debug: false,
|
|
||||||
});
|
|
||||||
|
|
@ -4,12 +4,10 @@
|
||||||
|
|
||||||
import * as Sentry from "@sentry/nextjs";
|
import * as Sentry from "@sentry/nextjs";
|
||||||
|
|
||||||
Sentry.init({
|
if (process.env.NODE_ENV !== "development") {
|
||||||
dsn: "https://5a456d54654c494b9a416c19e3b94573@o4505007882436608.ingest.sentry.io/4505008095625216",
|
const DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;
|
||||||
|
Sentry.init({
|
||||||
// Adjust this value in production, or use tracesSampler for greater control
|
dsn: DSN,
|
||||||
tracesSampleRate: 1,
|
tracesSampleRate: 1.0,
|
||||||
|
});
|
||||||
// Setting this option to true will print useful information to the console while you're setting up Sentry.
|
}
|
||||||
debug: false,
|
|
||||||
});
|
|
||||||
|
|
|
||||||
2
pnpm-lock.yaml
generated
2
pnpm-lock.yaml
generated
|
|
@ -42,7 +42,7 @@ importers:
|
||||||
specifier: ^1.0.5
|
specifier: ^1.0.5
|
||||||
version: 1.0.7(@types/react-dom@18.0.6)(@types/react@18.2.8)(react-dom@18.2.0)(react@18.2.0)
|
version: 1.0.7(@types/react-dom@18.0.6)(@types/react@18.2.8)(react-dom@18.2.0)(react@18.2.0)
|
||||||
'@sentry/nextjs':
|
'@sentry/nextjs':
|
||||||
specifier: ^7.92.0
|
specifier: ^7.93.0
|
||||||
version: 7.93.0(next@14.0.4)(react@18.2.0)
|
version: 7.93.0(next@14.0.4)(react@18.2.0)
|
||||||
'@stitches/react':
|
'@stitches/react':
|
||||||
specifier: ^1.2.8
|
specifier: ^1.2.8
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue