Skip to content

otel: document propagated or same-trace ambient Workflow parent #257

Closed

Description

@zhongkechen

Summary

Update the cross-language OpenTelemetry guide for the revised shared topology
tracked by aws/aws-durable-execution-conformance-tests#99 and implemented by:

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 Root defines the canonical trace while Parent identifies the
    immediate remote context available to the runtime.
  • Explain why the SDK cannot prove or traverse the complete remote-to-ambient
    ancestor chain.
  • Document Invocation as 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_ID sampling decisions and selected-parent or
    configured sampler behavior when Sampled is 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.Parent as 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

  1. changed the title [-]otel: document backend-parented Workflow topology[/-] [+]otel: document propagated or same-trace ambient Workflow parent[/+] on Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions