UNPKG

@sentry/node

Version:

Sentry Node SDK using OpenTelemetry for performance instrumentation

12 lines (8 loc) 506 B
import '@sentry/server-utils/orchestrion/import-hook'; import { register } from 'module'; // Like otelEsmImportHookTemplate.js, but also registers the diagnostics-channel // injection so that `node --import @sentry/node/import app.js` injects the // channels unconditionally (they are only *subscribed* to when the app opts in // via `experimentalUseDiagnosticsChannelInjection()`). register('@opentelemetry/instrumentation/hook.mjs', import.meta.url); globalThis._sentryEsmLoaderHookRegistered = true;