Parent durable OTel spans to shared execution trace - #685
Conversation
77c426e to
9ff9f55
Compare
This comment has been minimized.
This comment has been minimized.
Claude AI reviewThis PR reparents durable OTel spans (Workflow, Invocation, operations, attempts) onto one shared execution trace anchored to a propagated backend parent or a deterministic synthetic root, adds a One correctness issue: both plugins now
Residual test risk: the new Reviewed commit |
9ff9f55 to
b645aea
Compare
This comment has been minimized.
This comment has been minimized.
b645aea to
337e5f5
Compare
This comment has been minimized.
This comment has been minimized.
337e5f5 to
c21cf27
Compare
This comment has been minimized.
This comment has been minimized.
c21cf27 to
2b6ff70
Compare
This comment has been minimized.
This comment has been minimized.
2b6ff70 to
3ddb25e
Compare
This comment has been minimized.
This comment has been minimized.
3ddb25e to
bff3b67
Compare
This comment has been minimized.
This comment has been minimized.
bff3b67 to
e6f3f01
Compare
| return self.has_valid_trace_id and self.has_valid_parent_span_id | ||
|
|
||
|
|
||
| ContextExtractor = Callable[["InvocationStartInfo"], ExtractedContext | None] |
There was a problem hiding this comment.
Codex AI review
[P1] Preserve the existing ContextExtractor contract. This exported API previously returned an OpenTelemetry Context; _ensure_extracted_context now rejects every existing custom extractor, causing telemetry to be disabled after the plugin executor swallows the TypeError. Accept and adapt legacy Context results, including their trace state and sampling flags, while introducing ExtractedContext through a compatible migration path and test that behavior.
| after_resume = next(span for span in spans if span.name == "otel-after-resume") | ||
|
|
||
| assert len(invocations) >= 2 | ||
| assert len(waits) >= 2 |
There was a problem hiding this comment.
Codex AI review
[P1] This assertion fails for the parameterized ExecutionOtelPlugin. That plugin deliberately drops unfinished operation spans on a PENDING invocation, so only the resumed wait span is exported and len(waits) is 1; two spans are produced only by InvocationOtelPlugin. Split the expected count by plugin type, or change the execution-view lifecycle if exporting suspended segments is intended.
Codex AI reviewFound two blocking issues: a public context-extractor compatibility regression and a failing parameterized end-to-end assertion. Reviewed commit |
Issue #, if available: #674
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.