Comments (16)
@tylerbenson Super simple
https://gist.github.com/codylerum/5341b1f1703708558be255e67ab18ff0
from dd-trace-java.
@tylerbenson updated to 0.22.0 and all seems to be working fine.
from dd-trace-java.
Hi @snusontable! Thanks for your bug report!
It turns out that we may have been working on a problem that is similar to yours. Could you please try this snapshot version of the agent: https://4867-89221572-gh.circle-artifacts.com/0/home/circleci/dd-trace-java/libs/dd-java-agent-0.10.0-SNAPSHOT.jar and let is know if that resolves your problem.
Thanks!
from dd-trace-java.
Hey.
Thanks for the incredibly fast response. Unfortunately we still get the exception and an error:
EXCEPTION java.lang.ClassCastException: datadog.trace.instrumentation.java.concurrent.ExecutorInstrumentation$CallableWrapper cannot be cast to company.common.asynchronous.immediatetasking.TaskWrapper company.common.asynchronous.immediatetasking.WrapperFutureTask.<init>(WrapperFutureTask.java:42) company.common.asynchronous.immediatetasking.TaskExecutorThreadPool.newTaskFor(TaskExecutorThreadPool.java:57) java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:133) company.common.asynchronous.immediatetasking.TaskExecutorThreadPool.submit(TaskExecutorThreadPool.java:48) company.common.asynchronous.immediatetasking.TaskExecutor.addTask(TaskExecutor.java:246) company.common.asynchronous.immediatetasking.TaskExecutor.addTask(TaskExecutor.java:218) company.common.asynchronous.immediatetasking.TaskExecutor.execute(TaskExecutor.java:99)...
and
Error logging in. Error: java.lang.ClassCastException: datadog.trace.instrumentation.java.concurrent.ExecutorInstrumentation$CallableWrapper cannot be cast to company.common.asynchronous.immediatetasking.TaskWrapper
from dd-trace-java.
Hi. Thanks for your response.
I'm sorry to hear that fix we are currently working on doesn't solve your problem.
So it looks like some of the instrumentation DataDog Java agent does may indeed be in conflict with your code. More specifically DataDog Java agent wraps all Runnable
s and Callable
s in ExecutorInstrumentation${Runnable,Callable}Wrapper
in order to be able to trace those calls. It looks like some of your code expects your specific instances of TaskWrapper
and DataDog's wrapping is causing problems.
It would be helpful to see relevant parts of company.common.asynchronous.immediatetasking.TaskExecutor
, company.common.asynchronous.immediatetasking.TaskExecutorThreadPool
, company.common.asynchronous.immediatetasking.WrapperFutureTask
and company.common.asynchronous.immediatetasking.TaskWrapper
- which ever parts you may share to be able to better understand your usage and potentially come up with the solution.
Thanks!
from dd-trace-java.
Running into the same issue now after moving from 0.7.0 -> 0.12.0
This is running in a Wildfly 11 container.
2018-08-09 14:11:56,042 SEVERE [org.glassfish.enterprise.concurrent] (EE-ManagedExecutorService-default-Thread-83) java.lang.ClassCastException: datadog.trace.instrumentation.java.concurrent.ExecutorInstrumentation$RunnableWrapper cannot be cast to org.glassfish.enterprise.concurrent.internal.ManagedFutureTask
I've rolled back to 0.7.0 as this was stopping my managed executor from running
from dd-trace-java.
This is a very standardized Java EE way of executing code.
Simply calling ManagedExecutorService#execute and passing in a call that implements Runnable.
from dd-trace-java.
@codylerum Thanks for the report. We will look into it. It would be helpful if you could provide a snippet of code with how you're interacting with ManagedExecutorService
(construct, call into, etc)
from dd-trace-java.
Running into the same issue here, on Wildfly 10.1 and 0.13.0 of the agent:
java.lang.ClassCastException: datadog.trace.instrumentation.java.concurrent.ExecutorInstrumentation$RunnableWrapper cannot be cast to org.glassfish.enterprise.concurrent.internal.ManagedFutureTask
Our interaction with ManagedExecutorService is also a very simple one:
executor.execute( code );
from dd-trace-java.
Thanks @codylerum @asidorenko-nexonia. We're working on a long-term fix. It's a top priority, but the change is deep so it may be a few releases before it's ready.
For now the best workaround is to disable the concurrent instrumentation: -Ddd.integration.java_concurrent.enabled=false
from dd-trace-java.
@realark Any ETA on this? At this point we are just hanging back on the 0.7.0 release
from dd-trace-java.
@codylerum we made some improvements in 0.16.0
that may improve things for your specific case (3d78afb) but we are actively working on a longterm solution. (See latest work here: #564)
Either way, you can still apply the setting that @realark mentioned to disable the executor instrumentation. That should allow you to update either way.
from dd-trace-java.
@codylerum @asidorenko-nexonia Thanks for your patience. We have a fix out in our latest 0.19.0 release. I'd appreciate it if you could try running with the fix yourselves. We've done a lot of testing on our end but the instrumentation is pretty generic so there may be an environment we didn't consider.
from dd-trace-java.
@codylerum @asidorenko-nexonia any chance you were able to verify the fix in the latest versions? I'd like to close out this issue.
from dd-trace-java.
@tylerbenson I can confirm the fix is good. We're currently running 0.21.0 without issues. Thanks!
from dd-trace-java.
Great, thanks!
from dd-trace-java.
Related Issues (20)
- BUG: dd-trace-java with version 1.33.0 causes InvalidCookieDomainException. In 1.32.0 works fine. HOT 3
- Live-heap profiler (alpha) in dd-trace-java v1.33.0 crashes the JVM. (After updated from v1.32.0) HOT 6
- Play Scala integration tests are flaky
- Spark instrumentation tests are flaky
- DD agent is not compatible with Quarkus 3.10 HOT 2
- Gradle smoke tests are flaky HOT 1
- Maven smoke tests are flaky HOT 1
- JDBC connection service mapping not being used, and traceparent missing, in SQL comment HOT 6
- With Unix Domain Socket, DD_AGENT_HOST not ignored despite DD_TRACE_AGENT_URL HOT 4
- Jetty9 instrumentation tests are flaky
- Question: When will the next release happen? HOT 4
- Jetty9 instrumentation tests are flaky
- DebuggerSinkTest doesn't expect RC versions HOT 1
- Non-Error Exceptions thrown in spring controllers cause the span error flag to be set.
- v1.34.0 JVM crash HOT 4
- java.lang.UnsupportedOperationException from SnsInterceptor when trying to publish HOT 1
- Use hikari pool name as service name
- Graphql-java 22 support
- Missing @http.status_code in Play HOT 3
- Dynamic Instrumentation fails to start when tracing is configured to use UDS 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.