UNPKG

@promster/fastify

Version:

Fastify server integrations of promster

17 lines (16 loc) 1.03 kB
import { Prometheus, TRequestRecorder, defaultNormalizers, defaultRegister, getContentType, getSummary, timing } from "@promster/metrics"; import { TLabelValues, TOptionalPromsterOptions } from "@promster/types"; import { FastifyInstance, FastifyReply, FastifyRequest } from "fastify"; export type * from "@promster/types"; //#region src/plugin/plugin.d.ts declare const getRequestRecorder: () => TRequestRecorder; declare const signalIsUp: () => void; declare const signalIsNotUp: () => void; type TSkipFunction = <TRequest = FastifyRequest, TResponse = FastifyReply>(_req: TRequest, _res: TResponse, _labels: TLabelValues) => boolean; type TPromsterOptions = TOptionalPromsterOptions & { skip?: TSkipFunction; }; declare const plugin: (fastify: FastifyInstance, options: TPromsterOptions) => Promise<void>; //#endregion export { Prometheus, type TPromsterOptions, defaultNormalizers, defaultRegister, getContentType, getRequestRecorder, getSummary, plugin, signalIsNotUp, signalIsUp, timing }; //# sourceMappingURL=index.d.cts.map