-
Notifications
You must be signed in to change notification settings - Fork 716
Setting clusterStatName causes envoy_cluster_label to use uppercase on ROUTE_KIND #6751
Description
Description:
When using the new clusterStatName configuration in the EnvoyProxy resource, the envoy_cluster_name label changes capitalization unexpectedly.
Before setting clusterStatName, the envoy_cluster_name label for an xRoute looked like this (with grpcroute lowercase):
envoy_cluster_name="grpcroute/grafana-tempo/grafana-tempo-private/rule/0"
After setting clusterStatName to:
metrics:
clusterStatName: '%ROUTE_KIND%/%ROUTE_NAMESPACE%/%ROUTE_NAME%/rule/%ROUTE_RULE_NAME%/%ROUTE_RULE_NUMBER%'
The label capitalizes the route kind:
envoy_cluster_name="GRPCRoute/grafana-tempo/grafana-tempo-private/rule/-/0"
This capitalization change breaks dashboards and appears inconsistent with the documentation, which shows the example as lowercase (e.g., httproute). Expected behavior is for the route kind to remain lowercase for consistency and compatibility.
Repro steps:
Deploy Envoy Gateway with the metrics.clusterStatName field configured in the EnvoyProxy resource as shown:
metrics:
clusterStatName: '%ROUTE_KIND%/%ROUTE_NAMESPACE%/%ROUTE_NAME%/rule/%ROUTE_RULE_NAME%/%ROUTE_RULE_NUMBER%'
Deploy an xRoute resource.
Observe the envoy_cluster_name label in emitted metrics.
Expected:
grpcroute remains lowercase.
Actual:
GRPCRoute is capitalized.
Environment:
Envoy Gateway version: 1.5.0
Kubernetes version: 1.32.0
Logs:
Not applicable — issue observed in metric labels, not runtime logs.