import type { SecurityEvent } from "./SecurityEvents.js"; export type LabelValues = Readonly>; interface Family { readonly name: string; readonly help: string; readonly kind: "counter" | "gauge"; readonly labels: readonly string[]; readonly samples: Map; } /** One family's handle: label names fixed at creation, values bounded by what the code passes. */ export declare class Counter { private readonly family; constructor(family: Family); inc(labels?: LabelValues, by?: number): void; get(labels?: LabelValues): number; } export declare class Gauge { private readonly family; constructor(family: Family); set(value: number, labels?: LabelValues): void; get(labels?: LabelValues): number; } /** * A registry of counters and gauges with fixed label names, rendered as * OpenMetrics text. Label values are codes, verdicts, names, and checks the * code itself supplies, never anything a caller sent, so cardinality is * bounded by the vocabulary and no value can leak through a label. */ export declare class Metrics { private readonly families; counter(name: string, help: string, labels?: readonly string[]): Counter; gauge(name: string, help: string, labels?: readonly string[]): Gauge; /** The exposition, families in registration order, samples in first-seen order, `# EOF` last. */ render(): string; /** @internal */ static sample(family: Family, labels: LabelValues): { readonly values: readonly string[]; value: number; }; private family; } /** The executor's own families, and the observer that counts security events into them. */ export interface ExecutorMetrics { readonly registry: Metrics; readonly proposals: Counter; readonly executions: Counter; readonly authFailures: Counter; readonly egressRefused: Counter; readonly secretRotations: Counter; readonly postureDrift: Counter; readonly leaksSuspected: Counter; readonly tlsRotations: Counter; readonly auditLines: Counter; readonly principalsLocked: Counter; readonly operatorActions: Counter; readonly halts: Counter; readonly hardLimitRefusals: Counter; readonly journalWriteFailures: Counter; readonly effectComparisons: Counter; readonly finalizations: Counter; readonly evidenceExports: Counter; readonly openAttempts: Gauge; readonly clockSkew: Gauge; readonly edgeLicenceWarnings: Gauge; readonly edgeUsageReports: Counter; observe(event: SecurityEvent): void; } export declare function executorMetrics(registry?: Metrics): ExecutorMetrics; export {}; //# sourceMappingURL=Metrics.d.ts.map