17 lines
566 B
TypeScript
17 lines
566 B
TypeScript
export type ErrorReportingUser = {
|
|
id?: string;
|
|
email?: string;
|
|
username?: string;
|
|
};
|
|
|
|
export type ErrorReportingLevel = 'fatal' | 'error' | 'warning' | 'info' | 'debug' | 'log';
|
|
|
|
export interface ErrorReportingService {
|
|
captureException(error: unknown, context?: Record<string, unknown>): string | undefined;
|
|
captureMessage(message: string, level?: ErrorReportingLevel): string | undefined;
|
|
setUser(user: ErrorReportingUser | null): void;
|
|
setTag(key: string, value: string): void;
|
|
withScope<T>(fn: () => T, context?: Record<string, unknown>): T;
|
|
}
|
|
|