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

Function getNuxtDefaultIntegrations

packages/nuxt/src/server/sdk.ts:98–111  ·  view source on GitHub ↗
(options: NodeOptions)

Source from the content-addressed store, hash-verified

96}
97
98function getNuxtDefaultIntegrations(options: NodeOptions): Integration[] {
99 return [
100 ...getDefaultNodeIntegrations(options).filter(integration => integration.name !== 'Http'),
101 // The httpIntegration is added as defaultIntegration, so users can still overwrite it
102 httpIntegration({
103 instrumentation: {
104 responseHook: () => {
105 // Makes it possible to end the tracing span before closing the Vercel lambda (https://vercel.com/docs/functions/functions-api-reference#waituntil)
106 vercelWaitUntil(flushSafelyWithTimeout());
107 },
108 },
109 }),
110 ];
111}
112
113/**
114 * Flushes pending Sentry events with a 2-second timeout and in a way that cannot create unhandled promise rejections.

Callers 1

initFunction · 0.85

Calls 2

vercelWaitUntilFunction · 0.90
flushSafelyWithTimeoutFunction · 0.70

Tested by

no test coverage detected