Skip to content

Commit

Permalink
feat(sentry): another try at fixing sentry in frontend
Browse files Browse the repository at this point in the history
From the docs it seems the sentry dsn env var has to be declared as
public. Let's see if this works.
  • Loading branch information
geclos committed Nov 18, 2024
1 parent 9fd1375 commit a91ff8d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions apps/infra/src/app/production/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export const environment = pulumi
{ name: 'DEFAULT_PROVIDER_API_KEY', value: defaultProviderApiKey },
{ name: 'NEXT_PUBLIC_POSTHOG_KEY', value: postHogApiKey },
{ name: 'NEXT_PUBLIC_POSTHOG_HOST', value: 'https://eu.i.posthog.com' },
{ name: 'NEXT_PUBLIC_SENTRY_DSN', value: sentryDsn },
{
name: 'DATASET_GENERATOR_WORKSPACE_APIKEY',
value: datasetGeneratorWorkspaceApiKey,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import * as Sentry from '@sentry/nextjs'

Sentry.init({
dsn: process.env.SENTRY_DSN,
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,

// Add optional integrations for additional features
integrations: [Sentry.replayIntegration()],
Expand Down
2 changes: 1 addition & 1 deletion apps/web/sentry.edge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import * as Sentry from '@sentry/nextjs'

Sentry.init({
dsn: process.env.SENTRY_DSN,
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import * as Sentry from '@sentry/nextjs'

Sentry.init({
dsn: process.env.SENTRY_DSN,
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,

// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
Expand Down

0 comments on commit a91ff8d

Please sign in to comment.