Repository navigation
fix(otel): export sampled fallback roots early - #754
Open
zhongkechen wants to merge 15 commits into
Open
zhongkechen wants to merge 15 commits into
zhongkechen wants to merge 15 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
added 5 commits
October 6, 2026 23:12
…/python-754-20261006
…/python-754-20261006
zhongkechen
had a problem deploying
to
ai-pr-review-runtime
October 7, 2026 02:06 — with
GitHub Actions
Failure
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5 tasks
Contributor
Codex AI reviewNo actionable findings. Residual risk: tests were not executed under the read-only review constraints, including the OpenTelemetry 1.20 compatibility matrix. 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.
Fixes #748.
Related timing requirement: aws/aws-durable-execution-sdk-js#938.
Both OTel views now export
DurableExecutionRootwhen a sampled invocation resolves an SDK-owned fallback ancestor. The anchor is materialized at invocation start and flushed through normal invocation end, includingPENDINGandRETRY, so an execution that times out while suspended already has its ancestor. Complete remote parents are untouched, and unsampled invocations emit no synthetic root.The span uses the existing ARN-scoped synthetic-parent ID,
durable.execution.synthetic_root=true, and the stable execution-start timestamp for both start and end. Each sampled fallback invocation can re-export it to recover lost telemetry; first-invocation retries retain the same SDK-owned identity/timing/attributes.Workflowcontinues to carry duration and terminal outcome. The synthetic-root path uses a private one-span ID scope, consumed before processors run, so reentrant roots on the same cached tracer get independent IDs. The exported generator's existinguse_idssignature and scope-wide trace override semantics remain unchanged. The normal configured tracer, provider resource, processors, and resolved sampler metadata are preserved. Provider resources/custom enrichment may vary across environments; this does not replace configured service identity or promise exactly-once export.This branch includes main's approved invocation-worker lifecycle from #756. OTel 1.1 now requires core 2.1.0; publish the core first. CI validates built immutable core/OTel wheels and separately checks the released OTel 1.0 plugin with the new core. The old plugin retains its documented Invocation fallback limitations. There is no handler_context plugin API or opt-in marker.
Validation after merging main at
ffc1b180: all 654 OTel tests pass in the workspace and against the actual built wheels, plus 12 current-pair and 12 released-plugin compatibility controls. All 34 core and 14 OTel Python source files in the wheels match the committed tree. The core package is byte-identical to main; OTel types (36 files), Hatch lint/format, commit lint and diff checks pass. Functional CI has now passed ona4fe1a9939b82029a027e8aee0b07d663d5c1694, including Cloud tests, Python package and OpenTelemetry Conformance Tests run 37974255509. The PR still awaits a valid approval.Regression evidence covers both views across absent/invalid/partial remote context, sampling decisions, shared trace IDs, retry/resume, resource changes and buffered flushes. Real decorated handlers cover suspension/resume success and failure, completed-step suppression and a timeout without a terminal hook. The sampler-collision tests check SDK identity before processors and retain the original sampling result. The earlier complete 449-test minimum-OpenTelemetry 1.20 run and published TraceFlags.sampled source proof remain recorded in the review discussion; no new minimum-version matrix run is claimed here.