-
Search before asking
Apache SkyWalking ComponentJava Agent (apache/skywalking-java) What happenedI want to get traceid in the sub thread。for example: final ExecutorService executorService = Executors.newFixedThreadPool(2);
@RequestMapping("/test1/log")
public String get1() {
logger.info(Thread.currentThread().getName() + "------->" + TraceContext.traceId());
executorService.submit(() -> {
logger.info(Thread.currentThread().getName() + "------->" + TraceContext.traceId());
});
return "1";
} result: What you expected to happenhttp-nio-8090-exec-1------->Ignored_Trace How to reproduceno code Anything elseNo response Are you willing to submit PR?
Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Answered by
wu-sheng
Jul 12, 2022
Replies: 1 comment
-
The simple answer is, that it should not have a trace ID. Don't submit an issue rather than a discussion randomly. Learn more about the tracing, and manual APIs for crossing threads propagation. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
wu-sheng
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The simple answer is, that it should not have a trace ID. Don't submit an issue rather than a discussion randomly.
Learn more about the tracing, and manual APIs for crossing threads propagation.