@aws/durable-execution-sdk-js-otel 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +202 -1
  2. package/dist/execution-plugin.mjs +100 -21
  3. package/dist/execution-plugin.mjs.map +1 -1
  4. package/dist/index.mjs +1 -1
  5. package/dist/invocation-plugin.mjs +130 -55
  6. package/dist/invocation-plugin.mjs.map +1 -1
  7. package/dist/otel-execution.mjs +1 -1
  8. package/dist/otel-execution.mjs.map +1 -1
  9. package/dist/otel-invocation.mjs +1 -1
  10. package/dist/otel-invocation.mjs.map +1 -1
  11. package/dist/{global-id-generator.mjs → plugin-registration.mjs} +79 -3
  12. package/dist/plugin-registration.mjs.map +1 -0
  13. package/dist-cjs/execution-plugin.js +113 -34
  14. package/dist-cjs/execution-plugin.js.map +1 -1
  15. package/dist-cjs/index.js +10 -10
  16. package/dist-cjs/invocation-plugin.js +142 -67
  17. package/dist-cjs/invocation-plugin.js.map +1 -1
  18. package/dist-cjs/otel-execution.js +1 -1
  19. package/dist-cjs/otel-execution.js.map +1 -1
  20. package/dist-cjs/otel-invocation.js +1 -1
  21. package/dist-cjs/otel-invocation.js.map +1 -1
  22. package/dist-cjs/{global-id-generator.js → plugin-registration.js} +82 -2
  23. package/dist-cjs/plugin-registration.js.map +1 -0
  24. package/dist-types/execution-plugin.d.ts +13 -3
  25. package/dist-types/execution-plugin.d.ts.map +1 -1
  26. package/dist-types/execution-trace-context.d.ts +4 -2
  27. package/dist-types/execution-trace-context.d.ts.map +1 -1
  28. package/dist-types/external-completions.d.ts +11 -0
  29. package/dist-types/external-completions.d.ts.map +1 -0
  30. package/dist-types/global-sampler.d.ts +2 -0
  31. package/dist-types/global-sampler.d.ts.map +1 -1
  32. package/dist-types/invocation-clock.d.ts +9 -0
  33. package/dist-types/invocation-clock.d.ts.map +1 -0
  34. package/dist-types/invocation-plugin.d.ts +12 -2
  35. package/dist-types/invocation-plugin.d.ts.map +1 -1
  36. package/dist-types/plugin-registration.d.ts +2 -0
  37. package/dist-types/plugin-registration.d.ts.map +1 -0
  38. package/dist-types/propagation-metadata.d.ts +12 -0
  39. package/dist-types/propagation-metadata.d.ts.map +1 -0
  40. package/package.json +13 -9
  41. package/dist/global-id-generator.mjs.map +0 -1
  42. package/dist-cjs/global-id-generator.js.map +0 -1
package/README.md CHANGED
@@ -183,6 +183,13 @@ needed.
183
183
 
184
184
  ## Choosing a Plugin
185
185
 
186
+ Configure exactly one durable OTel view: `ExecutionOtelPlugin` for a workflow
187
+ view, or `InvocationOtelPlugin` for an invocation view. Registering both (or
188
+ registering one view twice) raises `PluginLoadError` before invocation hooks
189
+ run. This applies to explicit `plugins`, `DURABLE_EXECUTION_PLUGINS`, and any
190
+ combination of the two. Other instrumentation plugins can run alongside the
191
+ selected view.
192
+
186
193
  ### `ExecutionOtelPlugin`
187
194
 
188
195
  Use this plugin for a workflow-centered view. Operations and attempts are
@@ -238,6 +245,21 @@ Open operation spans are ended at the invocation boundary and retain
238
245
  `durable.operation.status=STARTED`. When an operation completes in a later
239
246
  invocation, the plugin emits a continuation span in that invocation.
240
247
 
