Add labels to prometheus metrics

Hi. Is it possible to add additional labels to matrics based on request headers for example.

Lets say i get a request with "-H 'clientIdentifier: bird1'. Can i make sure clientIdentifier is one of the labels in prometheus traefik metrics?


Not to the default ones. But you can create your own middleware in v2 and expose the ones you need.

Do you have any sample example or creation step of middleware. We are using latest traefik 2.3.2 and wanted to extend client identifier header variable and use it in metrics. Appreciate your reply.

Have you found a solution?