import type { AuthSession } from "./auth.js"; export declare function initServerSentry(): Promise; export declare function isServerSentryEnabled(): boolean; /** * Attach the current request's user to Sentry's isolation scope so any * `captureException` triggered later in the request carries the right * `user.id` / `user.email` / `user.username` and `orgId` tag. * * Sentry node 10 uses Node's AsyncLocalStorage to give each async context * its own isolation scope, so setting on `getIsolationScope()` here only * affects events emitted while this request's async context is active. * * No-ops gracefully when Sentry isn't initialized or no session exists — * never throws into the request path. */ export declare function setSentryUserForRequest(session: AuthSession | null): void; export declare function setSentryRequestContext(ctx: { userEmail?: string; orgId?: string; }): void; export declare function captureAuthError(error: unknown, context: { route: "login" | "signup" | "logout" | "magic-link" | "verify-email" | "better-auth"; email?: string; path?: string; }): string | undefined; export interface RouteErrorContext { route?: string; method?: string; userAgent?: string; tags?: Record; extra?: Record; contexts?: Record>; } export declare function captureRouteError(error: unknown, context?: RouteErrorContext): string | undefined;