Skip to content

Latest commit

 

History

History
154 lines (83 loc) · 2.43 KB

fastify-metrics.iroutemetricsconfig.md

File metadata and controls

154 lines (83 loc) · 2.43 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 | { histogram?: boolean; summary?: boolean; }

(Optional)

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 | RegExp)[]

(Optional) A list of routes that will be excluded from metrics collection.