UNPKG

1.01 kBTypeScriptView Raw
1import { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
2import type { EsmLoaderHookOptions } from '../types';
3import type { NodeClient } from './client';
4/**
5 * Initialize OpenTelemetry for Node.
6 */
7export declare function initOpenTelemetry(client: NodeClient): void;
8/** Initialize the ESM loader. */
9export declare function maybeInitializeEsmLoader(esmHookConfig?: EsmLoaderHookOptions): void;
10interface NodePreloadOptions {
11 debug?: boolean;
12 integrations?: string[];
13 registerEsmLoaderHooks?: EsmLoaderHookOptions;
14}
15/**
16 * Preload OpenTelemetry for Node.
17 * This can be used to preload instrumentation early, but set up Sentry later.
18 * By preloading the OTEL instrumentation wrapping still happens early enough that everything works.
19 */
20export declare function preloadOpenTelemetry(options?: NodePreloadOptions): void;
21/** Just exported for tests. */
22export declare function setupOtel(client: NodeClient): BasicTracerProvider;
23export {};
24//# sourceMappingURL=initOtel.d.ts.map
\No newline at end of file