DataDog / dd-trace-java

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

Finagle/Netty creating separate traces #893

Closed jack-garner closed 5 years ago

jack-garner commented 5 years ago

Some of the projects we are trying to trace use Finagle/Finatra as the http server. Since they use Netty behind the scenes, we can get automatic tracing when a request comes in, but can't get annotated functions to show up in the same trace. We end up with one trace with "Get /route" and only a single span, and another trace with the all of the function calls. What we expect to see is a single trace with "Get /route" as the root and all of the function calls underneath it. Is there some way to connect these traces or to figure out where the connection is being lost?

milanvdm commented 5 years ago

We have the same issue with akka-http-server and akka-http-client. Both parts show up in a separate span/with a different trace-id.

milanvdm commented 5 years ago

Seems to be related to https://github.com/DataDog/dd-trace-java/issues/800

randomanderson commented 5 years ago

@jack-garner We've made some significant improvements to the netty instrumentation in the 0.32.0 and 0.33.0 releases. Can you please try again with an updated version and let us know if the issue persists?

randomanderson commented 5 years ago

@jack-garner I believe the actual problem might have been the @Trace annotation. That was fixed in #1031 and released in 0.34.0. Closing this issue. Please reopen if the problem is still not solved.

@milanvdm Please create a new issue for akka. There are limitations to our akka instrumentation that are better discussed in a separate thread.