tower-rs / tower-http

HTTP specific Tower utilities.
691 stars 163 forks source link

Rewrite tracing middleware #365

Open jplatte opened 1 year ago

jplatte commented 1 year ago

There are a few problems with the current tracing middleware:

It would be nice if we could come up with a different tracing middleware that fulfills most or all of the current ones' use cases without sharing these problems.

Oliboy50 commented 1 year ago

The body type it uses doesn't (ever) implement Default, but other middleware requires this bound

Can you elaborate on how it impacts users, please? Because we use this layer along with other ones from this repository and have no issue so far.

jplatte commented 1 year ago

It leads to some chains of middlewares not compiling. If you've got a project that builds successfully, it doesn't affect you.

jplatte commented 1 year ago

I've taken a first step in #380, which only simplifies the implementation, not the interface.

Having looked at most of the code though, one piece in particular that stands out as really complex / abstract is the classify API. I have never used it and wonder if it's worth keeping it at all. @davidpdrsn how much of this are you using, and are you aware of others using it?