Describe the bug
The traceId will be lost when the log is printed
Steps to reproduce
private ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<>());
@RequestMapping("/test/get/{value}")
void test(@PathVariable("value") String value) throws InterruptedException {
log.info("traceId :{}", Span.current().getSpanContext().getTraceId());
threadPoolExecutor.submit(() -> {
log.info("thread pool info : {}, ", Span.current().getSpanContext().getTraceId());
try {
Thread.sleep(10000L);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
});
}
You can reproduce this by sending more than two requests (Just larger than the thread pool capacity + 1)within 10 seconds.
Expected behavior
Every log can record the traceId
Actual behavior
TraceId is not recorded in the logs after the second one.
Javaagent or library instrumentation version
2.20.1
Environment
JDK: 8
OS: Mac
Additional context
I use version 1.13.3(I just found an old version) and there is no such problem
I start my spring container using the following command:
-javaagent:/XXX/opentelemetry-javaagent-old.jar
-Dotel.traces.exporter=logging
-Dotel.metrics.exporter=none
-Dotel.logs.exporter=none
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Describe the bug
The traceId will be lost when the log is printed
Steps to reproduce
You can reproduce this by sending more than two requests (Just larger than the thread pool capacity + 1)within 10 seconds.
Expected behavior
Every log can record the traceId
Actual behavior
TraceId is not recorded in the logs after the second one.
Javaagent or library instrumentation version
2.20.1
Environment
JDK: 8
OS: Mac
Additional context
I use version 1.13.3(I just found an old version) and there is no such problem
I start my spring container using the following command:
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.