-
Notifications
You must be signed in to change notification settings - Fork 284
feat(app): Route frame count metrics #3334
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
378e494 to
843f57c
Compare
843f57c to
82d97be
Compare
cc0e8f0 to
67d56a0
Compare
2d8d0f2 to
a75492c
Compare
3ae2592 to
082cb90
Compare
This was referenced Nov 10, 2024
082cb90 to
878881d
Compare
a84a157 to
71cca7f
Compare
878881d to
8868a39
Compare
8868a39 to
389f7dc
Compare
### ⛅ overview this introduces a new tower middleware for Prometheus metrics, used for instrumenting HTTP and gRPC request bodies, and observing (a) the number of frames yielded by a body, (b) the number of bytes included in body frames, and (c) a distribution of the size of frames yielded. this builds upon the backend-level metrics added in #3308. this additionally uses the route label extractor, hoisted out of the retry middleware's Prometheus telemetry in #3337. ### 📝 changes * a `linkerd_http_prom::body_data::request::NewRecordBodyData::NewRecordBodyData` middleware is added, which complements the equivalent `linkerd_http_prom::body_data::response` middleware. * this is added to policy routes' metrics layer. see prometheus/client_rust#241 and prometheus/client_rust#242, which track upstream proposals to add accessors to `Histogram` that will allow us to make test assertions that metrics are working properly. for now, these are feature gated as also done in #3308. Signed-off-by: katelyn martin <[email protected]>
389f7dc to
94f39e4
Compare
olix0r
approved these changes
Nov 21, 2024
Member
olix0r
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌮 🎉
cratelyn
added a commit
that referenced
this pull request
Sep 16, 2025
#3334 introduced tower middleware to the outbound proxy that records the size and number of response body's data frames. this commit introduces an equivalent layer to the inbound proxy's prometheus metrics.
cratelyn
added a commit
that referenced
this pull request
Sep 16, 2025
#3334 introduced tower middleware to the outbound proxy that records the size and number of response body's data frames. this commit introduces an equivalent layer to the inbound proxy's prometheus metrics. Signed-off-by: katelyn martin <[email protected]>
cratelyn
added a commit
that referenced
this pull request
Nov 12, 2025
this is akin to #3334, which cleaned up the equivalent expression in `linkerd/app/outbound/src/http/logical/policy/route/metrics.rs`. Signed-off-by: katelyn martin <[email protected]>
cratelyn
added a commit
to linkerd/website
that referenced
this pull request
Nov 14, 2025
the documentation of our proxy metrics has not kept pace with all of the exciting telemetry that has been introduced since #1599 documented the state of our authorization policy metrics. this commit reworks the documentation to exhaustively document the families of metrics exported by the proxy. this commit does not introduce mention of the _inbound_ metrics that have been added, but does rename this section to "_Endpoint Metrics_" in order to be compatible with the future addition of `inbound_http_route_*`, `inbound_http_route_backend_*`, `inbound_grpc_route*`, and `inbound_grpc_route_backend_*` metrics. see: * linkerd/linkerd2-proxy#2377 * linkerd/linkerd2-proxy#2380 * linkerd/linkerd2-proxy#3086 * linkerd/linkerd2-proxy#3308 * linkerd/linkerd2-proxy#3334 Signed-off-by: katelyn martin <[email protected]>
cratelyn
added a commit
that referenced
this pull request
Nov 14, 2025
this is akin to #3334, which cleaned up the equivalent expression in `linkerd/app/outbound/src/http/logical/policy/route/metrics.rs`. Signed-off-by: katelyn martin <[email protected]>
cratelyn
added a commit
that referenced
this pull request
Nov 14, 2025
this is akin to #3334, which cleaned up the equivalent expression in `linkerd/app/outbound/src/http/logical/policy/route/metrics.rs`. Signed-off-by: katelyn martin <[email protected]>
cratelyn
added a commit
that referenced
this pull request
Nov 14, 2025
this is akin to #3334, which cleaned up the equivalent expression in `linkerd/app/outbound/src/http/logical/policy/route/metrics.rs`. Signed-off-by: katelyn martin <[email protected]>
cratelyn
added a commit
that referenced
this pull request
Nov 17, 2025
this branch makes some small preliminary changes to the outbound proxy's backend metrics layer. this will simplify the introduction of additional middleware layers. --- * refactor(app/outbound): simplify backend layer construction this is akin to #3334, which cleaned up the equivalent expression in `linkerd/app/outbound/src/http/logical/policy/route/metrics.rs`. Signed-off-by: katelyn martin <[email protected]> * refactor(app/outbound): type aliases in backend metrics layer before we introduce additional layers to our backend stack, we should define type aliases as prophylaxis against: <https://rust-lang.github.io/rust-clippy/stable/index.html#type_complexity> Signed-off-by: katelyn martin <[email protected]> --------- Signed-off-by: katelyn martin <[email protected]>
kflynn
pushed a commit
to linkerd/website
that referenced
this pull request
Nov 20, 2025
* feat(proxy-metrics): document outbound policy routing metrics the documentation of our proxy metrics has not kept pace with all of the exciting telemetry that has been introduced since #1599 documented the state of our authorization policy metrics. this commit reworks the documentation to exhaustively document the families of metrics exported by the proxy. this commit does not introduce mention of the _inbound_ metrics that have been added, but does rename this section to "_Endpoint Metrics_" in order to be compatible with the future addition of `inbound_http_route_*`, `inbound_http_route_backend_*`, `inbound_grpc_route*`, and `inbound_grpc_route_backend_*` metrics. see: * linkerd/linkerd2-proxy#2377 * linkerd/linkerd2-proxy#2380 * linkerd/linkerd2-proxy#3086 * linkerd/linkerd2-proxy#3308 * linkerd/linkerd2-proxy#3334 Signed-off-by: katelyn martin <[email protected]> * chore(markdownlint): allow duplicate "labels" headers Signed-off-by: katelyn martin <[email protected]> --------- Signed-off-by: katelyn martin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
feat(app): Route frame count metrics
⛅ overview
this introduces a new tower middleware for Prometheus metrics, used for
instrumenting HTTP and gRPC request bodies, and observing (a) the
number of frames yielded by a body, (b) the number of bytes included
in body frames, and (c) a distribution of the size of frames yielded.
this builds upon the backend-level metrics added in #3308. this
additionally uses the route label extractor, hoisted out of the retry
middleware's Prometheus telemetry in #3337.
📝 changes
a
linkerd_http_prom::body_data::request::NewRecordBodyData::NewRecordBodyDatamiddleware is added, which complements the equivalent
linkerd_http_prom::body_data::responsemiddleware.this is added to policy routes' metrics layer.
see prometheus/client_rust#241 and prometheus/client_rust#242, which
track upstream proposals to add accessors to
Histogramthat will allowus to make test assertions that metrics are working properly. for now,
these are feature gated as also done in #3308.
🔗 related