Skip to content

Merging backends drops alt_stat_name (EnvoyProxy clusterStatName) for merged clusters #9570

Closed

Description

@muwaqar-cflt

Background

EnvoyProxy.spec.telemetry.metrics.clusterStatName lets users configure a pattern (e.g. %ROUTE_NAME%-%ROUTE_RULE_NAME%) that Envoy Gateway resolves per-route-rule into each cluster's alt_stat_name, giving friendlier stat labels than the auto-generated cluster name.

When EnvoyProxy.spec.mergeBackends merges multiple routes' identical backends into a shared BackendCluster, alt_stat_name is currently dropped entirely for merged clusters — their stats fall back to Envoy's default (the long, structural cluster name) instead of the configured pattern.

Why this isn't a quick fix

clusterStatName is a single pattern string with no way to express different behavior for merged vs. non-merged clusters. Since the pattern's placeholders (%ROUTE_NAME%, %ROUTE_RULE_NAME%, etc.) are inherently per-route, a single resolved value can't correctly describe a cluster shared by multiple different routes.

Possible directions

  • Extend clusterStatName's API to let users express distinct behavior for the merged case (e.g. a separate pattern, or an explicit opt-out).
  • Something else — open to discussion.

Context

Raised during review of #9477: #9477 (comment)

Activity

  1. guydc commented on Jul 28, 2026

    @guydc
    Contributor

    Sound like a legitimate limitation for the first iteration. Many users leverage clusterStatName to achieve metrics aggregation for the same backend, and mergeBackends would essentially achieve the same, albeit with less control over the actual metric name.

  2. github-actions commented on Aug 27, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had activity in the last 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions