temporalio / temporalio/sdk-java
provide an option to print trace-id and span-id on java-sdk
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 433
- Forks
- 249
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 26
Description
Is your feature request related to a problem? Please describe.
Yes. currently trace-id and span-id are not being printed on logs with OpenTracingWorkerInterceptor.
Describe the solution you'd like
Add trace-id and span-id to MDC-context.
Describe alternatives you've considered
Workaround: Implement custom OpenTracingWorkerInterceptor, OpenTracingWorkflowInboundCallsInterceptor and OpenTracingActivityInboundCallsInterceptor
Additional context
This feature has been discussed in slack channel thread
https://temporalio.slack.com/archives/CTT84KXK9/p1655727317596189.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading OpenTracingWorkerInterceptor, OpenTracingWorkflowInboundCallsInterceptor, and OpenTracingActivityInboundCallsInterceptor to understand how trace context reaches logging. Check the Java SDK's MDC handling and verify that trace-id and span-id are available in MDC for logs when these interceptors are used.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100