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

Latest commit

 

History

History
22 lines (15 loc) · 633 Bytes

File metadata and controls

22 lines (15 loc) · 633 Bytes

Home > fastify-metrics > IRouteMetricsConfig > customLabels

IRouteMetricsConfig.customLabels property

Custom labels to add to metrics

Signature:

customLabels?: Record<string, string | ((request: FastifyRequest, reply: FastifyReply) => string)>;

Example

customLabels: {
 myLabel: 'my-value',
 myLabel2: (request, reply) => request.headers['x-my-header'],
}