248
+ Live invocation-view span boundaries and exception events use a wall-clock
249
+ origin captured with `Date.now()` at invocation start, advanced by monotonic
250
+ elapsed time. This matches the clock model of ordinary `tracer.startSpan()`
251
+ spans instead of using the process-wide `performance.timeOrigin`. Absolute
252
+ `HrTime` tuples keep epoch milliseconds distinct from relative performance time.
253
+ Each resumed invocation captures its own anchor. Supplied execution-start
254
+ Dates used to backdate Workflow and synthetic roots are preserved; execution-view
255
+ timestamp handling is unchanged.
256
+
257
+ The wall and monotonic reads are not atomic. Sampling delay, millisecond wall
258
+ precision, later wall-clock adjustments, and clocks on different machines can
259
+ still disagree. The plugin does not rewrite backend Dates or user spans, retain
260
+ a clock high-water mark across invocations, or promise simultaneous strict
261
+ ordering and complete containment across arbitrary clock skew.
262
+
241
263
  Because the original span context is not checkpointed, replayed `STEP` and
242
264
  `CONTEXT` spans and cross-invocation continuation spans use new provider IDs.
243
265
  They correlate through two links: the real exported `Workflow` span, and the
@@ -298,6 +320,66 @@ The `Invocation` span may still nest under a same-trace ambient handler span —
298
320
  see [Invocation parent](#invocation-parent) — without changing the execution
299
321
  ancestor the `Workflow` span joins.
300
322
 
323
+ ### Synthetic root export lifecycle
324
+
325
+ When fallback tracing is sampled, the backend supplies `executionStartTimestamp`,
326
+ and the configured SDK tracer allows the durable sampler wrapper to be installed,
327
+ both views create and end `DurableExecutionRoot` during each invocation's start
328
+ hook. Its start and end are both that backend timestamp. The normal
329
+ invocation-boundary flush can export it before a `PENDING` or `RETRYING` invocation
330
+ returns. A retry with checkpoint history or an intermediate resume can therefore
331
+ recover an earlier missing export, including when tracing became available only
332
+ after the first invocation. Recovery requires a later sampled invocation to
333
+ actually deliver its copy; stopping or timing out before any successful delivery
334
+ can still leave the execution without an exported root. This policy does not rely
335
+ on `isFirstInvocation`: a retry after checkpointed work runs in replay mode, while
336
+ an attempt without that history can still be identified as the first invocation.
337
+
338
+ Each sampled invocation emits at most one anchor: a terminal invocation does not
339
+ emit a second copy if its start hook already created one. Additional copies on
340
+ resumes are intentional, allowing consumers to deduplicate by trace ID and span ID.
341
+ The SDK-owned span fields are identical when the execution's trace identity,
342
+ backend start timestamp and instrumentation configuration remain stable. The
343
+ anchor carries `durable.execution.arn`, but no terminal status, request ID or
344
+ execution duration; `Workflow` continues to carry the duration and outcome.
345
+ `DurableExecutionRoot` is a zero-duration identity span: its descendants end after
346
+ it, which some trace viewers or containment validators may flag.
347
+
348
+ A forwarding tracer that hides the configured sampler retains the existing
349
+ terminal-only root creation path. Creating an early root through that tracer would
350
+ query the hidden sampler independently and could sample a root after dropping its
351
+ Invocation child. The plugin does not add that early sampler call; the underlying
352
+ provider still controls sampling, and these tracers do not receive early-anchor
353
+ recovery. A terminal backup can recover a missing first export only if a sampled
354
+ terminal invocation actually runs and delivers it.
355
+
356
+ Resources belong to the configured provider. Resource attributes such as
357
+ `faas.instance` can differ across execution environments even for identical
358
+ anchor span content; backends may retain whichever resource accompanies their
359
+ chosen copy. Span processors that enrich these spans must likewise avoid
360
+ invocation-varying span fields when relying on identity-based deduplication.
361
+ Export delivery and flushing remain the provider/layer's responsibility. The
362
+ plugin awaits `forceFlush()` when its provider exposes it, but a killed invocation
363
+ or a failed export cannot guarantee delivery; this is not exactly-once export.
364
+
365
+ If a caller omits `executionStartTimestamp`, the plugin retains terminal-only
366
+ synthetic-root materialization with its existing timestamp fallback. It does not
367
+ invent a wall-clock-based early anchor. These callers do not get the early-anchor
368
+ or identical-timestamp guarantee; the backend timestamp must be consistently
369
+ supplied to enable that contract. Complete propagated remote parents are never
370
+ materialized by the SDK. With the durable sampler wrapper installed, explicit
371
+ `NOT_SAMPLED` executions emit no root.
372
+
373
+ With the durable sampler wrapper installed, sampling is resolved once per
374
+ invocation and the anchor reuses that decision without a second sampler query.
375
+ Explicit upstream decisions or a deterministic trace-based policy (for example a
376
+ ratio sampler) keep anchor and terminal `Workflow` decisions consistent across
377
+ resumes. A non-deterministic custom sampler can select different invocations,
378
+ leaving an anchor without a sampled terminal `Workflow`. Decisions are not
379
+ persisted. These once-per-invocation guarantees do not apply to an opaque tracer:
380
+ its provider can query its sampler independently for each span, including the
381
+ existing terminal root; the early-anchor path is skipped to preserve that baseline.
382
+
301
383
  ### Workflow identity and lifecycle
302
384
 
303
385
  `Workflow` is an `INTERNAL` span that **joins the execution trace** by parenting
@@ -317,7 +399,7 @@ The plugins carry the same `Workflow` span identity on each invocation as a
317
399
  non-recording span context, and create the single recording `Workflow` span only
318
400
  when the execution reaches `SUCCEEDED` or `FAILED`, backdated to the execution
319
401
  start. `PENDING` and `RETRYING` invocations create no recording `Workflow` span,
320
- so none is ever left unended, and exactly one `Workflow` root is exported for the
402
+ so none is ever left unended, and one terminal `Workflow` span is exported for the
321
403
  durable execution while intermediate invocation spans export normally. The
322
404
  non-recording context carries the execution's sampling decision, so operations
323
405
  under it are sampled consistently with the eventual root. In-flight attempt spans
@@ -591,6 +673,31 @@ The package also exports the `ContextExtractor`, `ContextExtractorResult`,
591
673
  `ExecutionTraceEnvironment`, `IdGeneratorFactory`, `TracerProviderFactory`, and
592
674
  `OtelPluginConfig` types.
593
675
 
676
+ ### External completions and replay
677
+
678
+ Both views retain terminal wait, invoke, and callback notifications received at
679
+ invocation start or in checkpoint responses. If workflow traversal does not
680
+ reach a completed operation before suspending or returning, its completion is
681
+ exported at invocation end. Supplied operation timestamps, parent identity,
682
+ status, and error details are preserved in the execution view; the invocation
683
+ view completes the live segment or emits a linked continuation.
684
+
685
+ This requires the SDK to receive the operation metadata. Lambda normally removes
686
+ a completed context's children from subsequent execution state unless
687
+ `ReplayChildren` preserves them. For completion visibility after a child context
688
+ has finished, enable the appropriate `pluginsConfig.childOperationsDepth` (for
689
+ example, `1` for direct children of a top-level context). Preserved contexts
690
+ replay their orchestration; completed durable work still uses stored results.
691
+ The plugin cannot reconstruct an operation that was pruned and whose lifecycle
692
+ hooks do not run. The local runner's retained resume state must not be treated as
693
+ proof that the default Lambda configuration preserves those children. The local
694
+ resume-state discrepancy is tracked in [#995](https://github.com/aws/aws-durable-execution-sdk-js/issues/995).
695
+
696
+ Notifications and operation-end hooks are deduplicated within each invocation.
697
+ Normal replay does not re-export stored external completions. Deduplication is
698
+ not persisted: redelivery after a failed invocation can export the completion
699
+ again, as required for recovery.
700
+
594
701
  ## Verification and Troubleshooting
595
702
 
596
703
  After deployment:
@@ -623,3 +730,97 @@ remote parent, or a synthetic execution root).
623
730
  ## License
624
731
 
625
732
  Apache-2.0
733
+
734
+ ## Chained-invoke propagation
735
+
736
+ When preparing a new `context.invoke()` START, the SDK calls the optional
737
+ `providePropagationMetadata(input)` hook after assigning the operation identity
738
+ and before serializing the checkpoint. The readonly input contains
739
+ `executionArn`, `operationId`, optional `parentOperationId`, and
740
+ `targetFunctionName`. The SDK places the collected `xAmznTraceId` in the flat
741
+ `ChainedInvokeOptions.XAmznTraceId` wire member, separately for each operation
742
+ in a batched checkpoint. Function name, tenant, payload and operation identity
743
+ are unchanged; the SDK does not inject tracing fields into user payloads.
744
+
745
+ With the durable sampler bridge still installed on a compatible SDK tracer,
746
+ both OTel views encode the resolved execution trace ID as `Root`, the calling
747
+ CHAINED_INVOKE operation span ID as `Parent`, and the resolved sampling decision
748
+ as `Sampled`, including `Sampled=0`. Producing metadata does not create an extra
749
+ span or use an unrelated active span. For example, existing plugin registration
750
+ also covers both calls here:
751
+
752
+ ```typescript
753
+ const first = context.invoke("first", "first-function:1", { item: 1 });
754
+ const second = context.invoke("second", "second-function:1", { item: 2 });
755
+ return context.promise.all([first, second]);
756
+ ```
757
+
758
+ An opaque tracer or a tracer whose sampler was replaced may make an independent
759
+ decision for the invoke span. The plugins omit their optional propagation metadata
760
+ when they cannot verify that their sampler bridge still controls that decision.
761
+ They do not probe the sampler, create a span to obtain a decision, reinstall a
762
+ customer's sampler, or change ordinary span behavior. The check occurs when the
763
+ START is prepared; later provider reconfiguration cannot retroactively change a
764
+ checkpointed header.
765
+
766
+ The dispatcher calls providers synchronously with a frozen input snapshot.
767
+ The first non-null supported value wins; identical values do not conflict.
768
+ Later different values generate a warning with both plugin identities and a
769
+ conflict count. Invalid results and ordinary plugin failures are isolated.
770
+ Blank or whitespace-only headers are ignored so later providers can contribute;
771
+ nonblank values remain opaque and are not trimmed or parsed by the core SDK.
772
+ With no plugin, an absent hook or no returned value, the wire member is omitted
773
+ and the backend's existing tracing fallback applies.
774
+
775
+ Replaying a persisted START, including a pending or completed invoke, does not
776
+ call the hook or send another START. A failed, uncommitted START can collect
777
+ metadata again when the invocation is retried. Providers must therefore use the
778
+ stable identity, avoid side effects, and not assume exactly-once callbacks.
779
+
780
+ The runtime dependency requires `@aws-sdk/client-lambda` 3.1152.0 or newer.
781
+ That published release declares the optional `XAmznTraceId` field and includes
782
+ it in the generated serializer. The strict wire-model parity guard and actual
783
+ serializer regression pass with that release.
784
+
785
+ **Deployed backend trace-topology qualification remains separate.** Local
786
+ serialization and package compatibility do not establish
787
+ that a deployed chained invocation receives the intended Root/Parent/Sampled
788
+ or exports the expected caller/child topology. Existing sampled cloud traces
789
+ do not qualify unsampled delivery.
790
+
791
+ The design also adds `DistributedMapOptions.XAmznTraceId` to a future service
792
+ model. This SDK currently has no distributed-map options or START API; its
793
+ `map` and `parallel` APIs use CONTEXT operations. They are not distributed-map
794
+ transport paths, and this change does not introduce a new operation API or
795
+ invent the future Source/Processor/Destination structures.
796
+ ## Core compatibility
797
+
798
+ OTel 1.2 preserves valid core 2.4–2.x registrations, including separate
799
+ OTel-only Lambda layers. Its core peer is optional (`>=2.4.0 <3.0.0`), and the
800
+ dynamic provider contract remains version 1. Existing on-demand environment
801
+ carrier behavior remains available on older cores; upgrading the plugin alone
802
+ does not add fields to the invocation metadata those cores supply.
803
+
804
+ The new invocation-local LMI carrier and core registration exclusivity require
805
+ the coordinated core 2.7 / OTel 1.2 pair. Upgrade both for those capabilities.
806
+ Older core/plugin combinations do not gain those guarantees. The two OTel views
807
+ remain an unsupported combination, and the updated core rejects it with updated
808
+ plugin metadata. The later core 3 factory migration is a separate major release.
809
+
810
+ Registration metadata uses the namespaced symbol
811
+ `Symbol.for("aws.lambda.durable.instrumentation.plugin-registration")`.
812
+ The bundled views declare it on their constructors, so the core can validate
813
+ all selected provider types before calling any environment-selected factory.
814
+ Conflicting dynamic views therefore do not install sampler or ID-generator
815
+ wrappers on the global tracer. Subclasses retain all inherited static exclusive
816
+ groups; declaring their own static metadata adds a constraint and cannot replace
817
+ an inherited one. Repeating a group within one constructor chain does not count
818
+ as a second plugin registration. Subclasses are identified by their actual
819
+ constructor names in diagnostics. Explicit instances
820
+ have already been constructed by the application before registration; validation
821
+ cannot undo that construction. Existing instance metadata remains supported and
822
+ returned instances are checked too, including subclasses returned by providers
823
+ that declare a broader base type.
824
+ The base hook interface stays unchanged, and ordinary properties such as a
825
+ custom plugin's `registration` field are not interpreted by the SDK. This keeps
826
+ existing valid plugin classes and generic hook dispatchers source-compatible.
@@ -1,5 +1,5 @@
1
1
  import { trace, SpanKind, context, SpanStatusCode, ROOT_CONTEXT, isSpanContextValid, TraceFlags } from '@opentelemetry/api';
2
- import { D as DeterministicIdGenerator, x as xRayContextExtractor, g as createTracerProvider, t as tryInstallDurableSampler, h as tryInstallGlobalIdGenerator, i as canonicalTraceId, r as resolveExecutionTraceContext, f as deriveWorkflowSpanId, b as deriveSpanIdFromOperationId, j as rootSamplingDecision } from './global-id-generator.mjs';
2
+ import { P as PLUGIN_REGISTRATION, E as ExternalCompletions, D as DeterministicIdGenerator, x as xRayContextExtractor, g as createTracerProvider, t as tryInstallDurableSampler, h as tryInstallGlobalIdGenerator, i as canonicalTraceId, r as resolveExecutionTraceContext, f as deriveWorkflowSpanId, j as isDurableSamplerInstalled, k as createPropagationMetadata, b as deriveSpanIdFromOperationId, l as rootSamplingDecision } from './plugin-registration.mjs';
3
3
  import { SamplingDecision } from '@opentelemetry/sdk-trace-node';
4
4
 
5
5
  const DEFAULT_INSTRUMENTATION_NAME = "aws-durable-execution-sdk-js";
@@ -17,6 +17,9 @@ const DEFAULT_INSTRUMENTATION_NAME = "aws-durable-execution-sdk-js";
17
17
  * onOperationEnd, so nothing is left un-ended across invocations (issue #831).
18
18
  */
19
19
  class ExecutionOtelPlugin {
20
+ static [PLUGIN_REGISTRATION] = {
21
+ exclusiveGroup: "durable-opentelemetry-view",
22
+ };
20
23
  // Shared utilities (reused from existing package)
21
24
  idGenerator;
22
25
  contextExtractor;
@@ -45,10 +48,14 @@ class ExecutionOtelPlugin {
45
48
  // start and reused when the real span is created at terminal.
46
49
  executionAncestor;
47
50
  executionStartTimestamp;
51
+ // Only a backend timestamp can define a retry-stable, zero-duration anchor.
52
+ syntheticRootAnchorTimestamp;
53
+ syntheticRootMaterialized = false;
48
54
  usesGlobalProvider;
49
55
  globalIdGeneratorInstalled;
50
56
  durableSampler;
51
57
  tracingEnabled = false;
58
+ externalCompletions = new ExternalCompletions();
52
59
  // Workflow span name (configurable)
53
60
  workflowSpanName;
54
61
  // Whether enrichLogContext() contributes trace context to log records
@@ -117,10 +124,13 @@ class ExecutionOtelPlugin {
117
124
  // carries the execution sampled bit so a parent-based sampler stays
118
125
  // consistent with the eventual root.
119
126
  this.executionAncestor = execTraceContext.executionAncestor;
127
+ // Snapshot the Date: another hook must not be able to alter a later copy
128
+ // of this invocation's anchor by mutating the input object.
129
+ this.syntheticRootAnchorTimestamp = info.executionStartTimestamp
130
+ ? new Date(info.executionStartTimestamp.getTime())
131
+ : undefined;
120
132
  this.executionStartTimestamp =
121
- info.executionStartTimestamp ??
122
- this.executionStartTimestamp ??
123
- new Date();
133
+ this.syntheticRootAnchorTimestamp ?? new Date();
124
134
  this.workflowSpan = trace.wrapSpanContext({
125
135
  traceId: this.executionTraceId,
126
136
  spanId: workflowSpanId,
@@ -165,6 +175,22 @@ class ExecutionOtelPlugin {
165
175
  kind: SpanKind.INTERNAL,
166
176
  attributes: invocationAttributes,
167
177
  }, invocationParentContext);
178
+ this.externalCompletions.observe(info.updatedOperations);
179
+ // Each sampled invocation can recover an earlier undelivered anchor. An
180
+ // opaque tracer retains terminal-only creation: without the sampler wrapper,
181
+ // an early anchor would independently query its hidden sampler again.
182
+ if (this.durableSampler && this.syntheticRootAnchorTimestamp) {
183
+ this.createSyntheticRoot()?.end(this.syntheticRootAnchorTimestamp);
184
+ }
185
+ }
186
+ providePropagationMetadata(input) {
187
+ if (!this.tracingEnabled ||
188
+ !this.invocationSpan ||
189
+ !this.workflowSpan ||
190
+ !isDurableSamplerInstalled(this.tracer, this.durableSampler)) {
191
+ return undefined;
192
+ }
193
+ return createPropagationMetadata(input, this.executionArn, this.executionTraceId, this.executionTraceFlags);
168
194
  }
169
195
  wrapInvocation(_info, fn) {
170
196
  if (!this.tracingEnabled || !this.workflowSpan) {
@@ -177,6 +203,12 @@ class ExecutionOtelPlugin {
177
203
  this.resetInvocationState();
178
204
  return;
179
205
  }
206
+ // Prefer normal lifecycle hooks, which preserve live parent scopes. Before
207
+ // returning, export any fresh completion the workflow did not reach. A
208
+ // later resume may label it replay even though it has never been exported.
209
+ for (const operation of this.externalCompletions.pending.values()) {
210
+ await this.onOperationEnd({ ...operation, isReplay: false });
211
+ }
180
212
  // 1. Always end and export Invocation_Span
181
213
  if (this.invocationSpan) {
182
214
  this.invocationSpan.setAttribute("durable.invocation.status", info.status);
@@ -209,6 +241,9 @@ class ExecutionOtelPlugin {
209
241
  if (this.executionSamplingDecision === SamplingDecision.RECORD_AND_SAMPLED &&
210
242
  this.executionAncestor &&
211
243
  (info.status === "SUCCEEDED" || info.status === "FAILED")) {
244
+ // Keep terminal-only fallback for providers without an early anchor.
245
+ // An anchor already materialized in this invocation is not emitted twice.
246
+ const syntheticRootSpan = this.createSyntheticRoot();
212
247
  const workflowSpanId = deriveWorkflowSpanId(this.executionArn);
213
248
  const executionAncestorContext = trace.setSpanContext(ROOT_CONTEXT, this.executionAncestor);
214
249
  const workflowSpan = this.idGenerator.withIds({ spanId: workflowSpanId }, () => this.startSpan(this.workflowSpanName, {
@@ -229,9 +264,10 @@ class ExecutionOtelPlugin {
229
264
  workflowSpan.setStatus({ code: SpanStatusCode.OK });
230
265
  }
231
266
  workflowSpan.end();
267
+ syntheticRootSpan?.end(this.syntheticRootAnchorTimestamp);
232
268
  }
233
- // Non-terminal (PENDING/RETRYING): no real Workflow_Span is created, so
234
- // nothing to end — the identity was only ever a non-recording context.
269
+ // PENDING/RETRYING never materializes Workflow. A sampled invocation may
270
+ // already have ended its stable synthetic anchor before customer code ran.
235
271
  // 3. End any attempt span still open (safeguard against a leak on a
236
272
  // non-terminal invocation, issue #831). Operation placeholders have no
237
273
  // recording span and are dropped in resetInvocationState.
@@ -252,6 +288,30 @@ class ExecutionOtelPlugin {
252
288
  // 5. Clear per-invocation state
253
289
  this.resetInvocationState();
254
290
  }
291
+ /** Creates at most one SDK-owned root per invocation; the caller ends it. */
292
+ createSyntheticRoot() {
293
+ if (this.syntheticRootMaterialized ||
294
+ this.executionSamplingDecision !== SamplingDecision.RECORD_AND_SAMPLED ||
295
+ !this.executionAncestor ||
296
+ this.executionAncestor.isRemote) {
297
+ return undefined;
298
+ }
299
+ const span = this.idGenerator.withIds({
300
+ traceId: this.executionTraceId,
301
+ spanId: this.executionAncestor.spanId,
302
+ }, () => this.startSpan("DurableExecutionRoot", {
303
+ kind: SpanKind.INTERNAL,
304
+ attributes: {
305
+ "durable.execution.synthetic_root": true,
306
+ "durable.execution.arn": this.executionArn,
307
+ },
308
+ startTime: this.syntheticRootAnchorTimestamp ??
309
+ this.executionStartTimestamp ??
310
+ new Date(),
311
+ }, ROOT_CONTEXT));
312
+ this.syntheticRootMaterialized = true;
313
+ return span;
314
+ }
255
315
  ensureGlobalIdGeneratorInstalled() {
256
316
  if (!this.usesGlobalProvider || this.globalIdGeneratorInstalled) {
257
317
  return true;
@@ -272,6 +332,7 @@ class ExecutionOtelPlugin {
272
332
  return false;
273
333
  }
274
334
  resetInvocationState() {
335
+ this.externalCompletions.clear();
275
336
  this.spanMap.clear();
276
337
  this.operationContexts.clear();
277
338
  this.operationStarts.clear();
@@ -279,6 +340,8 @@ class ExecutionOtelPlugin {
279
340
  this.invocationSpan = undefined;
280
341
  this.executionAncestor = undefined;
281
342
  this.executionStartTimestamp = undefined;
343
+ this.syntheticRootAnchorTimestamp = undefined;
344
+ this.syntheticRootMaterialized = false;
282
345
  this.executionArn = "";
283
346
  this.executionTraceId = "";
284
347
  this.executionTraceFlags = 0;
@@ -299,14 +362,16 @@ class ExecutionOtelPlugin {
299
362
  invocationParentContext(executionAncestor, canonical) {
300
363
  const activeContext = context.active();
301
364
  const ambient = trace.getSpanContext(activeContext);
302
- // Adopt the ambient span as the Invocation parent only when it is on the
303
- // execution trace AND carries the same sampled bit as the execution
304
- // ancestor. Matching the trace ID alone is not enough: if the ambient span's
365
+ // Adopt the ambient span only in propagated-parent mode, when it is on
366
+ // the execution trace AND carries the same sampled bit as the execution
367
+ // ancestor. Synthetic fallback keeps Workflow and Invocation on the same
368
+ // SDK-owned root. Matching the trace ID alone is not enough: if the ambient span's
305
369
  // sampled bit differs, the Invocation span would inherit the ambient
306
370
  // decision and could export after an explicit Sampled=0, or drop after the
307
371
  // root sampler chose sampled. On a mismatch, fall back to the execution
308
372
  // ancestor, which carries the authoritative decision.
309
- if (ambient &&
373
+ if (executionAncestor.isRemote &&
374
+ ambient &&
310
375
  isSpanContextValid(ambient) &&
311
376
  ambient.traceId === canonical &&
312
377
  (ambient.traceFlags & TraceFlags.SAMPLED) ===
@@ -367,11 +432,16 @@ class ExecutionOtelPlugin {
367
432
  if (!this.tracingEnabled) {
368
433
  return;
369
434
  }
370
- // The only place an operation span is created: start+end it here under its
371
- // deterministic ID, so it is exported exactly once even across suspend/resume.
435
+ // Release placeholders even when this is a previously observed completion.
372
436
  const started = this.operationStarts.get(info.id);
373
437
  this.operationContexts.delete(info.id);
374
438
  this.operationStarts.delete(info.id);
439
+ // Updates and traversal can report the same completion in either order.
440
+ // The set is reset each invocation so failed-invocation redelivery remains
441
+ // eligible, while normal replay never exports a completion a second time.
442
+ if (this.externalCompletions.shouldSkip(info)) {
443
+ return;
444
+ }
375
445
  // The end event may omit name/subType; fall back to what start captured.
376
446
  const name = info.name ?? started?.name;
377
447
  const subType = info.subType ?? started?.subType;
@@ -410,7 +480,9 @@ class ExecutionOtelPlugin {
410
480
  code: SpanStatusCode.ERROR,
411
481
  message: info.error.message,
412
482
  });
413
- span.recordException(info.error);
483
+ // A deferred completion keeps its historical interval. Record the error
484
+ // at that completion time too; undefined preserves OTel's live fallback.
485
+ span.recordException(info.error, info.endTimestamp);
414
486
  }
415
487
  else if (info.status === "SUCCEEDED") {
416
488
  // Stamp explicit OK ONLY on a SUCCEEDED terminal status. Terminal
@@ -420,18 +492,23 @@ class ExecutionOtelPlugin {
420
492
  span.setStatus({ code: SpanStatusCode.OK });
421
493
  }
422
494
  span.end(info.endTimestamp);
495
+ this.externalCompletions.markExported(info);
423
496
  }
424
497
  /**
425
498
  * The parent context for an operation or attempt span: the parent operation's
426
- * deterministic placeholder context when known, otherwise the deferred
427
- * Workflow span's context so the span still hangs off the execution trace.
499
+ * deterministic identity, or the Workflow identity for a top-level operation.
500
+ * A completion notification can arrive without traversing its parent in this
501
+ * invocation (for example, a completed child context skipped during replay).
428
502
  */
429
503
  resolveOperationParentContext(parentId) {
430
504
  if (parentId) {
431
- const parentContext = this.operationContexts.get(parentId);
432
- if (parentContext) {
433
- return trace.setSpanContext(context.active(), parentContext);
434
- }
505
+ const parentContext = this.operationContexts.get(parentId) ?? {
506
+ traceId: this.executionTraceId,
507
+ spanId: deriveSpanIdFromOperationId(parentId, this.executionArn),
508
+ traceFlags: this.executionTraceFlags,
509
+ isRemote: false,
510
+ };
511
+ return trace.setSpanContext(context.active(), parentContext);
435
512
  }
436
513
  const workflowContext = this.workflowSpan?.spanContext();
437
514
  if (workflowContext) {
@@ -515,8 +592,10 @@ class ExecutionOtelPlugin {
515
592
  this.spanMap.delete(key);
516
593
  }
517
594
  }
518
- async onOperationChange(_info) {
519
- // No-op — same as InvocationOtelPlugin
595
+ async onOperationChange(info) {
596
+ if (this.tracingEnabled) {
597
+ this.externalCompletions.observe(info.updatedOperations);
598
+ }
520
599
  }
521
600
  enrichLogContext() {
522
601
  if (!this.tracingEnabled || !this.enrichLogger) {
@@ -1 +1 @@
1
- {"version":3,"file":"execution-plugin.mjs","sources":["../src/execution-plugin.ts"],"names":[],"mappings":";;;;AA8CA,MAAM,4BAA4B,GAAG,8BAA8B;AAEnE;;;;;;;;;;;;AAYG;MACU,mBAAmB,CAAA;;AAEtB,IAAA,WAAW;AACF,IAAA,gBAAgB;;AAGzB,IAAA,cAAc;AACd,IAAA,MAAM;AACG,IAAA,mBAAmB;;;AAI5B,IAAA,YAAY;AACZ,IAAA,cAAc;;;AAGd,IAAA,OAAO;;;AAGP,IAAA,iBAAiB;;AAEjB,IAAA,eAAe;AAIf,IAAA,YAAY;AACZ,IAAA,gBAAgB;IAChB,mBAAmB,G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AC,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;AAC9C,YAAA,OAAO,SAAS;QAClB;QACA,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QAC5C,IAAI,CAAC,IAAI,EAAE;AACT,YAAA,OAAO,SAAS;QAClB;AACA,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE;QACtC,OAAO;YACL,OAAO,EAAE,WAAW,CAAC,OAAO;YAC5B,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,gBAAgB,EAAE,CAAC,WAAW,CAAC,UAAU,GAAG,CAAC,MAAM,CAAC;SACrD;IACH;;;"}
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  export { E as ExecutionOtelPlugin } from './execution-plugin.mjs';
2
2
  export { I as InvocationOtelPlugin } from './invocation-plugin.mjs';
3
- export { D as DeterministicIdGenerator, d as deriveExecutionRootSpanId, a as deriveExecutionTraceId, b as deriveSpanIdFromOperationId, c as deriveTraceIdFromArn, e as deriveTraceIdFromXRayRoot, f as deriveWorkflowSpanId, w as w3cClientContextExtractor, x as xRayContextExtractor } from './global-id-generator.mjs';
3
+ export { D as DeterministicIdGenerator, d as deriveExecutionRootSpanId, a as deriveExecutionTraceId, b as deriveSpanIdFromOperationId, c as deriveTraceIdFromArn, e as deriveTraceIdFromXRayRoot, f as deriveWorkflowSpanId, w as w3cClientContextExtractor, x as xRayContextExtractor } from './plugin-registration.mjs';
4
4
  import '@opentelemetry/api';
5
5
  import '@opentelemetry/sdk-trace-node';
6
6
  import '@opentelemetry/core';