import { CommonLogger } from '@goatlab/js-utils'; import type * as SentryLib from '@sentry/node'; import { Breadcrumb, NodeOptions, SeverityLevel } from '@sentry/node'; export type SentryServiceConfig = Record & NodeOptions & { logger?: CommonLogger; }; export declare class SentryService { private readonly config; constructor(config: SentryServiceConfig); sentry(): typeof SentryLib; init(): void; /** * For GDPR reasons we never send more information than just User ID. */ setUserId(id: string): void; /** * Does console.error(err) * Returns "eventId" or undefined (if error was not reported). */ captureException(error: any, logError?: boolean): string | undefined; /** * Returns "eventId" */ captureMessage(message: string, level?: SeverityLevel): string; addBreadcrumb(breadcrumb: Breadcrumb): void; /** * Currently it will only use `logger.error` ("error" level) and ignore `log` and `warn`. * * For each `logger.error` - it'll do a captureException. * * @experimental */ getCommonLogger(): CommonLogger; }