Skip to content

net/http/httptrace: add hooks for errors and response body closed #16400

@dominikh

Description

@dominikh

The current version of httptrace allows tracking most states of a request's live cycle, except for an overall error (all dials failed or protocol errors) and the closing of the response body. Both of these things can already be tracked by writing a custom RoundTripper, however if httptrace had hooks for these things, it would allow for the full instrumentation (e.g. metrics and tracing) of requests without needing to split it up between two mechanisms.

/cc @bradfitz

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions