Skip to content

Commit 9368760

Browse files
committed
sentry関連の設定をすべて環境変数に & debugオフ
1 parent 8e6fc66 commit 9368760

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

instrumentation-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as Sentry from "@sentry/nextjs";
22
Sentry.init({
33
enabled: process.env.NODE_ENV !== 'development',
4-
dsn: "https://db719a3358e14ebc86cc975ea04b0dac@bugsink.utcode.net/1",
4+
dsn: process.env.SENTRY_DSN,
55
// Adds request headers and IP for users
66
sendDefaultPii: true,
77
});

next.config.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ const nextConfig: NextConfig = {
1717
typescript: {
1818
ignoreBuildErrors: true,
1919
},
20+
env: {
21+
SENTRY_DSN: process.env.SENTRY_DSN,
22+
},
2023
serverExternalPackages: [
2124
"@prisma/client",
2225
".prisma/client",
@@ -181,10 +184,10 @@ const nextConfig: NextConfig = {
181184
};
182185

183186
export default withSentryConfig(nextConfig, {
184-
org: "bugsinkhasnoorgs",
185-
project: "ignoredfornow",
186-
sentryUrl: "https://bugsink.utcode.net",
187-
debug: true, // important for debugging
187+
org: process.env.SENTRY_ORG,
188+
project: process.env.SENTRY_PROJECT,
189+
sentryUrl: process.env.SENTRY_URL,
190+
// debug: true, // important for debugging
188191

189192
// Use a fixed route (recommended)
190193
tunnelRoute: "/monitoring",

sentry.edge.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as Sentry from "@sentry/nextjs";
22
Sentry.init({
33
enabled: process.env.NODE_ENV !== 'development',
4-
dsn: "https://db719a3358e14ebc86cc975ea04b0dac@bugsink.utcode.net/1",
4+
dsn: process.env.SENTRY_DSN,
55
// Adds request headers and IP for users
66
sendDefaultPii: true,
77
});

sentry.server.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as Sentry from "@sentry/nextjs";
22
Sentry.init({
33
enabled: process.env.NODE_ENV !== 'development',
4-
dsn: "https://db719a3358e14ebc86cc975ea04b0dac@bugsink.utcode.net/1",
4+
dsn: process.env.SENTRY_DSN,
55
// Adds request headers and IP for users
66
sendDefaultPii: true,
77
});

0 commit comments

Comments
 (0)