import { BacktraceAttachment, BacktraceBreadcrumbs, BacktraceConfiguration, FileSystem, SessionFiles } from '.'; import { CoreClientSetup } from './builder/CoreClientSetup'; import { Events } from './common/Events'; import { ReportEvents } from './events/ReportEvents'; import { AttributeType, BacktraceData } from './model/data/BacktraceData'; import { BacktraceReport } from './model/report/BacktraceReport'; import { BacktraceModule } from './modules/BacktraceModule'; import { BacktraceModuleCtor, ReadonlyBacktraceModules } from './modules/BacktraceModules'; import { AttributeManager } from './modules/attribute/AttributeManager'; import { BacktraceDatabase } from './modules/database/BacktraceDatabase'; import { BacktraceMetrics } from './modules/metrics/BacktraceMetrics'; export declare abstract class BacktraceCoreClient { /** * Backtrace client instance */ protected static _instance?: BacktraceCoreClient; /** * Determines if the client is enabled. */ get enabled(): boolean; /** * Current session id */ get sessionId(): string; /** * Backtrace SDK name */ get agent(): string; /** * Backtrace SDK version */ get agentVersion(): string; /** * Available cached client attributes */ get attributes(): Record; /** * Available cached client annotatations */ get annotations(): Record; get metrics(): BacktraceMetrics | undefined; get breadcrumbs(): BacktraceBreadcrumbs | undefined; get database(): BacktraceDatabase | undefined; /** * Client cached attachments */ get attachments(): readonly BacktraceAttachment[]; /** * Modules used by the client */ protected get modules(): ReadonlyBacktraceModules; protected get sessionFiles(): SessionFiles | undefined; protected readonly options: O; protected readonly reportEvents: Events; protected readonly attributeManager: AttributeManager; protected readonly fileSystem?: FileSystem; private readonly _modules; private readonly _attachments; private readonly _dataBuilder; private readonly _reportSubmission; private readonly _rateLimitWatcher; private readonly _sessionProvider; private readonly _sdkOptions; private _enabled; protected constructor(setup: CoreClientSetup); initialize(): void; /** * Add attribute to Backtrace Client reports. * @param attributes key-value object with attributes. */ addAttribute(attributes: Record): void; /** * Add dynamic attributes to Backtrace Client reports. * @param attributes function returning key-value object with attributes. */ addAttribute(attributes: () => Record): void; /** * Add attachment to the client * @param attachment attachment */ addAttachment(attachment: BacktraceAttachment): void; /** * Asynchronously sends error data to Backtrace. * @param error Error or message * @param attributes Report attributes * @param attachments Report attachments */ send(error: Error | string, attributes?: Record, attachments?: BacktraceAttachment[]): Promise; /** * Asynchronously sends error data to Backtrace * @param report Backtrace Report */ send(report: BacktraceReport): Promise; /** * Disposes the client and all client callbacks */ dispose(): void; protected addModule(type: BacktraceModuleCtor, module: T): void; protected generateSubmissionData(report: BacktraceReport): BacktraceData | undefined; private generateSubmissionAttachments; private skipFrameOnMessage; private isReport; private getModuleBindData; }