File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,8 @@ jobs:
141
141
--from-literal=DISCORD_SECRET=${{ secrets.DISCORD_SECRET }} \
142
142
--from-literal=DISCORD_HASH=${{ secrets.DISCORD_HASH }} \
143
143
--from-literal=DISCORD_TEST_GUILD=${{ secrets.DISCORD_TEST_GUILD }} \
144
+ --from-literal=SENTRY_INGEST=${{ secrets.SENTRY_INGEST }} \
145
+ --from-literal=SENTRY_RELEASES=${{ secrets.SENTRY_RELEASES }} \
144
146
--from-literal=DATABASE_URL=${{ secrets.DATABASE_URL }}
145
147
kubectl apply -k .
146
148
Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ export const discordSecret = getEnv("DISCORD_SECRET");
34
34
export const applicationId = getEnv ( "DISCORD_APP_ID" ) ;
35
35
export const discordToken = getEnv ( "DISCORD_HASH" ) ;
36
36
export const testGuild = getEnv ( "DISCORD_TEST_GUILD" ) ;
37
+ export const sentryIngest = getEnv ( "SENTRY_INGEST" ) ;
38
+ export const sentryReleases = getEnv ( "SENTRY_RELEASES" ) ;
37
39
38
40
export const amplitudeKey = getEnv ( "AMPLITUDE_API_KEY" , true ) ;
39
41
Original file line number Diff line number Diff line change 1
1
import * as Sentry from "@sentry/node" ;
2
- import { isProd } from "#~/helpers/env.server" ;
2
+ import { isProd , sentryIngest } from "#~/helpers/env.server" ;
3
3
4
- Sentry . init ( {
5
- dsn : process . env . SENTRY_INGEST ,
6
- environment : process . env . NODE_ENV || "development" ,
4
+ const sentryOptions = {
5
+ dsn : sentryIngest ,
6
+ environment : isProd ( ) ? "production" : "development" ,
7
7
integrations : [
8
8
new Sentry . Integrations . OnUncaughtException ( ) ,
9
9
new Sentry . Integrations . OnUnhandledRejection ( ) ,
@@ -14,6 +14,10 @@ Sentry.init({
14
14
// We recommend adjusting this value in production
15
15
tracesSampleRate : isProd ( ) ? 0.2 : 1 ,
16
16
sendDefaultPii : true ,
17
- } ) ;
17
+ } ;
18
+
19
+ console . log ( "Sentry initialized:" , sentryOptions ) ;
20
+
21
+ Sentry . init ( sentryOptions ) ;
18
22
19
23
export default Sentry ;
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import {
22
22
applicationId ,
23
23
discordSecret ,
24
24
sessionSecret ,
25
+ isProd ,
25
26
} from "#~/helpers/env.server" ;
26
27
27
28
export type Sessions = DB [ "sessions" ] ;
@@ -57,7 +58,7 @@ const {
57
58
path : "/" ,
58
59
sameSite : "lax" ,
59
60
secrets : [ sessionSecret ] ,
60
- secure : process . env . NODE_ENV === "production" ,
61
+ secure : isProd ( ) ,
61
62
} ,
62
63
} ) ;
63
64
export type CookieSession = Awaited < ReturnType < typeof getCookieSession > > ;
You can’t perform that action at this time.
0 commit comments