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

Function initOpenTelemetry

packages/node/src/sdk/initOtel.ts:32–40  ·  view source on GitHub ↗
(client: NodeClient, options: AdditionalOpenTelemetryOptions = {})

Source from the content-addressed store, hash-verified

30 * Initialize OpenTelemetry for Node.
31 */
32export function initOpenTelemetry(client: NodeClient, options: AdditionalOpenTelemetryOptions = {}): void {
33 if (client.getOptions().debug) {
34 setupOpenTelemetryLogger();
35 }
36
37 const [provider, asyncLocalStorageLookup] = setupOtel(client, options);
38 client.traceProvider = provider;
39 client.asyncLocalStorageLookup = asyncLocalStorageLookup;
40}
41
42interface NodePreloadOptions {
43 debug?: boolean;

Callers 1

_initFunction · 0.90

Calls 3

setupOpenTelemetryLoggerFunction · 0.90
setupOtelFunction · 0.70
getOptionsMethod · 0.65

Tested by

no test coverage detected