Allow configurable prefix for MDC keys
@maciejdudko is already working on this.
Since Sep 8, 2026.
Assessment
This issue has not been assessed yet.
Description
The SDK writes around 21 MDC keys like WorkflowId, Namespace, TaskQueue, Attempt.
These names aren't configurable.
Ask is for an SDK option to add a prefix to them. Blank by default for backwards
compatibility.
The only workaround today is renaming keys in the logging config, which doesn't fully work:
- Matches are on key name only. An app that sets its own
Namespacekey gets that value
relabelled totemporal.Namespace, even though it didn't come from Temporal. - Every key a new SDK release adds —
NexusServiceandNexusOperation, for example — has
to be added to the rename list by hand, and there's nothing to tell you it's missing.
If possible make this a WorkerFactory setting so it applies to all workers created from it.
One thing to watch: 19 of the keys are constants in LoggerTag, but ReplayWorkflowExecutor
writes "Signals" and "Updates" as string literals. A prefix applied only to LoggerTag
would skip those.
- Dominant language
- Java
- Stars
- 433
- Forks
- 249
- Avg merge
- 6d 5h
- Merged PRs (30d)
- 25
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.
More from temporalio/sdk-java
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
temporalio/sdk-java#2676 · 8 comments · 2 reactions ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
temporalio/sdk-java#1825 ·
-
test server
Difficulty 4/5 3-5 days Newbie friendliness 42/100
temporalio/sdk-java#3088 · 2 comments ·
-
temporalio/sdk-java#3059 · 1 assignee ·
-
temporalio/sdk-java#3026 · 1 comment · 1 assignee ·
All issues in temporalio/sdk-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
checkstyle/test-configs#263 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·