()
| 341 | } |
| 342 | |
| 343 | export function enrichSentryContext(): void { |
| 344 | if (!initialized || enriched || isSentryDisabled() || isTestEnv() || isSentryCaptureSealed()) { |
| 345 | return; |
| 346 | } |
| 347 | |
| 348 | enriched = true; |
| 349 | |
| 350 | if (pendingRuntimeContext) { |
| 351 | applyRuntimeContext(pendingRuntimeContext); |
| 352 | emitSentrySelfTest(pendingRuntimeContext.mode); |
| 353 | return; |
| 354 | } |
| 355 | |
| 356 | emitSentrySelfTest(undefined); |
| 357 | } |
| 358 | |
| 359 | export async function flushAndCloseSentry(timeoutMs = 2000): Promise<void> { |
| 360 | if (!initialized || isSentryDisabled() || isTestEnv()) { |
no test coverage detected