Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(app,outbound)!: Decouple metrics registry from stack building #2887

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

olix0r
Copy link
Member

@olix0r olix0r commented Apr 12, 2024

As we introduced the newer prometheus-client metrics registry, we did so by allowing stacks to register metrics directly. This is incongruent with the existing legacy metrics registries, which are known by the Inbound and Outbound stack builders.

This leads to two problems:

  1. We cannot build the admin server until all of the proxy stacks are built. This ordering dependency is unnecessary and cumbersome if we want to insert additional discovery work into the initialization process.
  2. It is cumbersome to add new metrics to stacks, as the registry must be passed through the stack building process.

To fix this, this change introduces additional Metrics types so that these metrics may be registered along with the other stack metrics.

BREAKING CHANGE: Gateway-mode proxies now report Balancer metrics with the "outbound_" prefix instead of the "gateway_" prefix. This metrics scope was introduced very recently and is incongruent with our other metrics export. We have no known readers of these metrics, as they are only relevant to new load balancer behavior, and only on multicluster gateways. Unifying under the outbound_ prefix reduces noise in metrics in non-gateway use cases and makes it easier to query proxy data consistently.

As we introduced the newer prometheus-client metrics registry, we did so by
allowing stacks to register metrics directly. This is incongruent with the
existing legacy metrics registries, which are known by the Inbound and Outbound
stack builders.

This leads to two problems:

1. We cannot build the admin server until all of the proxy stacks are built.
   This ordering dependency is unnecessary and cumbersome if we want to insert
   additional discovery work into the initialization process.
2. It is cumbersome to add new metrics to stacks, as the registry must be passed
   through the stack building process.

To fix this, this change introduces additional Metrics types so that these
metrics may be registered along with the other stack metrics.

BREAKING CHANGE: Gateway-mode proxies now report Balancer metrics with the
"outbound_" prefix instead of the "gateway_" prefix. This metrics scope was
introduced very recently and is incongruent with our other metrics export. We
have no known readers of these metrics, as they are only relevant to new load
balancer behavior, and only on multicluster gateways. Unifying under the
outbound_ prefix reduces noise in metrics in non-gateway use cases and makes it
easier to query proxy data consistently.

This is the only functional change in this commit.
@olix0r olix0r requested a review from a team as a code owner April 12, 2024 03:16
@olix0r olix0r merged commit 31d7464 into main Apr 12, 2024
15 checks passed
@olix0r olix0r deleted the ver/metrics-split branch April 12, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants