-
Notifications
You must be signed in to change notification settings - Fork 270
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
refactor(app): Outline route label extractor #3337
Open
cratelyn
wants to merge
2
commits into
kate/record-body-data
Choose a base branch
from
kate/hoist-route-label-extractor
base: kate/record-body-data
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+44
−30
Conversation
This file contains 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
cratelyn
force-pushed
the
kate/hoist-route-label-extractor
branch
from
November 7, 2024 06:34
bb26e1e
to
2d8d0f2
Compare
cratelyn
added a commit
that referenced
this pull request
Nov 10, 2024
### ⛅ 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, and (b) the number of bytes included in body frames. 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 Signed-off-by: katelyn martin <[email protected]>
cratelyn
force-pushed
the
kate/record-body-data
branch
from
November 10, 2024 22:33
cd2d1b9
to
3b1db24
Compare
this commit promotes the `RetryLabelExtract` type out of the route retry middleware, and into the metrics submodule. in preparation for generalizing this component, we rename it to `RouteLabelExtract`. Signed-off-by: katelyn martin <[email protected]>
this addresses the `TODO` comment, moving the `RouteLabelExtract` type out of the policy route layer function. this defines a method on `MatchedRoute` which may be called to retrieve a `RouteLabelExtract`. that type holds references to the contruction-time information about the route, and can be used to later inspect an outbound request at call-time, returning a `labels::Route` set of labels. this is a helpful piece of reusable glue that is broadly useful in instrumenting our route-level middleware. Signed-off-by: katelyn martin <[email protected]>
cratelyn
force-pushed
the
kate/hoist-route-label-extractor
branch
from
November 10, 2024 22:37
2d8d0f2
to
a75492c
Compare
cratelyn
added a commit
that referenced
this pull request
Nov 10, 2024
### ⛅ 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, and (b) the number of bytes included in body frames. 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 Signed-off-by: katelyn martin <[email protected]>
cratelyn
added a commit
that referenced
this pull request
Nov 10, 2024
### ⛅ 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, and (b) the number of bytes included in body frames. 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. Signed-off-by: katelyn martin <[email protected]>
This was referenced Nov 10, 2024
cratelyn
added a commit
that referenced
this pull request
Nov 10, 2024
### ⛅ 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, and (b) the number of bytes included in body frames. 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. Signed-off-by: katelyn martin <[email protected]>
this pr has been rebased onto |
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.
this PR, based upon #3308, generalizes the
ExtractParam<P, T>
type used to retrieve Prometheus labels for the route-level retry middleware. this is a helpful component we'll want in order to build route-level frame counting middleware.refactor(app): Hoist label extractor out of retry middleware
this commit promotes the
RetryLabelExtract
type out of the route retry middleware, and into the metricssubmodule.
in preparation for generalizing this component, we rename it to
RouteLabelExtract
.refactor(app): Outline route label extraction
this addresses the
TODO
comment, moving theRouteLabelExtract
type out of the policy route layerfunction.
this defines a method on
MatchedRoute
which may be called to retrieve aRouteLabelExtract
. that typeholds references to the contruction-time information about the route, and can be used to later inspect an
outbound request at call-time, returning a
labels::Route
set of labels.this is a helpful piece of reusable glue that is broadly useful in instrumenting our route-level
middleware.
🔗 related