opentelemetry-java-instrumentation icon indicating copy to clipboard operation
opentelemetry-java-instrumentation copied to clipboard

xxl-job add job thread

Open lrwh opened this issue 11 months ago • 3 comments

Is your feature request related to a problem? Please describe.

The output information of job thread logs does not have link information. Job thread is part of the job. Can its logs be bound to the link。

57218a64b49058cb482fdcbba33bd33a 998deae337fab33c[${APP_GROUP}][xxl-job-executor-sample-springboot][2024-03-25 16:24:22.354][INFO ][cloudt:][requestId:] [threadId:] [traceId-xxl-job, EmbedServer bizThreadPool-556567184raceId] [service:] [trace_id:] [span_id:] com.xxl.job.core.biz.impl.ExecutorBizImpl.run(ExecutorBizImpl.java:50) - >> do ExecutorBizImpl run
57218a64b49058cb482fdcbba33bd33a 998deae337fab33c[${APP_GROUP}][xxl-job-executor-sample-springboot][2024-03-25 16:24:22.356][INFO ][cloudt:][requestId:] [threadId:] [traceId-xxl-job, EmbedServer bizThreadPool-556567184raceId] [service:] [trace_id:] [span_id:] com.xxl.job.core.biz.impl.ExecutorBizImpl.run(ExecutorBizImpl.java:152) - pushResult : null
 [${APP_GROUP}][xxl-job-executor-sample-springboot][2024-03-25 16:24:22.356][INFO ][cloudt:][requestId:] [threadId:] [traceId-xxl-job, JobThread-1-1711355024780raceId] [service:] [trace_id:] [span_id:] com.xxl.job.core.thread.JobThread.run(JobThread.java:131) - >> thread jobid:1
c104939faab53172e9a69235ed7bbf7d 5c2b248aa2614014[${APP_GROUP}][xxl-job-executor-sample-springboot][2024-03-25 16:24:22.361][INFO ][cloudt:][requestId:] [threadId:] [traceId-http-nio-8081-exec-2raceId] [service:] [trace_id:] [span_id:] com.xxl.job.executor.mvc.controller.IndexController.second(IndexController.java:37) - do second success
c104939faab53172e9a69235ed7bbf7d 8d9592575f167ca9[${APP_GROUP}][xxl-job-executor-sample-springboot][2024-03-25 16:24:22.364][INFO ][cloudt:][requestId:] [threadId:] [traceId-xxl-job, JobThread-1-1711355024780raceId] [service:] [trace_id:] [span_id:] com.xxl.job.executor.service.jobhandler.SampleXxlJob.demoJobHandler(SampleXxlJob.java:51) - body:do second success
c104939faab53172e9a69235ed7bbf7d 8d9592575f167ca9[${APP_GROUP}][xxl-job-executor-sample-springboot][2024-03-25 16:24:22.364][INFO ][cloudt:][requestId:] [threadId:] [traceId-xxl-job, JobThread-1-1711355024780raceId] [service:] [trace_id:] [span_id:] com.xxl.job.executor.service.jobhandler.SampleXxlJob.demoJobHandler(SampleXxlJob.java:52) - this is demoJobHandler

Among them, com.xxl.job.core.thread.JobThread.run(JobThread.java:131) - >> thread jobid:1 is missing the link part

Describe the solution you'd like

Expect jobthread related logs to also be added to link information

Describe alternatives you've considered

Expect jobthread related logs to also be added to link information

Additional context

No response

lrwh avatar Mar 25 '24 08:03 lrwh

The output information of job thread logs does not have link information.

Sorry, I didn't understand what the link information is clearly. Can you explain more about your demand and tell us why you want the extra information?

steverao avatar Mar 25 '24 13:03 steverao

JobThread is a single thread that divides job admin and job exec (executor) into two. The jobThread thread log information cannot obtain the traceid, and the link information is not passed down.

lrwh avatar Apr 01 '24 03:04 lrwh

JobThread is a single thread that divides job admin and job exec (executor) into two. The jobThread thread log information cannot obtain the traceid, and the link information is not passed down.

Each JobThread has a IJobHandler, the actual task is executed in IJobHandler, you can obtain the traceid in IJobHandler.

123liuziming avatar Apr 17 '24 04:04 123liuziming