import type { FastifyInstance } from "fastify"; import type { Metric } from "@jgalego/teamapi-core"; export declare class HttpMetrics { private readonly stats; record(method: string, route: string, status: number, seconds: number): void; collect(): Metric[]; } /** * Counts and times every request. * * The `route` label is the route *template* (`/teams/:id`), never the URL that arrived. Using the * raw path would give a distinct time series per team id, per service name, per resource id — the * classic way a metrics endpoint quietly becomes the most expensive thing in a Prometheus * instance. A request that matched no route is labelled `__unmatched__` for the same reason: * scanners produce unbounded 404 paths, and they must not each mint a series. */ export declare function registerHttpMetrics(app: FastifyInstance, metrics: HttpMetrics): void; //# sourceMappingURL=http-metrics.d.ts.map