docs(logging): document Java 2.x MDC keys - #692
Conversation
|
|
||
| Java SDK 2.x uses `executionArn`, `operationId`, and `operationName` by default. | ||
| Applications migrating log queries or dashboards from 1.x can temporarily emit | ||
| `durableExecutionArn`, `contextId`, and `contextName` instead: |
There was a problem hiding this comment.
Codex AI review · Finding arf_v1_ewlk5oveokuvpuhmprfzmfnjv2
oldKeyNames=true does not replace operationId or operationName on StepContext logs; those keys are always emitted, while only the ARN key changes. Since the preceding example is a step log, this may lead users to query for fields that never appear. Clarify that contextId/contextName apply to durable child-context logs and that step logs retain operationId/operationName.
| "level": "INFO", | ||
| "message": "Processing order: ORD-123", | ||
| "durableExecutionArn": "arn:aws:lambda:us-east-1:123456789:function:order-processor:exec-abc123", | ||
| "message": "Validating order details", |
There was a problem hiding this comment.
Codex AI review · Finding arf_v1_xidywmll6dim2soxj2rxpshvga
The sample now uses the step lambda's Validating order details message, but the Basic Usage example emits it with debug() while the JSON still labels it INFO. Change the JSON level to DEBUG (or change the usage call to info()) so the documented output can actually result from the shown code.
Codex AI reviewFound two documentation inaccuracies affecting MDC migration guidance and the log-output example. No runtime code changed. Reviewed commit |
Summary
oldKeyNamescompatibility option for 1.x dashboardsgetLogger(Logger delegate)for wrapping a custom SLF4J loggerValidation
git diff --checkRelated shared documentation update: aws/aws-durable-execution-docs#283.