Repository navigation
Description
Summary
Update the cross-language OpenTelemetry guide for the revised shared topology
tracked by aws/aws-durable-execution-conformance-tests#99 and implemented by:
- otel: join Workflow to propagated trace and restore operation links aws-durable-execution-sdk-js#854
- otel: join Workflow to propagated trace and restore operation links aws-durable-execution-sdk-java#644
- otel: join Workflow to propagated trace and restore operation links aws-durable-execution-sdk-python#674
The guide must no longer assume that _X_AMZN_TRACE_ID.Parent identifies the
durable backend server span directly. It is the immediate remote context
delivered to the Lambda runtime and can identify an intermediate Lambda
service/runtime span.
When Root and Parent are valid, Workflow joins the canonical propagated
trace and either of these parents is valid:
- the remote context reconstructed from
Parent; or - the current valid same-trace ambient span created by ADOT, a community
language layer, or application instrumentation.
OpenTelemetry SpanContext does not expose an ancestor chain. Documentation
must not suggest that an SDK can traverse from the ambient span to the durable
backend attempt span. Same-trace membership is the portable validation.
Required documentation changes
- Replace the direct-backend-parent-only diagrams with both valid Workflow
parent shapes. - Explain that
Rootdefines the canonical trace whileParentidentifies the
immediate remote context available to the runtime. - Explain why the SDK cannot prove or traverse the complete remote-to-ambient
ancestor chain. - Document
Invocationas a child of the active ambient Lambda span only when
it belongs to the canonical trace, with fallback to the remote context. - Retain the deterministic synthetic execution root for missing or invalid
remote parents. - Explain explicit
_X_AMZN_TRACE_IDsampling decisions and selected-parent or
configured sampler behavior whenSampledis absent. - Document links from continuation and replay operation segments to the initial
logical operation span. - Describe Workflow and Invocation correlation links for both plugin views.
- Cover ADOT, community language auto-instrumentation layers, and
collector-only/application-owned provider configurations. - Update deployment, verification, diagrams, comparison tables, and
troubleshooting guidance consistently for JavaScript, Python, and Java.
Valid hierarchies
Direct propagated-parent shape:
Propagated remote parent
├── Workflow
├── Same-trace ambient Lambda span
│ └── Invocation
└── Invocation [when no valid same-trace ambient span exists]
Ambient-parent shape:
Propagated remote parent
└── Same-trace ambient Lambda span
├── Workflow
└── Invocation
Synthetic fallback:
Synthetic execution root
├── Workflow
└── Invocation
The guide must note that the selected parent may be absent from a backend query
and, if returned, may be a same-trace infrastructure span without durable
attributes. It must not require the execution-wide Workflow interval to be
temporally contained by an ambient span covering one Lambda invocation.
Sampling
_X_AMZN_TRACE_ID state |
Canonical trace ID | Workflow parent | Sampling |
|---|---|---|---|
Valid Root, Parent, Sampled=1 |
Reuse Root |
Remote Parent or same-trace ambient span |
Preserve sampled |
Valid Root, Parent, Sampled=0 |
Reuse Root |
Remote Parent or same-trace ambient span |
Preserve not-sampled |
Valid Root, Parent, no valid Sampled |
Reuse Root |
Remote Parent or same-trace ambient span |
Do not invent an authoritative decision; selected-parent and configured sampler behavior applies |
Valid Root, missing or invalid Parent, explicit Sampled |
Reuse Root |
Synthetic execution root | Preserve the explicit decision |
Valid Root, missing or invalid Parent, no valid Sampled |
Reuse Root |
Synthetic execution root | Configured root sampler decides |
Missing or invalid Root |
Derive a stable trace ID from execution data | Synthetic execution root | Configured root sampler decides |
Acceptance criteria
- The guide describes one canonical trace when valid propagated context exists.
- Both direct-remote-parent and same-trace-ambient-parent Workflow shapes are
documented as valid. - The guide does not identify
_X_AMZN_TRACE_ID.Parentas necessarily being
Durable Execution Attempt #1. - The inability to traverse an OpenTelemetry ancestor chain is explicit.
- Root-only and missing/invalid-Root fallbacks are unambiguous.
- Parent edges and span links remain clearly distinguished.
- Language tabs remain aligned with the shared conformance contract.
Activity
[-]otel: document backend-parented Workflow topology[/-][+]otel: document propagated or same-trace ambient Workflow parent[/+]