furaul opened a new issue #7407:
URL: https://github.com/apache/skywalking/issues/7407
Please answer these questions before submitting your issue.
- Why do you submit this issue?
- [x] Question or discussion
- [ ] Bug
- [ ] Requirement
- [ ] Feature or performance improvement
___
### Question
- What do you want to know?
I am developing a threading plugin to make it possible to trace cross
threads. Other than current trace-cross-thread implementations in SkyWalking,
my implementation enhanced ThreadPoolExecutor and ForkJoinTask, like alibaba
transmitable-thread-local, and I have encountered a problem.
In my plugin, the ForkJoinTask constructor has been enhanced, I found that
SkyWalking create a new constructor with ByteBuddy, and the parameter of this
new construtor is a generated class with random names, like this.
```
public ForkJoinTask() {
this(null);
ForkJoinTaskConstructorInterceptor_internal.intercept(this,
(Object[])new Object[0]);
}
private /* synthetic */ ForkJoinTask(auxiliary.MtewiML4 mtewiML4) {
}
```
I realized that the rebase strategy is used in Byte-Buddy in SkyWalking.
When javassist in transmitable-thread-local enhance the ForkJoinTask that
has been enhanced by SkyWalking, the class named auxiliary.MtewiML4 could not
be found, because it is generated by SkyWalking.
I want to slove this problem, and I have got three solutions.
1. Use redefine strategy of Byte-Buddy in SkyWalking(I dont know why
SkyWalking using rebase strategy, and I am not sure what it really effects when
I changed it.)
2. Avoid enhanced private construtors of ForkJoinTask in
transmitable-thread-local (This solution makes TTL compatible, but I have to
change javassist code)
3. Do not enhance ForkJoinTask, enhance ForkJoinPool or some classes else.
(This may solve my problem, but the compatible problem is still unresolved)
What is your opinion?
___
### Bug
- Which version of SkyWalking, OS, and JRE?
- 8.2.0 OSX java1.8
- Which company or project?
- Didi
- What happened?
If possible, provide a way to reproduce the error. e.g. demo application,
component version.
The enhanced code is not compatible.
___
### Requirement or improvement
- Please describe your requirements or improvement suggestions.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]