/** * The counters and histograms one replica keeps about the runs it executes, in Prometheus text. * * Written rather than imported, like the router: the server needs three metric kinds and a text * format, which is far smaller than any client library, and nothing here runs unless `/metrics` is * scraped. */ type Labels = Record; /** A replica's run counters and latency histograms. */ export declare class ServerMetrics { private readonly counters; private readonly histograms; /** Adds to a counter. */ count(name: string, labels: Labels, by?: number): void; /** Records a duration, in seconds, in a histogram. */ observe(name: string, labels: Labels, seconds: number): void; /** A counter's value for one set of labels, for tests and reports. */ value(name: string, labels: Labels): number; /** Appends every counter and histogram to `lines`, with the help text given per name. */ render(lines: string[], help: Record): void; } /** Appends one gauge with its header. */ export declare function gauge(lines: string[], name: string, help: string, value: number, labels?: Labels): void; /** One gauge with several labelled samples, under one header. Writes nothing without samples. */ export declare function gauges(lines: string[], name: string, help: string, samples: ReadonlyArray<[Labels, number]>): void; export {};