Repository navigation
fix: propagate execution-view invoke context - #820
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
Codex AI reviewNo actionable findings. The prior sampler-authority issue is addressed. Tests were not executed in this read-only review; actual agent initialization and cloud trace ancestry remain unverified. Reviewed commit |
nvasiu
approved these changes
Oct 23, 2026
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.
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
Companion to aws/aws-durable-execution-conformance-tests#131. Merge the shared requirements PR first. The JavaScript handler counterpart is aws/aws-durable-execution-sdk-js#1068.
Description
Execution-view chained invokes omitted their operation trace header when a Java agent hid the concrete
SdkTracerProvider. The child then inherited the service's execution-attempt parent instead of the SDK'sotel-invokespan. This caused case 11 to fail on both X-Ray and S3, while the invocation view passed.The agent-side post-autoconfiguration callback now checks the final sampler on the built, immutable tracer provider. Only that exact unwrapped
DurableSamplerinstance can confirm consumption of the Invocation sampling intent. A filtering wrapper is rejected even when it delegates Invocation sampling to an innerDurableSampler. New configurations clear the old verification, and an absent callback leaves opaque propagation disabled. This uses the existing autoconfiguration SPI dependency.Confirmation crosses the application/agent class-loader boundary through a scoped bridge, matches the trace, span name and execution ARN, and is cleared after span creation. Its distinct confirmation key rejects older agents that only observed sampler participation. The verified path propagates the deferred invoke’s deterministic parent ID with the actual invocation sampling flags. The change does not query sampling policy again, create a probe span, or modify another extension’s filter.
Case 11 also waits at
otel-invoke-replay-barrierafter the child returns, then returns the saved child result after resume. Both the shared orchestrator and requirement catalog are pinned toc32b40f5548f4776b7d533a76838e02358bc66d3so CI exercises that scenario. The pinned long-running workflow remains a compatibility no-op.Demo/Screenshots
The prior cloud run demonstrated the mismatch: https://github.com/aws/aws-durable-execution-sdk-java/actions/runs/40003569350. Each execution-view backend passed 25 cases and failed only case 11's Parent check; both invocation-view backends passed.
Checklist
Testing
Unit Tests
The complete OTel package passes 937 tests on Java 21. Coverage includes final sampler identity, later filtering wrappers, a missing post-build callback, stale verification, legacy agent confirmations, nested scope cleanup, sampled/unsampled decisions, and RECORD_ONLY behavior. Spotless passes.
Integration Tests
The filtering-wrapper regression reproduced two failures before the final-sampler check; all 16 direct/wrapped, visible/opaque, invocation/execution combinations now pass. Normal opaque agent providers and the application/agent class-loader split also pass, including explicit upstream decisions and delegated sampling.
The public invoke tests exercise three real invocations with a callback barrier, inspect the submitted XAmznTraceId, match its Parent to the exported invoke span, and verify replay sends no extra START or terminal export. The existing case-11 tests run the actual deployed handler in both tracing views.
The updated SDK/OTel artifacts and standalone conformance handler JAR build successfully. The new cloud run must still verify the service-reported carrier and complete X-Ray ancestry.
Examples
Updated the case-11 conformance handler and the propagation documentation.