DataDog / dd-trace-java

Datadog APM client for Java
https://docs.datadoghq.com/tracing/languages/java
Apache License 2.0
592 stars 292 forks source link

Traces are not propagated from Spring WebFlux WebFilter into a suspend handler function (Kotlin) #6273

Open igor-baltiyskiy-tempo opened 1 year ago

igor-baltiyskiy-tempo commented 1 year ago

When a Controller with suspend handler function is used, and there's a WebFilter that uses mono {} builder function from Kotlin, then traces from WebFilter are not propagated to the handler function.

See attached sample project.

dd-trace-bug-repro.zip

rajki commented 12 months ago

+1, also facing the same issue.

dyoma commented 11 months ago

We did more research and it turned out that with the following options the sample server works as expected. Here we disable all integrations and enable only Kotlin coroutines, Reactor and Netty:

-Ddd.trace.integration.opentracing.enabled=true
-Ddd.integrations.enabled=false
-Ddd.trace.integration.kotlin_coroutine.experimental.enabled=true
-Ddd.trace.integration.reactor-core.enabled=true
-Ddd.trace.integration.reactor-hooks.enabled=true
-Ddd.trace.integration.netty.enabled=true

BTW, the documentation misses the reactor-hooks option for Project Reactor