Comments (2)
Hi @mwirges, yes it is intentional that the flag be set. However we can explore some options to make things more smooth on your end.
First, some context. Propagating our trace by default can cause problems because the executor instrumentation is too low level to know where to start and stop automatically. This sometimes causes traces to be linked across logical boundaries. We've seen http servers with code like this:
writeResponseToUser(response);
// the executor instrumentation will link this call to submit
// causing the two requests to be captured under the same trace
threadPool.submit(processNextRequestCallback);
To avoid this issue we're using higher level instrumentation to turn the async instrumentation on and off at the appropriate times.
For example, in play we enable async instrumentation when the request comes in and disable when the response goes out.
Setting this flag does not require a dependency on dd-trace-ot
, just on dd-trace-api
, which is a smaller library with no transitive dependencies. https://mvnrepository.com/artifact/com.datadoghq/dd-trace-api/0.7.0
As a solution, we can add async logic to our builtin servlet instrumentation similar to what we do with play. That will give you the old behavior when using async libraries inside a servlet request. What do you think about that?
from dd-trace-java.
@realark yeah understood on not wanting to inadvertently continue unrelated things. I do think turning it on from servlet instrumentation automatically would be helpful. Thanks for clarifying on dd-trace-api; I'll give that a whirl in the meantime.
from dd-trace-java.
Related Issues (20)
- 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
- dd-java-trace SO crash in ElfParser::parseProgramHeaders HOT 2
- Multiple unrelated play/akka.http requests share same trace HOT 1
- Kafka client Instrument don't have peer hostname HOT 2
- cp: can't stat '/datadog-init/dd-java-agent.jar': No such file or directory HOT 2
- shadowJar task does not include custom builds of the profiler as documented
- -Djava.library.path=WARNING: Unable to get VM args through reflection... HOT 3
- Java 21 + virtual thread
- Disable Status 404 grouping as resource name in APM traces HOT 1
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.