import type { DidString } from '@atproto/syntax'; import type { com } from './lexicons.js'; /** * Central hub for reporting PDS business events. Each method reports a single * event to every relevant sink in one call: * * 1. a pino logger → stdout/stderr (docker logs) * 2. an OTEL counter → aggregated metric (low-cardinality dimensions only) * 3. the OTEL Logs SDK → structured, trace-correlated log record (full detail) * * This keeps the three concerns in sync: there is exactly one call site per * event, and the counter / log / attribute definitions live together here * rather than being duplicated and drifting across handlers. * * @note High-cardinality attributes (e.g. `did`, `clientId`) are included in * the pino and OTEL log records but deliberately kept OUT of the counters, * whose attributes must stay low-cardinality to avoid a metric-series * explosion. * * @note The OTEL counters and log records are no-ops unless the corresponding * OTEL exporter is configured (see ./telemetry.ts), so calling these methods is * always safe and essentially free when telemetry is disabled. Because the OTEL * logger's `emit()` captures the active span context, log records are * trace-correlated too. */ declare class EventReporter { #private; accountCreated({ source, did, invited, deactivated, clientId, }: { source: com.atproto.server.createAccount.$lxm | 'oauth'; did: DidString; invited: boolean; deactivated: boolean; clientId?: string; }): void; signedIn({ did, clientId }: { did: DidString; clientId?: string; }): void; sessionCreated({ source, did, clientId, }: { source: 'oauth' | com.atproto.server.createAccount.$lxm | com.atproto.server.createSession.$lxm; did: DidString; clientId?: string; }): void; sessionRefreshed({ source, did, clientId, }: { source: 'oauth' | com.atproto.server.refreshSession.$lxm; did: DidString; clientId?: string; }): void; oauthAuthorized({ did, clientId, clientTrusted, clientFirstParty, clientConfidential, }: { did: DidString; clientId: string; clientTrusted: boolean; clientFirstParty: boolean; clientConfidential: boolean; }): void; } export declare const events: EventReporter; export {}; //# sourceMappingURL=events.d.ts.map