/** * Initialise `@sentry/node`, or explain why not. * * Returns `undefined` for the two non-error outcomes — no DSN, or the SDK is * not installed — because neither is a reason to fail a boot. The api half made * that call first (an optional dependency CAN fail to install, and a monitoring * integration must never be the thing that stops a deploy), and the web half * inherits it rather than deciding again. */ export declare const initSentryServer: (options: SentryServerInitOptions, log: SentryServerLog) => Promise; /** * The fields the `sentry active` line carries. * * Shared so the two processes cannot describe the same state differently — the * whole point of the change is that a reader tailing an api pod and a web pod * sees one vocabulary. */ export declare const sentryActiveFields: (server: SentryServer, options: SentryServerInitOptions) => Record; export declare interface SentryServer { /** The initialised `@sentry/node` namespace. */ readonly sdk: { readonly captureException: (error: unknown, hint?: unknown) => string; readonly flush?: (timeout?: number) => Promise; }; /** Whatever `Sentry.init` returned — the client, on SDK versions that return * one. Passed through rather than re-fetched via `getClient()`, because the * two are not the same call on every version and the caller asked for the * init's answer. */ readonly client: unknown; readonly tracesEnabled: boolean; readonly tracesSampleRate: number; } /** What the caller must hand in — resolved from env by the caller, because the * two processes read their environment through different gates. */ export declare interface SentryServerInitOptions { readonly dsn: string | undefined; readonly environment?: string | undefined; readonly release?: string | undefined; /** Default 1.0, matching the browser half. */ readonly tracesSampleRate?: number | undefined; /** Default ON — see the plugin's `traces` option for why `false` made the * browser half's spans point at nothing. */ readonly traces?: boolean | undefined; readonly profiling?: boolean | undefined; readonly profilesSampleRate?: number | undefined; /** User escape hatch, spread FIRST so plugin-managed keys stay authoritative. */ readonly init?: Record | undefined; } export declare interface SentryServerLog { readonly info: (message: string, fields?: Record) => void; readonly warn: (message: string, fields?: Record) => void; } export { }