Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Latest commit

 

History

History
26 lines (19 loc) · 4.13 KB

File metadata and controls

26 lines (19 loc) · 4.13 KB

Home > fastify-metrics > IRouteMetricsConfig

IRouteMetricsConfig interface

Route metrics configuration

Signature:

export interface IRouteMetricsConfig

Properties

Property Modifiers Type Description
customLabels? Record<string, string | ((request: FastifyRequest, reply: FastifyReply) => string)> (Optional) Custom labels to add to metrics
enabled? boolean (Optional) Enables collection of fastify routes metrics response time.
groupStatusCodes? boolean (Optional) Groups status code labels by first digit 200 becomes 2XX in metrics.
invalidRouteGroup? string (Optional) Unknown route label. If registeredRoutesOnly routes set to false unknown routes will have following url.
methodBlacklist? readonly HTTPMethods[] (Optional) A list of HTTP methods that will be excluded from metrics collection
overrides? IRouteMetricsOverrides (Optional) Metric configuration overrides
registeredRoutesOnly? boolean (Optional) Collect metrics only for registered routes. If false, then metrics for unknown routes /unknown-unregistered-route will be collected as well.
routeBlacklist? readonly string[] (Optional) A list of routes that will be excluded from metrics collection.