kamon-io / kamon-http4s

Kamon Integration for http4s
Apache License 2.0
53 stars 29 forks source link

Kamon looses context when http4s client raises an exception #56

Open matwojcik opened 1 year ago

matwojcik commented 1 year ago

If the http4s client raises an exception - e.g. when e.g. java.util.concurrent.TimeoutException is raised after setting connection timeout:

BlazeClientBuilder[F]
      .withRequestTimeout(100.millis)

then it seems that kamon context is lost, and e.g. traceId is not propagated to MDC for logging.

If there is not any exception but a request ending with e.g. 500, then it seems to be working fine.