Skip to content

docs(logging): document Java 2.x MDC keys - #692

Merged
zhongkechen merged 1 commit into
mainfrom
docs/update-logging-mdc-keys
Sep 8, 2026
Merged

docs(logging): document Java 2.x MDC keys#692
zhongkechen merged 1 commit into
mainfrom
docs/update-logging-mdc-keys

Conversation

@zhongkechen

@zhongkechen zhongkechen commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • update the logging example to use the Java 2.x MDC keys
  • document the temporary oldKeyNames compatibility option for 1.x dashboards
  • document getLogger(Logger delegate) for wrapping a custom SLF4J logger

Validation

  • git diff --check

Related shared documentation update: aws/aws-durable-execution-docs#283.

@zhongkechen
zhongkechen merged commit a28d226 into main Sep 8, 2026
20 of 21 checks passed
@zhongkechen
zhongkechen deleted the docs/update-logging-mdc-keys branch September 8, 2026 20:37
Comment thread docs/advanced/logging.md

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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/advanced/logging.md
"level": "INFO",
"message": "Processing order: ORD-123",
"durableExecutionArn": "arn:aws:lambda:us-east-1:123456789:function:order-processor:exec-abc123",
"message": "Validating order details",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Codex AI review

Found two documentation inaccuracies affecting MDC migration guidance and the log-output example. No runtime code changed.

Reviewed commit 0125239a76ee87e34dbc79831ed3a0825b5ff35f. Workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants