You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a possible minimal implementation of tracing for a http4s client, which is to lift the context to one allowing tracing, and also forwards the tracing headers; but otherwise does not create a new span or decorate the current span.
Reasons?
Firstly, it's a valid use case to not want the client to create a span. Maybe there are issues with forwarding trace data for this particular service, or the extra span adds unneeded extra information. However, you will still want to forward headers, so that downstream and upstream services can still be connected for the larger trace.
Secondly, the creation of span attributes can be something that users want to customize. E.g. if you want to match OpenTelemetry attribute names, amongst other things. By putting the monad lifting into one place, it makes adding custom behavior much simpler, as you can just use Trace[F].span etc. inside your application code. It's basically a nice building block for custom client tracing schemes.
Example code - doesn't have a Ctx parameter, but shows the general idea:
There is a possible minimal implementation of tracing for a http4s client, which is to lift the context to one allowing tracing, and also forwards the tracing headers; but otherwise does not create a new span or decorate the current span.
Reasons?
Trace[F].span
etc. inside your application code. It's basically a nice building block for custom client tracing schemes.Example code - doesn't have a
Ctx
parameter, but shows the general idea:The text was updated successfully, but these errors were encountered: