Repository navigation
feat(plugin): propagate chained invoke trace context in START checkpoints - #755
Open
zhongkechen wants to merge 20 commits into
Open
zhongkechen wants to merge 20 commits into
zhongkechen wants to merge 20 commits into
Conversation
…on-otel-755-followup-oct06
…/python-755-20261006
…/python-755-20261006
1 of 7 tasks
This comment has been minimized.
This comment has been minimized.
Contributor
Codex AI reviewNo actionable findings. Tests were not executed under the read-only review constraints. Added tests cover checkpoint serialization and replay, but do not establish deployed downstream trace propagation. Reviewed commit |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New public
context.invoke()START checkpoints collect optional plugin metadata and carry the calling operation's X-Ray header in flatChainedInvokeOptions.XAmznTraceId. The SDK-owned model round-trips the field and omits it without a contribution. Function/tenant/payload, operation identity and stored replay outcomes are preserved; each invoke in a batch has its own metadata.The synchronous collector uses frozen SDK-owned types, keeps the first nonblank opaque contribution, diagnoses conflicts and isolates ordinary plugin failures. Both OTel views supply canonical Root/Parent/Sampled values, including
Sampled=0, without creating an extra span. Deferred contexts contribute only while the instrumentation tracer retains its installedDurableSampler; if that sampler is replaced after Start, the producer abstains instead of guessing an operation decision. An actual already-started operation span still supplies its own context, including an unsampled one. The producer neither queries the replacement sampler early nor starts a synthetic span. Pending or terminal replay never recollects or resends START; an uncommitted START may collect again on retry. Cancellation/control-flow behavior, provider ownership and registration remain unchanged.Released model support
The official boto3/botocore 1.43.114 release now contains optional string
ChainedInvokeOptions.XAmznTraceId, reached through theCheckpointDurableExecutionrequest'sUpdatesmember. The core dependency is nowboto3>=1.43.114; that release requiresbotocore>=1.43.114,<1.44.0.The published wheel digest and installed Lambda model bytes were verified, and the real client tests now pass with ordinary parameter validation and wire serialization. No model patch, serializer bypass, conditional field omission, skipped test or xfail is used. The dependency repair and readiness wording change alone left runtime code unchanged. The subsequent sampling-authority repair changes only the two OTel metadata readers; core/testing source, dependency floors and workflow references remain unchanged.
Validation
d5070b9: 701 OTel tests, 42-file OTel type checks, and changed-file formatting passed. The final focused regressions fail in 8 cases on immutable98b8b8ewith 4 controls passing, and all 12 pass after the fix. Public handler/replay tests check the persisted invoke START header as well as actual exported operation contexts.Review readiness follows a successful current-head build. Backend delivery/topology checks, effective review approval and normal merge protections remain separate requirements; they are not a draft-status gate. No package, tag, GitHub Release or Lambda layer is published by making this PR ready for review.
The existing core/OTel coordinated release boundary is retained. Python currently has no distributed-map START wrapper or
DistributedMapOptions; map/parallel remain CONTEXT operations, so this introduces no distributed-map API or nested wire structure.Related issue: #751. Related SDK changes: #752, #753, #754 and #756; coordinated propagation PRs are aws/aws-durable-execution-sdk-js#957 and aws/aws-durable-execution-sdk-java#768.