envoyproxy / envoyproxy/gateway
Enriching the Prometheus metric labels emitted by Envoy from xRoute labels
- Lingua principale
- Go
- Stelle
- 3k
- Fork
- 864
- Merge medio
- 2g 2h
- PR unite (30g)
- 140
Descrizione
*Description*:
Although metrics emitted by the envoy instance look good, it shows a very limited label in it, for example:
```
envoy_cluster_upstream_rq_time_bucket{envoy_cluster_name="httproute///rule/0",le="0.5"} 11
```
Subsequently, wonder about the feasibility of adding more valuable information, such as the labels from `xRoute` resources directly into the metric.
An example of this could be the application of the following `HTTPRoute` manifest:
```
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: example
namespace: envoy-gateway-system
labels:
host: www.example.com
tribe: virtual-product
squad: game-voucher
spec:
hostnames:
- www.example.com
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: default-gateway
namespace: envoy-gateway-system
rules:
- backendRefs:
- group: ""
kind: Service
name: echoserver
namespace: default
port: 80
matches:
- path:
type: PathPrefix
value: /
```
As a result, the Envoy-emitted metric would appear as shown below:
```
envoy_cluster_upstream_rq_time_bucket{envoy_cluster_name="httproute/envoy-gateway-system/example/rule/0",host="www.example.com",tribe="virtual-product",squad="game-voucher",le="0.5"} 11
```
[optional *Relevant Links*:]
>Any extra documentation required to understand the issue.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.