Home > fastify-metrics > IRouteMetricsConfig
Route metrics configuration
Signature:
export interface IRouteMetricsConfig| 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. |