Open qwe2 opened 1 month ago
This issue breaks context propagation in Play applications when using filters, since filters use Promise
: https://github.com/playframework/playframework/blob/d1f1b9f8cd8d564933381967b4e623b8842c2377/core/play/src/main/scala/play/api/mvc/Filters.scala#L62
Using the following config seems to work as a workaround for Play filters (taken from the docs as better option to outright disabling executor-service
):
kanela {
modules {
executor-service {
exclude += "scala.concurrent.impl.*"
}
scala-future.enabled = true
}
}
The following code prints
null
onKamon v2.7.3 / Kanela v1.0.18
(scala 2.13.14):This should print
bar
, which it does on older versions. Tested on2.1.3
where it was still working. I suspect the issue is thatFutureChainingInstrumentation
has been deprecated and disabled by default, and the replacement does not work onPromise
. The above code works correctly onKamon v2.7.3
with the below config:Note that unless
executor-service
is disabled, enablingscala-future
results in~Additionally, the
scala-future
module is completely broken when used together withsbt-kanela-runner 2.1.0
. For some reason,scala.util.Success
does never get instrumented (interestingly,Failure
does) when running on this version. It is working properly onsbt-kanela-runner 2.0.14
however. I have not investigated this any further.~ This was an issue withjavaagent
missing fromjavaOptions
(https://github.com/kamon-io/sbt-kanela-runner/issues/30).