Socket
Socket
Sign inDemoInstall

fastify-metrics

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-metrics - npm Package Compare versions

Comparing version 4.0.8 to 4.0.9

69

dist/index.d.ts
/// <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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc