The monitoring package has been significantly refactored to improve the granularity of error capture. Code from the 'capture-exception.ts' files in different locations have been deleted and replaced by a more unified approach in the 'use-baselime.ts' and 'use-sentry.ts' hooks. The README documentation has also been updated to reflect these changes and provide additional information about error monitoring setup and usage.
23 lines
583 B
TypeScript
23 lines
583 B
TypeScript
/**
|
|
* Monitoring service interface
|
|
* @description This service is used to capture exceptions and identify users in the monitoring service
|
|
* @example
|
|
*/
|
|
export abstract class MonitoringService {
|
|
/**
|
|
* Capture an exception
|
|
* @param error
|
|
* @param extra
|
|
*/
|
|
abstract captureException<Extra extends object>(
|
|
error: Error & { digest?: string },
|
|
extra?: Extra,
|
|
): unknown;
|
|
|
|
/**
|
|
* Identify a user in the monitoring service - used for tracking user actions
|
|
* @param info
|
|
*/
|
|
abstract identifyUser<Info extends { id: string }>(info: Info): unknown;
|
|
}
|