Logger Durable Execution ARN Field Name #438
zhongkechen
started this conversation in
General
Replies: 2 comments
-
|
Option 3 is the most reasonable option to me. |
Beta Was this translation helpful? Give feedback.
0 replies
-
What makes you think it's most reasonable?
same for JS and Python |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Python and JavaScript SDK loggers currently add the durable execution ARN to
replay-safe logger metadata with the field name
executionArn. The Java SDK usesdurableExecutionArnfor the same concept, anddurableExecutionArnis also theterm used by backend APIs and other durable execution surfaces across SDKs.
At the same time, the Lambda console currently uses
executionArnwhen queryingCloudWatch Logs for a specific durable execution ARN. That makes
executionArnpart of an existing user and console workflow, not just an SDK implementation
detail.
This document proposes possible fixes and recommends a compatibility-preserving
path that aligns SDK logger metadata with the broader
durableExecutionArntermwithout breaking existing Lambda console and user queries.
Current Behavior
In the Python SDK,
Logger.from_log_infobuilds default logger extras like this:The JavaScript SDK also uses
executionArnfor the durable execution ARN loggerfield. The Java SDK uses
durableExecutionArn.Current naming:
executionArnexecutionArndurableExecutionArnexecutionArndurableExecutionArnWhy This Matters
The durable execution ARN is the main correlation key for logs emitted by
durable workflows. Having both
executionArnanddurableExecutionArnin activeuse creates a split between log-query compatibility and API/domain terminology.
Problems:
JavaScript, Java, and current Lambda console workflows.
console is updated first or the old field is retained.
The desired end state is one canonical durable execution ARN field name across
SDKs, APIs, docs, examples, and console-generated queries.
Goals
durableExecutionArn, the broader backend/API term.executionArn.executionArn.Non-Goals
Short-Term Action: Update Lambda Console Query
Update the Lambda console to query logs using
coalesce(durableExecutionArn, executionArn)or an equivalent fallback. Do thisregardless of which SDK option is chosen.
This short-term action decouples console log lookup from the current
executionArnlogger field and lets the console work with:executionArn.durableExecutionArn.durableExecutionArn.Benefits:
Costs:
Because this action is useful for all SDK migration paths, it should happen in
parallel with the SDK decision rather than being treated as a competing option.
Options
Option 1: Rename
executionArntodurableExecutionArnChange Python and JavaScript logger extras to emit only
durableExecutionArn.Example output:
{ "durableExecutionArn": "arn:aws:lambda:..." }Benefits:
Costs:
or alerting on
executionArn.console is updated in lockstep.
This is the cleanest final shape but the riskiest immediate change.
Option 2: Emit Both Fields
Add
durableExecutionArnwhile continuing to emitexecutionArn.Example output:
{ "executionArn": "arn:aws:lambda:...", "durableExecutionArn": "arn:aws:lambda:..." }Benefits:
Costs:
replay-safe log event carries the durable execution ARN twice.
executionArnis a compatibility alias orwill eventually be removed.
This is the safest compatibility fix, but it creates an ongoing log-volume and
cost tradeoff.
Option 3: Rename Java SDK Field to
executionArnChange the Java SDK logger field from
durableExecutionArntoexecutionArninstead of changing Python and JavaScript to
durableExecutionArn.Example output:
{ "executionArn": "arn:aws:lambda:..." }Benefits:
metadata.
query behavior.
Option 2.
Costs:
that already use
durableExecutionArn.executionArnthe cross-SDK logger field even though it is not thebroader durable execution domain term.
durableExecutionArn.This option is not recommended because it optimizes for current logger and
console compatibility at the expense of the longer-term canonical
durableExecutionArnterminology.Option 4: Add an Opt-In Logger Field Name Configuration
Introduce a setting that controls whether an SDK emits
executionArn,durableExecutionArn, or both.Possible Python API shapes:
or:
Benefits:
Costs:
option.
This is flexible but likely more complexity than the issue warrants.
Option 5: Document Query Aliases Only
Leave SDK behavior unchanged and update docs with cross-language query examples
that handle both names.
Example query:
Benefits:
Costs:
This is useful migration guidance, not a complete SDK fix.
Recommendation
Adopt Option 1 for SDKs: rename the durable execution ARN logger field from
executionArntodurableExecutionArnin Python and JavaScript SDK loggers.This aligns logger metadata with Java, backend APIs, and the broader durable
execution terminology without permanently increasing customer log volume and
cost by emitting duplicate ARN fields.
Recommended actions:
coalesce(durableExecutionArn, executionArn). This should happen regardlessof which SDK option is chosen.
loggers to emit
durableExecutionArninstead ofexecutionArn.because user-owned queries may still depend on
executionArn.durableExecutionArn.coalesce(durableExecutionArn, executionArn)for historical logs andmixed SDK versions.
This approach moves SDKs to one canonical field, avoids ongoing duplicate-log
costs, and keeps the Lambda console compatible with both old and new logs.
Proposed Python Implementation
Update
Logger.from_log_infoinpackages/aws-durable-execution-sdk-python/src/aws_durable_execution_sdk_python/logger.py:Keep the existing merge behavior:
This means a user can still override
durableExecutionArnby passingextra,consistent with current override behavior.
JavaScript SDK Follow-Up
Apply the same logger metadata policy in the JavaScript SDK:
durableExecutionArnwherever SDK logger metadata currently emitsexecutionArn.executionArnfrom SDK logger metadata after the Lambda consolesupports fallback queries.
durableExecutionArnas thecanonical field.
Lambda Console Follow-Up
The Lambda console currently uses
executionArnto query CloudWatch Logs for aspecific durable execution ARN. To avoid coupling console behavior to the legacy
SDK logger field, update the console-generated query to handle both fields.
Suggested CloudWatch Logs Insights expression:
After all active SDKs emit
durableExecutionArn, the console can prefer thecanonical field while retaining the fallback for historical logs.
Python Test Plan
Update tests that assert logger extras:
packages/aws-durable-execution-sdk-python/tests/logger_test.pydurableExecutionArninstead ofexecutionArn.extracan overridedurableExecutionArn.packages/aws-durable-execution-sdk-python/tests/e2e/execution_int_test.pyRecommended focused command:
hatch run test:unit packages/aws-durable-execution-sdk-python/tests/logger_test.pyRecommended broader validation:
hatch run test:unit packages/aws-durable-execution-sdk-python/tests/e2e/execution_int_test.pyDocumentation Plan
Update Python, JavaScript, and shared durable execution documentation where
replay-safe logging is described:
durableExecutionArnas the canonical durable execution correlationfield.
executionArnmay appear in historical Python and JavaScript SDK logsand current Lambda console queries.
durableExecutionArnin new examples, queries, and dashboard guidance.coalesce(durableExecutionArn, executionArn)guidance for mixedhistorical logs.
Example CloudWatch Logs Insights query for new logs:
Compatibility query for mixed SDK versions or historical logs:
Risks and Mitigations
executionArnexecutionArnexecutionArncoalesce(durableExecutionArn, executionArn)guidance in console and docs.Beta Was this translation helpful? Give feedback.
All reactions