(_provider?: BasicTracerProvider)
| 28 | } |
| 29 | |
| 30 | export function cleanupOtel(_provider?: BasicTracerProvider): void { |
| 31 | const provider = getProvider(_provider); |
| 32 | |
| 33 | if (!provider) { |
| 34 | return; |
| 35 | } |
| 36 | |
| 37 | void provider.forceFlush(); |
| 38 | void provider.shutdown(); |
| 39 | |
| 40 | // Disable all globally registered APIs |
| 41 | trace.disable(); |
| 42 | context.disable(); |
| 43 | propagation.disable(); |
| 44 | } |
| 45 | |
| 46 | export function getSpanProcessor(): SentrySpanProcessor | undefined { |
| 47 | const client = getClient<NodeClient>(); |
no test coverage detected