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
Namespace key gets that value
relabelled to temporal.Namespace, even though it didn't come from Temporal.
- Every key a new SDK release adds —
NexusService and NexusOperation, 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.
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:
Namespacekey gets that valuerelabelled to
temporal.Namespace, even though it didn't come from Temporal.NexusServiceandNexusOperation, for example — hasto 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, butReplayWorkflowExecutorwrites
"Signals"and"Updates"as string literals. A prefix applied only toLoggerTagwould skip those.