fastify-metrics
Advanced tools
Comparing version 4.0.8 to 4.0.9
/// <reference types="node" /> | ||
/// <reference types="" /> | ||
import { FastifyInstance } from 'fastify'; | ||
@@ -8,31 +7,43 @@ import * as http from 'http'; | ||
declare module 'fastify' { | ||
interface FastifyInstance<HttpServer = http.Server, HttpRequest = http.IncomingMessage, HttpResponse = http.ServerResponse> { | ||
/** | ||
* Metrics interface | ||
*/ | ||
metrics: FastifyMetrics; | ||
} | ||
interface RouteSchema { | ||
/** | ||
* Hides metric route from swagger/openapi documentation | ||
*/ | ||
hide?: boolean; | ||
} | ||
interface FastifyRequest<HttpRequest, Query, Params, Headers, Body> { | ||
metrics?: { | ||
/** | ||
* Request duration histogram | ||
* @param labels metric labels | ||
*/ | ||
hist: (labels?: labelValues) => void; | ||
/** | ||
* Request duration summary by quantiles | ||
* @param labels metric labels | ||
*/ | ||
sum: (labels?: labelValues) => void; | ||
}; | ||
} | ||
interface FastifyInstance< | ||
HttpServer = http.Server, | ||
HttpRequest = http.IncomingMessage, | ||
HttpResponse = http.ServerResponse | ||
> { | ||
/** | ||
* Metrics interface | ||
*/ | ||
metrics: FastifyMetrics; | ||
} | ||
interface RouteSchema { | ||
/** | ||
* Hides metric route from swagger/openapi documentation | ||
*/ | ||
hide?: boolean; | ||
} | ||
interface FastifyRequest<HttpRequest, Query, Params, Headers, Body> { | ||
metrics?: { | ||
/** | ||
* Request duration histogram | ||
* @param labels metric labels | ||
*/ | ||
hist: (labels?: labelValues) => void; | ||
/** | ||
* Request duration summary by quantiles | ||
* @param labels metric labels | ||
*/ | ||
sum: (labels?: labelValues) => void; | ||
}; | ||
} | ||
} | ||
declare const _default: (instance: FastifyInstance<http.Server, http.IncomingMessage, http.ServerResponse>, options: PluginOptions, callback: (err?: import("fastify").FastifyError | undefined) => void) => void; | ||
declare const _default: ( | ||
instance: FastifyInstance< | ||
http.Server, | ||
http.IncomingMessage, | ||
http.ServerResponse | ||
>, | ||
options: PluginOptions, | ||
callback: (err?: import('fastify').FastifyError | undefined) => void | ||
) => void; | ||
export = _default; | ||
//# sourceMappingURL=index.d.ts.map | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "fastify-metrics", | ||
"version": "4.0.8", | ||
"version": "4.0.9", | ||
"description": "Prometheus metrics exporter for Fastify", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
247
22598