UNPKG

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