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

Rewrite tracing middleware #365

Open
jplatte opened this issue May 3, 2023 · 3 comments
Open

Rewrite tracing middleware #365

jplatte opened this issue May 3, 2023 · 3 comments
Assignees
Labels
breaking change A PR that makes a breaking change. C-musings Category: musings about a better world E-hard Call for participation: Experience needed to fix: Hard / a lot T-middleware Topic: middleware

Comments

@jplatte
Copy link
Collaborator

jplatte commented May 3, 2023

There are a few problems with the current tracing middleware:

  • It is overly generic, making it hard to grok
  • The body type it uses doesn't (ever) implement Default, but other middleware requires this bound

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.

@jplatte jplatte added C-musings Category: musings about a better world E-hard Call for participation: Experience needed to fix: Hard / a lot T-middleware Topic: middleware breaking change A PR that makes a breaking change. labels May 3, 2023
@Oliboy50
Copy link
Contributor

Oliboy50 commented May 9, 2023

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
Copy link
Collaborator Author

jplatte commented May 9, 2023

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

@jplatte
Copy link
Collaborator Author

jplatte commented Jun 24, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A PR that makes a breaking change. C-musings Category: musings about a better world E-hard Call for participation: Experience needed to fix: Hard / a lot T-middleware Topic: middleware
Projects
None yet
Development

No branches or pull requests

2 participants