Comments (4)
The root cause is classpath related. The loader ParallelWebappClassLoader
has a delegate: false
property. What this means is that spring boot's classloader will load OT without delegating to the parent (bootstrap) loader. This will actually cause two different sets of OpenTracing classes to appear at runtime. One will be the OT classes used by Datadog, and the other the OT classes loaded by spring-boot.
The Datadog instrumentation notices this setup and backs its instrumentation off because injecting instrumentation in that scenario won't have the desired effect.
I realize this isn't a good "out of the box" experience. We're working on a long-term fix for these type of classloading scenarios.
In the meantime either one of these workarounds can be used:
- Configure the web classloaders with
delegate=true
: https://qiita.com/tkprof/items/b92d3a245045480afd26 - Put the OpenTracing classes on the system classpath instead of the web classpath
from dd-trace-java.
Thanks for the information! Since this is a traditional Spring app deployed to Tomcat as a WAR file it was easy to just add <Loader delegate="true"/>
to the Tomcat context.xml
. This has fixed the problem.
I'll leave this issue open to because the out-of-box experience could indeed use some improvement, but feel free to close it if this is already tracked somewhere else.
from dd-trace-java.
It's fine to leave this open. We'll track this and close it out when the fix lands. Thanks for confirming the workaround!
from dd-trace-java.
I think this is solved in 0.25.0+
with #741. Closing. Please reopen if still a problem.
from dd-trace-java.
Related Issues (20)
- Graphql-java 22 support HOT 3
- Missing @http.status_code in Play HOT 3
- Dynamic Instrumentation fails to start when tracing is configured to use UDS HOT 5
- java.lang.IllegalStateException: Shutdown in progress in dd-ci-git-data-uploader HOT 1
- Google PubSub DD service name is hardcoded
- Latest java agent 1.35.1 and .2 breaks APM tracing HOT 7
- Kotlin coroutine instrumentation missing spans in trace
- Datadog Trace Span Issue with MySQL Batch Inserts using MySQL Connector/J
- Akka scheduler tasks should create spans
- Unable to capture gRPC list field in dynamic instrumentation HOT 1
- Datadog Trace Span Issue with Apache HttpClient5 HOT 3
- How to change DataDog java agent trace api version to V0.5 HOT 2
- Quarkus 3.12.1 + Kafka + DD + Native = BOOM HOT 23
- HTTP 400 Bad Request being marked as a false positive server error in Keycloak HOT 5
- Graphql-java 22 Support Still Not Working HOT 5
- Outgoing http requests are not instrumented with datadog tracer - Spring Boot / RestClient / Eclipse Jetty Client 12.0.5 HOT 4
- DD_TRACE_HEADER_BAGGAGE environment variable is not being honoured HOT 2
- Cannot invoke "datadog.trace.civisibility.config.JvmInfo.getName()" because "jvmInfo" is null HOT 3
- OSGI Bundle availability (Adobe Experience Manager)
- Question: Ask for help about IDEA load the project failed HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dd-trace-java.