(_provider?: BasicTracerProvider)
| 100 | } |
| 101 | |
| 102 | export function cleanupOtel(_provider?: BasicTracerProvider): void { |
| 103 | const provider = getProvider(_provider); |
| 104 | |
| 105 | if (provider) { |
| 106 | void provider.forceFlush(); |
| 107 | void provider.shutdown(); |
| 108 | } |
| 109 | |
| 110 | // Disable all globally registered APIs |
| 111 | trace.disable(); |
| 112 | context.disable(); |
| 113 | propagation.disable(); |
| 114 | |
| 115 | // Reset globals to ensure clean state |
| 116 | resetGlobals(); |
| 117 | } |
| 118 | |
| 119 | export function getSpanProcessor(): SentrySpanProcessor | undefined { |
| 120 | const client = getClient<NodeClient>(); |
no test coverage detected