Skip to content

Commit 3d76a43

Browse files
use SENTRY_DSN from env
1 parent 16eb479 commit 3d76a43

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

apps/site/cloudflare/worker-entrypoint.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ import type { ExecutionContext } from '@cloudflare/workers-types';
1010
import { default as handler } from '../.open-next/worker.js';
1111

1212
export default withSentry(
13-
() => ({
14-
dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0',
13+
(env: {
14+
/**
15+
* Sentry DSN, used for error monitoring
16+
* If missing, Sentry isn't used
17+
*/
18+
SENTRY_DSN?: string;
19+
}) => ({
20+
dsn: env.SENTRY_DSN,
1521
// Adds request headers and IP for users, for more info visit:
1622
// https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#sendDefaultPii
1723
sendDefaultPii: true,

0 commit comments

Comments
 (0)