-
Notifications
You must be signed in to change notification settings - Fork 287
refactor(app/inbound): metrics layer accepts InboundMetrics
#4166
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/inbound): metrics layer accepts InboundMetrics
#4166
Conversation
this commit makes a small refactor to the inbound proxy's `metrics::layer()` middleware in the interest of future-proofing it before additional metrics layers are introduced. this will mean that the call site in `http/router.rs` will not need to be updated repeatedly as we introduce request/response body frame size metrics, duration histograms, and so forth. Signed-off-by: katelyn martin <kate@buoyant.io>
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.
a unified diff for this change looks terrible, recommend viewing this side-by-side.
| LogicalPerRequest::from(t) | ||
| })) | ||
| .push(self::metrics::layer(rt.metrics.request_count.clone())) | ||
| .push(self::metrics::layer(&rt.metrics)) |
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.
this is the point: pass in rt.metrics so that we don't have to keep adding a new parameter each time that we add a new layer in the future.
this commit introduces an additional layer of telemetry to the inbound proxy's http router. either http and grpc metrics are used, depending upon the policy that authorized a given request. this is based upon #4174, which refactored the request body telemetry middleware to be metrics agnostic. see: * #4165 * #4166 * #4174 * #4127 Signed-off-by: katelyn martin <kate@buoyant.io>
this commit introduces an additional layer of telemetry to the inbound proxy's http router. either http and grpc metrics are used, depending upon the policy that authorized a given request. this is based upon #4174, which refactored the request body telemetry middleware to be metrics agnostic. see: * #4165 * #4166 * #4174 * #4127 Signed-off-by: katelyn martin <kate@buoyant.io>
this commit introduces an additional layer of telemetry to the inbound proxy's http router. either http and grpc metrics are used, depending upon the policy that authorized a given request. this is based upon #4174, which refactored the request body telemetry middleware to be metrics agnostic. see: * #4165 * #4166 * #4174 * #4127 * #4186 Signed-off-by: katelyn martin <kate@buoyant.io>
this commit introduces an additional layer of telemetry to the inbound proxy's http router. either http and grpc metrics are used, depending upon the policy that authorized a given request. this is based upon #4174, which refactored the request body telemetry middleware to be metrics agnostic. see: * #4188 * #4187 * #4186 * #4174 * #4165 * #4166 * #4127 Signed-off-by: katelyn martin <kate@buoyant.io>
this commit introduces an additional layer of telemetry to the inbound proxy's http router. either http and grpc metrics are used, depending upon the policy that authorized a given request. this is based upon #4174, which refactored the request body telemetry middleware to be metrics agnostic. see: * #4188 * #4187 * #4186 * #4174 * #4165 * #4166 * #4127 Signed-off-by: katelyn martin <kate@buoyant.io>
this commit introduces an additional layer of telemetry to the inbound proxy's http router. either http and grpc metrics are used, depending upon the policy that authorized a given request. this is based upon #4174, which refactored the request body telemetry middleware to be metrics agnostic. see: * #4188 * #4187 * #4186 * #4174 * #4165 * #4166 * #4127 Signed-off-by: katelyn martin <kate@buoyant.io>
this commit introduces an additional layer of telemetry to the inbound proxy's http router. either http and grpc metrics are used, depending upon the policy that authorized a given request. this is based upon #4174, which refactored the request body telemetry middleware to be metrics agnostic. see: * #4188 * #4187 * #4186 * #4174 * #4165 * #4166 * #4127 Signed-off-by: katelyn martin <kate@buoyant.io>
this commit introduces an additional layer of telemetry to the inbound proxy's http router. either http and grpc metrics are used, depending upon the policy that authorized a given request. this is based upon #4174, which refactored the request body telemetry middleware to be metrics agnostic. see: * #4189 * #4188 * #4187 * #4186 * #4174 * #4165 * #4166 * #4127 Signed-off-by: katelyn martin <kate@buoyant.io>
this commit makes a small refactor to the inbound proxy's
metrics::layer()middleware in the interest of future-proofing it before additional metrics layers are introduced.this will mean that the call site in
http/router.rswill not need to be updated repeatedly as we introduce request/response body frame size metrics, duration histograms, and so forth.