/** * Prometheus metrics exporter for Fastify. Based on * {@link https://github.com/siimon/prom-client | prom-client}. Also by default * it adds fastify route response time metrics (histogram and summary). * * @packageDocumentation */ import type { IFastifyMetrics, IMetricsPluginOptions, IMetricsRouteContextConfig } from './types'; declare module 'fastify' { interface FastifyInstance { /** Metrics interface */ metrics: IFastifyMetrics; } interface FastifyContextConfig extends IMetricsRouteContextConfig { /** Override route definition */ statsId?: string; /** Disables metric collection on this route */ disableMetrics?: boolean; } } export type * from './types'; /** * Metric plugin * * @example * * ```typescript * import fastify from 'fastify' * import fastifyMetrics, { IMetricsPluginOptions } from fastify-metrics * * const options: IMetricsPluginOptions = { endpoint: '/metrics' } * fastify() * .register(fastifyMetrics, options) * .get('/foo', (request, reply) => { * reply.code(200); * const delay = Math.random() * 10000; * setTimeout(() => { * reply.send({ id, delay }); * }, delay); * }) * .ready() * .listen(3000) * ``` */ declare const _default: import("fastify").FastifyPluginCallback, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault, import("fastify").FastifyBaseLogger>; export default _default; //# sourceMappingURL=index.d.ts.map