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

Function flushSafelyWithTimeout

packages/nuxt/src/server/sdk.ts:116–124  ·  view source on GitHub ↗

* Flushes pending Sentry events with a 2-second timeout and in a way that cannot create unhandled promise rejections.

()

Source from the content-addressed store, hash-verified

114 * Flushes pending Sentry events with a 2-second timeout and in a way that cannot create unhandled promise rejections.
115 */
116async function flushSafelyWithTimeout(): Promise<void> {
117 try {
118 DEBUG_BUILD && debug.log('Flushing events...');
119 await flush(2000);
120 DEBUG_BUILD && debug.log('Done flushing events');
121 } catch (e) {
122 DEBUG_BUILD && debug.log('Error while flushing events:\n', e);
123 }
124}
125
126/**
127 * Checks if the event is a cache event.

Callers 1

Calls 2

flushFunction · 0.90
logMethod · 0.65

Tested by

no test coverage detected