Skip to content
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

Add functionality to add "Debug handlers" to the channel pipelines #596

Open
Lukasa opened this issue Jun 16, 2022 · 1 comment · May be fixed by #801
Open

Add functionality to add "Debug handlers" to the channel pipelines #596

Lukasa opened this issue Jun 16, 2022 · 1 comment · May be fixed by #801
Labels
kind/enhancement Improvements to existing feature.

Comments

@Lukasa
Copy link
Collaborator

Lukasa commented Jun 16, 2022

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.

@Lukasa Lukasa added the kind/enhancement Improvements to existing feature. label Jun 16, 2022
@weissi
Copy link
Contributor

weissi commented Aug 3, 2022

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.
@clintonpi clintonpi linked a pull request Jan 21, 2025 that will close this issue
@glbrntt glbrntt linked a pull request Jan 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements to existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants