temporalio / temporalio/sdk-java

provide an option to print trace-id and span-id on java-sdk

Open
#1,273 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.