chore(app,outbound)!: Decouple metrics registry from stack building #2887
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.