(timeoutMs = 2000)
| 384 | } |
| 385 | |
| 386 | export async function flushSentry(timeoutMs = 2000): Promise<FlushSentryOutcome> { |
| 387 | if (!initialized || isSentryDisabled() || isTestEnv()) { |
| 388 | return 'skipped'; |
| 389 | } |
| 390 | |
| 391 | try { |
| 392 | const flushed = await Sentry.flush(timeoutMs); |
| 393 | return flushed ? 'flushed' : 'timed_out'; |
| 394 | } catch { |
| 395 | return 'failed'; |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | export function captureMcpShutdownSummary(summary: McpShutdownSummaryEvent): void { |
| 400 | if (!initialized || isSentryDisabled() || isTestEnv() || isSentryCaptureSealed()) { |
no test coverage detected