MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / getDefaultIntegrations

Function getDefaultIntegrations

packages/cloudflare/src/sdk.ts:25–48  ·  view source on GitHub ↗
(options: CloudflareOptions)

Source from the content-addressed store, hash-verified

23
24/** Get the default integrations for the Cloudflare SDK. */
25export function getDefaultIntegrations(options: CloudflareOptions): Integration[] {
26 // TODO(v11): Drop this transitional gating and let `requestDataIntegration` rely on the resolved
27 // `dataCollection` defaults directly. Until then, preserve the historical Cloudflare behavior of not
28 // attaching cookies unless the user explicitly opts in via `sendDefaultPii` or `dataCollection.cookies`.
29 // eslint-disable-next-line typescript/no-deprecated
30 const cookiesEnabled = options.sendDefaultPii || options.dataCollection?.cookies != null;
31 return [
32 // The Dedupe integration should not be used in workflows because we want to
33 // capture all step failures, even if they are the same error.
34 ...(options.enableDedupe === false ? [] : [dedupeIntegration()]),
35 // TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`
36 // eslint-disable-next-line typescript/no-deprecated
37 inboundFiltersIntegration(),
38 functionToStringIntegration(),
39 conversationIdIntegration(),
40 linkedErrorsIntegration(),
41 fetchIntegration(),
42 // eslint-disable-next-line typescript/no-deprecated
43 honoIntegration(),
44 httpServerIntegration(),
45 requestDataIntegration(cookiesEnabled ? undefined : { include: { cookies: false } }),
46 consoleIntegration(),
47 ];
48}
49
50/**
51 * Initializes the cloudflare SDK.

Callers 1

initFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected