-
Notifications
You must be signed in to change notification settings - Fork 78
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
Http4s Middlewares for Client and Server #75
Conversation
I need to reconcile this with something I wrote myself, so hang tight. Thanks. |
def spannedClient[F[_]](client: Client[F], clientName: String)(implicit F: Sync[F], S: Span[F]): Client[F] = { | ||
Client[F](request => | ||
for { | ||
s <- S.span(s"http4s-request-$clientName") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was under the impression Span isn't meant to be used like that (it's a data type and not a type class) and that Trace[F].span
/ Trace[F].add
should be used to create new spans. Is that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, I suppose the difference between Trace
and Span
is just not very clear to me. I can change this to use Trace
instead if that's desired!
I have some much better changes to make here I think, so I'll update this sometime in the next few days. |
Any new updates here? |
@DamienOReilly Sorry, haven't been able to swing back around. I'll see if I can get this updated soon! |
@tbrown1979 no worries, thanks for the update. |
@tbrown1979 Is there any way someone else could assist with the completion of this PR? I'm making some http4s services soon and really want to use this library for tracing. I'm willing to contribute and am really trying to avoid forking this and merging it myself as a temporary measure 😅 |
I won't be finishing this PR. If someone else would like to pick this up feel free! |
Addresses #5
Okay, so there's been a lot of talk on #5 about what we should do for an http4s module. I've had these changes locally for a long time so I've decided to PR it. They're similar to what I've done for an internal library at my company. I realize this PR isn't really inline with what has been suggested on #5, so feel free to request changes and I will happily make them. I just wanted to get something up that we can iterate on and ultimately get merged.