UNPKG

1.79 kBTypeScriptView Raw
1import type { Scope } from '@sentry/core';
2import { BaseClient, SessionFlusher } from '@sentry/core';
3import type { Event, EventHint, Severity, SeverityLevel } from '@sentry/types';
4import type { NodeClientOptions } from './types';
5/**
6 * The Sentry Node SDK Client.
7 *
8 * @see NodeClientOptions for documentation on configuration options.
9 * @see SentryClient for usage documentation.
10 */
11export declare class NodeClient extends BaseClient<NodeClientOptions> {
12 protected _sessionFlusher: SessionFlusher | undefined;
13 /**
14 * Creates a new Node SDK instance.
15 * @param options Configuration options for this SDK.
16 */
17 constructor(options: NodeClientOptions);
18 /**
19 * @inheritDoc
20 */
21 captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined;
22 /**
23 * @inheritDoc
24 */
25 captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined;
26 /**
27 *
28 * @inheritdoc
29 */
30 close(timeout?: number): PromiseLike<boolean>;
31 /** Method that initialises an instance of SessionFlusher on Client */
32 initSessionFlusher(): void;
33 /**
34 * @inheritDoc
35 */
36 eventFromException(exception: any, hint?: EventHint): PromiseLike<Event>;
37 /**
38 * @inheritDoc
39 */
40 eventFromMessage(message: string, level?: Severity | SeverityLevel, hint?: EventHint): PromiseLike<Event>;
41 /**
42 * @inheritDoc
43 */
44 protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike<Event | null>;
45 /**
46 * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment
47 * appropriate session aggregates bucket
48 */
49 protected _captureRequestSession(): void;
50}
51//# sourceMappingURL=client.d.ts.map
\No newline at end of file