-
Notifications
You must be signed in to change notification settings - Fork 269
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
feat(app): Backend frame count metrics #3308
Commits on Nov 20, 2024
-
feat(app): Backend response frame count metrics
this introduces a new tower middleware for Prometheus metrics, used for instrumenting HTTP and gRPC response bodies, and observing (a) the number of frames yielded by a body, and (b) the number of bytes included in body frames. this middleware allows operators to reason about how large or small the packets being served in a backend's response bodies are. a route-level middleware that instruments request bodies will be added in a follow-on PR. ### 📝 changes an overview of changes made here: * the `linkerd-http-prom` has a new `body_data` submodule. it exposes `request` and `response` halves, to be explicit about which body is being instrumented on a `tower::Service`. * the `linkerd-http-prom` crate now has a collection of new dependencies: `bytes` is added as a dependency in order to inspect the data chunk when the inner body yields a new frame. `futures-util` and `http-body` are added as dev-dependencies for the accompanying test coverage. * body metrics are affixed to the `RouteBackendMetrics<L>` structure, and registered at startup. Signed-off-by: katelyn martin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b8c1867 - Browse repository at this point
Copy the full SHA b8c1867View commit details -
review: Inline attribute to service passthrough
Signed-off-by: katelyn martin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0da2152 - Browse repository at this point
Copy the full SHA 0da2152View commit details -
review: Inline attribute to body passthrough
continuing this theme of inlining, we inline the passthrough methods on `Body` as well. Signed-off-by: katelyn martin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 670143c - Browse repository at this point
Copy the full SHA 670143cView commit details -
review: Box
<RecordBodyData as Service>::Future
valuesSigned-off-by: katelyn martin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0d4a41b - Browse repository at this point
Copy the full SHA 0d4a41bView commit details -
review: rename
get()
tometrics()
Signed-off-by: katelyn martin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5a1a978 - Browse repository at this point
Copy the full SHA 5a1a978View commit details -
review: simplify
RecordBodyData<S>
responseSigned-off-by: katelyn martin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f147343 - Browse repository at this point
Copy the full SHA f147343View commit details -
Update ResponseBody metrics to use a histogram
Signed-off-by: Oliver Gould <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for da6e10c - Browse repository at this point
Copy the full SHA da6e10cView commit details -
refactor(tests): feature gate frame size histogram assertions
see: * prometheus/client_rust#242 * prometheus/client_rust#241 for now, refactor this test so that it gates all use of the (proposed) `sum()` and `count()` accessors behind a temporary feature gate. Signed-off-by: katelyn martin <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 33f5f60 - Browse repository at this point
Copy the full SHA 33f5f60View commit details