-
Notifications
You must be signed in to change notification settings - Fork 123
Add functionality to add "Debug handlers" to the channel pipelines #596
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
Labels
kind/enhancement
Improvements to existing feature.
Comments
Yes please, I use that functionality pretty much on every gRPC server/client I've ever created :). |
clintonpi
added a commit
to clintonpi/async-http-client
that referenced
this issue
Jan 21, 2025
Motivation: As requested in swift-server#596, it can be handy to have a lower-level access to channels (HTTP/1 connection, HTTP/2 connection, or HTTP/2 stream) to enable a more fine-grained interaction for, say, observability, testing, etc. Modifications: - Add 3 new properties (`http1_1ConnectionDebugInitializer`, `http2ConnectionDebugInitializer` and `http2StreamChannelDebugInitializer`) to `HTTPClient.Configuration` with access to the respective channels. These properties are of `Optional` type `@Sendable (Channel) -> EventLoopFuture<Void>` and are called when creating a connection/stream. Result: Provides APIs for a lower-level access to channels.
glbrntt
added a commit
that referenced
this issue
Apr 25, 2025
Motivation: As requested in #596, it can be handy to have a lower-level access to channels (HTTP/1 connection, HTTP/2 connection, or HTTP/2 stream) to enable a more fine-grained interaction for, say, observability, testing, etc. Modifications: - Add 3 new properties (`http1_1ConnectionDebugInitializer`, `http2ConnectionDebugInitializer` and `http2StreamChannelDebugInitializer`) to `HTTPClient.Configuration` with access to the respective channels. These properties are of `Optional` type `@Sendable (Channel) -> EventLoopFuture<Void>` and are called when creating a connection/stream. Result: Provides APIs for a lower-level access to channels. --------- Co-authored-by: Cory Benfield <[email protected]> Co-authored-by: David Nadoba <[email protected]> Co-authored-by: George Barnett <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A useful trick we learned in grpc-swift is that it can be handy to allow users to insert a "debug handler" (or several) into each channel pipeline. This should usually be given the option to insert itself anywhere in the pipeline (meaning we should probably name our handlers), and can enable all kinds of useful observability and testing. We may need to be careful for HTTP/2, and we should consider @glbrntt's grpc experience here.
The text was updated successfully, but these errors were encountered: