Host-controlled production error reporting. No remote endpoint is enabled implicitly.

interface AsukaObservabilityOptions {
    captureGlobalErrors?: boolean;
    context?: Record<string, unknown>;
    enabled?: boolean;
    onError?: ((record: AsukaObservabilityErrorRecord) => void);
}

Properties

captureGlobalErrors?: boolean

Capture uncaught window errors and unhandled promise rejections. Defaults to true.

context?: Record<string, unknown>

Static non-sensitive metadata attached to every record.

enabled?: boolean

Disable all reporting while keeping the configuration in place. Defaults to true when onError is provided.

onError?: ((record: AsukaObservabilityErrorRecord) => void)

Forward one sanitized error record to the host application (Sentry, Datadog, custom API, etc.).