Skip to content

Commit

Permalink
fix(observability): use correct sentry dsn env var key
Browse files Browse the repository at this point in the history
  • Loading branch information
charles4221 committed Dec 4, 2024
1 parent 895fded commit 678ce61
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { init as SentryInit, replayIntegration } from '@sentry/nextjs';
import { IS_DEV } from '@/utils/constants';

SentryInit({
dsn: process.env.SENTRY_DSN,
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,

// Add optional integrations for additional features
integrations: [replayIntegration()],
Expand Down
2 changes: 1 addition & 1 deletion sentry.edge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { init as SentryInit } from '@sentry/nextjs';
import { IS_DEV } from '@/utils/constants';

SentryInit({
dsn: process.env.SENTRY_DSN,
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,

// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
tracesSampleRate: 1,
Expand Down
2 changes: 1 addition & 1 deletion sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { init as SentryInit } from '@sentry/nextjs';
import { IS_DEV } from '@/utils/constants';

SentryInit({
dsn: process.env.SENTRY_DSN,
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,

// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
tracesSampleRate: 1,
Expand Down
8 changes: 4 additions & 4 deletions src/prismic-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { ClientConfig } from '@prismicio/client';
import { enableAutoPreviews } from '@prismicio/next';

import config from '../slicemachine.config.json';
import { IS_PROD } from './utils/constants';

/**
* The project's Prismic repository name.
Expand Down Expand Up @@ -49,10 +50,9 @@ const routes: ClientConfig['routes'] = [
export const createClient = (config?: ClientConfig) => {
const client = createPrismicClient(repositoryName, {
routes,
fetchOptions:
process.env.NODE_ENV === 'production'
? { next: { tags: ['prismic'] }, cache: 'force-cache' }
: { next: { revalidate: 5 } },
fetchOptions: IS_PROD
? { next: { tags: ['prismic'] }, cache: 'force-cache' }
: { next: { revalidate: 5 } },
...config,
});

Expand Down

0 comments on commit 678ce61

Please sign in to comment.