envoyproxy / envoyproxy/gateway

Add support for backendRefs-level upstream metrics in Envoy Proxy

Open
#6,742 2 comments 1 reaction 0 assignees View on GitHub
triage
Dominant language
Go
Stars
3k
Forks
864
Avg merge
2d 2h
Merged PRs (30d)
140

Description

*Description*:
Add support for exposing metrics at the backendRef level in the HTTPRoute configuration. This would be extremely helpful for observing traffic distribution and evaluating the effectiveness of weighted canary deployments.

For Example:

weight canary

```
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: canary-route
spec:
parentRefs:
- name: my-gateway
hostnames:
- "example.com"
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: stable-service
port: 80
weight: 90
- name: canary-service
port: 80
weight: 10

```

Metrics should like

```
envoy_cluster_upstream_rq_total{envoy_cluster_name="httproute/default/canary-route/rule/0/default/stable-service"} 9

envoy_cluster_upstream_rq_total{envoy_cluster_name="httproute/default/canary-route/rule/0/default/canary-service"} 1
```

[optional *Relevant Links*:]

https://github.com/envoyproxy/gateway/issues/4717#issuecomment-2825941211

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.