Skip to content

feat(plugin): propagate chained invoke trace context in START checkpoints - #755

Open
zhongkechen wants to merge 20 commits into
mainfrom
feature/otel-propagation-contract
Open

zhongkechen wants to merge 20 commits into
mainfrom
feature/otel-propagation-contract

Conversation

@zhongkechen

@zhongkechen zhongkechen commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

New public context.invoke() START checkpoints collect optional plugin metadata and carry the calling operation's X-Ray header in flat ChainedInvokeOptions.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 installed DurableSampler; 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 the CheckpointDurableExecution request's Updates member. The core dependency is now boto3>=1.43.114; that release requires botocore>=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

  • 22 real-client wire/operation tests passed on exact boto3/botocore 1.43.114, including per-invoke headers, preserved tenant/payload, omission and both parameter-validation settings.
  • 30 collector/public-SDK tests and 21 both-view public OTel propagation tests passed, covering sampled/unsampled operation parents, replay, parallel invokes and failure isolation.
  • The 86-file Core type check, changed-Python formatting and diff checks passed. The local core wheel declares the required boto3 minimum.
  • Sampling-authority follow-up d5070b9: 701 OTel tests, 42-file OTel type checks, and changed-file formatting passed. The final focused regressions fail in 8 cases on immutable 98b8b8e with 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.
  • Current-head CI validates the complete branch separately. Earlier failures caused by the absent model member are historical; a newly available model does not by itself establish deployed backend or downstream trace topology.

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.

@zhongkechen zhongkechen changed the title feat(plugin): prepare propagation metadata feat(plugin): propagate chained invoke trace context in START checkpoints Oct 5, 2026
@zhongkechen zhongkechen mentioned this pull request Oct 8, 2026
1 of 7 tasks
@zhongkechen
zhongkechen marked this pull request as ready for review October 14, 2026 20:55
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 14, 2026 20:55 — with GitHub Actions Active
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 14, 2026 20:56 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 14, 2026 22:38 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

No 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 d5070b92d7c69f4242ccf6f3b63d3eb004327949. Workflow run

This branch was successfully deployed

1 active deployment
ai-pr-review-runtime — d5070b92 Deployed Oct 14, 2026 by zhongkechen via ai-pr-review / Codex review / Generate Codex review #1715
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