File tree Expand file tree Collapse file tree 8 files changed +35
-8
lines changed
hash-integration-worker/src Expand file tree Collapse file tree 8 files changed +35
-8
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ import * as Sentry from "@sentry/node";
55Sentry . init ( {
66 dsn : process . env . HASH_TEMPORAL_WORKER_AI_SENTRY_DSN ,
77 enabled : ! ! process . env . HASH_TEMPORAL_WORKER_AI_SENTRY_DSN ,
8+ environment :
9+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
10+ process . env . SENTRY_ENVIRONMENT ||
11+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
12+ process . env . ENVIRONMENT ||
13+ ( process . env . NODE_ENV === "production" ? "production" : "development" ) ,
814 tracesSampleRate : process . env . NODE_ENV === "production" ? 1.0 : 0 ,
915} ) ;
1016
Original file line number Diff line number Diff line change @@ -20,7 +20,10 @@ const sentryDsn = process.env.NODE_API_SENTRY_DSN;
2020Sentry . init ( {
2121 dsn : sentryDsn ,
2222 enabled : ! ! sentryDsn ,
23- environment : isProdEnv ? "production" : "development" ,
23+ environment :
24+ process . env . SENTRY_ENVIRONMENT ||
25+ process . env . ENVIRONMENT ||
26+ ( isProdEnv ? "production" : "development" ) ,
2427 sendDefaultPii : true ,
2528 tracesSampleRate : isProdEnv ? 1.0 : 0 ,
2629} ) ;
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ import { buildStamp } from "./buildstamp";
77import { isProduction } from "./src/lib/config" ;
88import {
99 SENTRY_DSN ,
10+ SENTRY_ENVIRONMENT ,
1011 SENTRY_REPLAYS_SESSION_SAMPLE_RATE ,
11- VERCEL_ENV ,
1212} from "./src/lib/public-env" ;
1313
1414Sentry . init ( {
1515 dsn : SENTRY_DSN ,
1616 enabled : ! ! SENTRY_DSN ,
17- environment : VERCEL_ENV || "development" ,
17+ environment : SENTRY_ENVIRONMENT ,
1818 integrations : [
1919 Sentry . browserApiErrorsIntegration ( ) ,
2020 Sentry . browserProfilingIntegration ( ) ,
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ process.env.NEXT_PUBLIC_API_ORIGIN =
4646 process . env . API_ORIGIN ?? "http://localhost:5001" ;
4747
4848process . env . NEXT_PUBLIC_SENTRY_DSN = process . env . SENTRY_DSN ?? "" ;
49+ process . env . NEXT_PUBLIC_ENVIRONMENT = process . env . ENVIRONMENT ?? "" ;
50+ process . env . NEXT_PUBLIC_SENTRY_ENVIRONMENT =
51+ process . env . SENTRY_ENVIRONMENT ?? "" ;
4952process . env . NEXT_PUBLIC_SENTRY_REPLAY_SESSION_SAMPLE_RATE =
5053 process . env . SENTRY_REPLAY_SESSION_SAMPLE_RATE ?? "1" ;
5154
Original file line number Diff line number Diff line change @@ -2,12 +2,12 @@ import * as Sentry from "@sentry/nextjs";
22
33import { buildStamp } from "./buildstamp" ;
44import { isProduction } from "./src/lib/config" ;
5- import { SENTRY_DSN , VERCEL_ENV } from "./src/lib/public-env" ;
5+ import { SENTRY_DSN , SENTRY_ENVIRONMENT } from "./src/lib/public-env" ;
66
77Sentry . init ( {
88 dsn : SENTRY_DSN ,
99 enabled : ! ! SENTRY_DSN ,
10- environment : VERCEL_ENV || "development" ,
10+ environment : SENTRY_ENVIRONMENT ,
1111 release : buildStamp ,
1212 sendDefaultPii : true ,
1313 // release is set in next.config.js in the Sentry webpack plugin
Original file line number Diff line number Diff line change @@ -2,12 +2,12 @@ import * as Sentry from "@sentry/nextjs";
22
33import { buildStamp } from "./buildstamp" ;
44import { isProduction } from "./src/lib/config" ;
5- import { SENTRY_DSN , VERCEL_ENV } from "./src/lib/public-env" ;
5+ import { SENTRY_DSN , SENTRY_ENVIRONMENT } from "./src/lib/public-env" ;
66
77Sentry . init ( {
88 dsn : SENTRY_DSN ,
99 enabled : ! ! SENTRY_DSN ,
10- environment : VERCEL_ENV || "development" ,
10+ environment : SENTRY_ENVIRONMENT ,
1111 release : buildStamp ,
1212 sendDefaultPii : true ,
1313 // release is set in next.config.js in the Sentry webpack plugin
Original file line number Diff line number Diff line change @@ -3,4 +3,13 @@ export const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN;
33export const SENTRY_REPLAYS_SESSION_SAMPLE_RATE =
44 process . env . NEXT_PUBLIC_SENTRY_REPLAYS_SESSION_SAMPLE_RATE ;
55
6- export const VERCEL_ENV = process . env . NEXT_PUBLIC_VERCEL_ENV ?? "unset" ;
6+ export const ENVIRONMENT =
7+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
8+ process . env . NEXT_PUBLIC_ENVIRONMENT ||
9+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
10+ process . env . NEXT_PUBLIC_VERCEL_ENV ||
11+ "development" ;
12+
13+ export const SENTRY_ENVIRONMENT =
14+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
15+ process . env . NEXT_PUBLIC_SENTRY_ENVIRONMENT || ENVIRONMENT ;
Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ import * as Sentry from "@sentry/node";
55Sentry . init ( {
66 dsn : process . env . HASH_TEMPORAL_WORKER_INTEGRATION_SENTRY_DSN ,
77 enabled : ! ! process . env . HASH_TEMPORAL_WORKER_INTEGRATION_SENTRY_DSN ,
8+ environment :
9+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
10+ process . env . SENTRY_ENVIRONMENT ||
11+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
12+ process . env . ENVIRONMENT ||
13+ ( process . env . NODE_ENV === "production" ? "production" : "development" ) ,
814 tracesSampleRate : process . env . NODE_ENV === "production" ? 1.0 : 0 ,
915} ) ;
1016
You can’t perform that action at this time.
0 commit comments