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

Function cleanupOtel

packages/node/test/helpers/mockSdkInit.ts:30–44  ·  view source on GitHub ↗
(_provider?: BasicTracerProvider)

Source from the content-addressed store, hash-verified

28}
29
30export 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
46export function getSpanProcessor(): SentrySpanProcessor | undefined {
47 const client = getClient<NodeClient>();

Callers 6

scope.test.tsFile · 0.90
init.test.tsFile · 0.90
api.test.tsFile · 0.90
client.test.tsFile · 0.90

Calls 4

forceFlushMethod · 0.80
getProviderFunction · 0.70
shutdownMethod · 0.65
disableMethod · 0.65

Tested by

no test coverage detected