UNPKG

2.51 kBTypeScriptView Raw
1import type { BaseTransportOptions, CheckIn, ClientOptions, Event, EventHint, MonitorConfig, ParameterizedString, SeverityLevel } from '@sentry/types';
2import { BaseClient } from './baseclient';
3import type { Scope } from './scope';
4import { SessionFlusher } from './sessionflusher';
5export interface ServerRuntimeClientOptions extends ClientOptions<BaseTransportOptions> {
6 platform?: string;
7 runtime?: {
8 name: string;
9 version?: string;
10 };
11 serverName?: string;
12}
13/**
14 * The Sentry Server Runtime Client SDK.
15 */
16export declare class ServerRuntimeClient<O extends ClientOptions & ServerRuntimeClientOptions = ServerRuntimeClientOptions> extends BaseClient<O> {
17 protected _sessionFlusher: SessionFlusher | undefined;
18 /**
19 * Creates a new Edge SDK instance.
20 * @param options Configuration options for this SDK.
21 */
22 constructor(options: O);
23 /**
24 * @inheritDoc
25 */
26 eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event>;
27 /**
28 * @inheritDoc
29 */
30 eventFromMessage(message: ParameterizedString, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event>;
31 /**
32 * @inheritDoc
33 */
34 captureException(exception: any, hint?: EventHint, scope?: Scope): string;
35 /**
36 * @inheritDoc
37 */
38 captureEvent(event: Event, hint?: EventHint, scope?: Scope): string;
39 /**
40 *
41 * @inheritdoc
42 */
43 close(timeout?: number): PromiseLike<boolean>;
44 /** Method that initialises an instance of SessionFlusher on Client */
45 initSessionFlusher(): void;
46 /**
47 * Create a cron monitor check in and send it to Sentry.
48 *
49 * @param checkIn An object that describes a check in.
50 * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want
51 * to create a monitor automatically when sending a check in.
52 */
53 captureCheckIn(checkIn: CheckIn, monitorConfig?: MonitorConfig, scope?: Scope): string;
54 /**
55 * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment
56 * appropriate session aggregates bucket
57 */
58 protected _captureRequestSession(): void;
59 /**
60 * @inheritDoc
61 */
62 protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope, isolationScope?: Scope): PromiseLike<Event | null>;
63 /** Extract trace information from scope */
64 private _getTraceInfoFromScope;
65}
66//# sourceMappingURL=server-runtime-client.d.ts.map
\No newline at end of file