Metrics: Router Hostname Label Missing (Alternative to Backend?)

Hi,

We're migrating from Traefik 1.7 and heavily relied on the metric traefik.backend.request.total, which had a label backend that used the request hostname (Host header) for the Ingress. This allowed individual app owners to easily discover metrics for their app by hostname such as "login.example.com". Traefik 2 Router metrics do not include such a label, instead the new label is less intuitive such as "router: namespace-ingress-app-web-app-example-com_kubernetes".

Any recommendations on how to add the request hostname as a label to the traefik.router.request.total metric? Could labels/annotations on the Router be added as a metric label?

How do other folks create app specific dashboards from traefik metrics?

The setup

  • Datadog
  • Kubernetes (EKS)
  • Traefik 2.9.6 on EKS behind an ALB
  • Kubernetes Ingress Resources