You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/07/28 10:13:05 UTC
[GitHub] [skywalking] sun-rui opened a new issue, #9400: [Bug] jdk threadpool plugin does not intercept objects implementing the RunnableFuture interface
sun-rui opened a new issue, #9400:
URL: https://github.com/apache/skywalking/issues/9400
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues.
### Apache SkyWalking Component
Java Agent (apache/skywalking-java)
### What happened
For a traced Java application, skywalking can't trace the span correctly for some cross-thread operations via ThreadPoolExecutor.
### What you expected to happen
skywalking should successfully trace the span of the cross-thread operations via ThreadPoolExecutor.
### How to reproduce
for example logic like the follows:
ExecutorService executorService = Executors.newCachedThreadPool();
Callable callable = call() -> { return something.execute(); };
FutureTask futureTask = new FutureTask(callable);
executorService.execute(futureTask);
Skylaking can't successfully trace the span.
### Anything else
_No response_
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng closed issue #9400: [Bug] jdk threadpool plugin does not intercept objects implementing the RunnableFuture interface
Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #9400: [Bug] jdk threadpool plugin does not intercept objects implementing the RunnableFuture interface
URL: https://github.com/apache/skywalking/issues/9400
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] sun-rui commented on issue #9400: [Bug] jdk threadpool plugin does not intercept objects implementing the RunnableFuture interface
Posted by GitBox <gi...@apache.org>.
sun-rui commented on issue #9400:
URL: https://github.com/apache/skywalking/issues/9400#issuecomment-1197947459
The reason is the following:
```
public class ThreadPoolExecuteMethodInterceptor extends AbstractThreadingPoolInterceptor {
@Override
public Object wrap(Object param) {
...
if (param instanceof RunnableFuture) {
return null;
}
```
I don't know why objects implementing the RunnableFuture interface are excluded for interception. After I comment out the if statement , skywalking can trace the span.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org