MCPcopy Create free account
hub / github.com/cloudflare/wildebeest / initSentryQueue

Function initSentryQueue

consumer/src/sentry.ts:4–23  ·  view source on GitHub ↗
(env: Env, context: any)

Source from the content-addressed store, hash-verified

2import type { Env } from './'
3
4export function initSentryQueue(env: Env, context: any) {
5 if (env.SENTRY_DSN === '') {
6 return null
7 }
8
9 const headers: any = {}
10
11 if (env.SENTRY_ACCESS_CLIENT_ID !== '' && env.SENTRY_ACCESS_CLIENT_SECRET !== '') {
12 headers['CF-Access-Client-ID'] = env.SENTRY_ACCESS_CLIENT_ID
13 headers['CF-Access-Client-Secret'] = env.SENTRY_ACCESS_CLIENT_SECRET
14 }
15
16 const sentry = new Toucan({
17 dsn: env.SENTRY_DSN,
18 context,
19 transportOptions: { headers },
20 })
21
22 return sentry
23}

Callers 1

queueFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected