Skip to content

[feature]: add ContextId and ContextName to child context logger#134

Open
zhongkechen wants to merge 2 commits intomainfrom
execute
Open

[feature]: add ContextId and ContextName to child context logger#134
zhongkechen wants to merge 2 commits intomainfrom
execute

Conversation

@zhongkechen
Copy link
Contributor

@zhongkechen zhongkechen commented Feb 28, 2026

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Issue Link, if available

#80

Description

  • lazy initialize logger
  • use AutoClosable to clean up logger properties
  • add context id and context name to context logger
  • made the constructor of ExecutionManager accept DurableExecutionInput as the parameter.
  • fixed suspension exception handling in child context operation

Demo/Screenshots

{
    "@timestamp": "2026-02-28T07:15:03.163Z",
    "ecs.version": "1.2.0",
    "log.level": "INFO",
    "message": "Order prepared, waiting for validation",
    "process.thread.name": "durable-exec-22",
    "log.logger": "software.amazon.lambda.durable.DurableContext",
    "contextId": "1",
    "contextName": "order-validation",
    "durableExecutionArn": "arn:aws:lambda:us-east-2:961306377283:function:child-context-example:$LATEST/durable-execution/79a965b4-f78f-4e04-895f-4bf4b1834bb9/4223b3d4-66d8-3c93-a74f-6bb112268f51",
    "requestId": "5392ff07-3dd5-4500-ba1c-7b87312c5e43"
}

Checklist

  • I have filled out every section of the PR template
  • I have thoroughly tested this change

Testing

Unit Tests

Have unit tests been written for these changes? Updated

Integration Tests

Have integration tests been written for these changes?

Examples

Has a new example been added for the change? Verified

@zhongkechen zhongkechen marked this pull request as ready for review February 28, 2026 00:32
@zhongkechen zhongkechen changed the title [refactor]: add ExecutionOperation as a special durable operation [feature]: add ContextId and ContextName to child context logger Feb 28, 2026
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.

1 participant