@sentry/core
Version:
Base implementation for all Sentry JavaScript SDKs
57 lines • 2.19 kB
TypeScript
import { Client } from './client';
import type { Scope } from './scope';
import type { CheckIn, MonitorConfig } from './types-hoist/checkin';
import type { Event, EventHint } from './types-hoist/event';
import type { ClientOptions } from './types-hoist/options';
import type { ParameterizedString } from './types-hoist/parameterize';
import type { SeverityLevel } from './types-hoist/severity';
import type { BaseTransportOptions } from './types-hoist/transport';
export interface ServerRuntimeClientOptions extends ClientOptions<BaseTransportOptions> {
platform?: string;
runtime?: {
name: string;
version?: string;
};
serverName?: string;
}
/**
* The Sentry Server Runtime Client SDK.
*/
export declare class ServerRuntimeClient<O extends ClientOptions & ServerRuntimeClientOptions = ServerRuntimeClientOptions> extends Client<O> {
private _logFlushIdleTimeout;
private _logWeight;
/**
* Creates a new Edge SDK instance.
* @param options Configuration options for this SDK.
*/
constructor(options: O);
/**
* @inheritDoc
*/
eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event>;
/**
* @inheritDoc
*/
eventFromMessage(message: ParameterizedString, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event>;
/**
* @inheritDoc
*/
captureException(exception: unknown, hint?: EventHint, scope?: Scope): string;
/**
* @inheritDoc
*/
captureEvent(event: Event, hint?: EventHint, scope?: Scope): string;
/**
* Create a cron monitor check in and send it to Sentry.
*
* @param checkIn An object that describes a check in.
* @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want
* to create a monitor automatically when sending a check in.
*/
captureCheckIn(checkIn: CheckIn, monitorConfig?: MonitorConfig, scope?: Scope): string;
/**
* @inheritDoc
*/
protected _prepareEvent(event: Event, hint: EventHint, currentScope: Scope, isolationScope: Scope): PromiseLike<Event | null>;
}
//# sourceMappingURL=server-runtime-client.d.ts.map