UNPKG

1.17 kBTypeScriptView Raw
1import type { Tracer } from '@opentelemetry/api';
2import type { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
3import { ServerRuntimeClient } from '@sentry/core';
4import type { NodeClientOptions } from '../types';
5/** A client for using Sentry with Node & OpenTelemetry. */
6export declare class NodeClient extends ServerRuntimeClient<NodeClientOptions> {
7 traceProvider: BasicTracerProvider | undefined;
8 private _tracer;
9 private _clientReportInterval;
10 private _clientReportOnExitFlushListener;
11 constructor(options: NodeClientOptions);
12 /** Get the OTEL tracer. */
13 get tracer(): Tracer;
14 flush(timeout?: number): Promise<boolean>;
15 close(timeout?: number | undefined): PromiseLike<boolean>;
16 /**
17 * Will start tracking client reports for this client.
18 *
19 * NOTICE: This method will create an interval that is periodically called and attach a `process.on('beforeExit')`
20 * hook. To clean up these resources, call `.close()` when you no longer intend to use the client. Not doing so will
21 * result in a memory leak.
22 */
23 startClientReportTracking(): void;
24}
25//# sourceMappingURL=client.d.ts.map
\No newline at end of file