bitfab 0.11.5 → 0.11.6

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.
package/dist/index.cjs CHANGED
@@ -35,7 +35,7 @@ var __version__;
35
35
  var init_version_generated = __esm({
36
36
  "src/version.generated.ts"() {
37
37
  "use strict";
38
- __version__ = "0.11.5";
38
+ __version__ = "0.11.6";
39
39
  }
40
40
  });
41
41
 
@@ -433,7 +433,11 @@ async function processItem(httpClient, serverItem, fn, testRunId) {
433
433
  let error = null;
434
434
  try {
435
435
  const maybePromise = runWithReplayContext(
436
- { testRunId, inputSourceSpanId: span.id },
436
+ {
437
+ testRunId,
438
+ inputSourceSpanId: span.id,
439
+ inputSourceTraceId: span.externalTraceId
440
+ },
437
441
  () => fn(...inputs)
438
442
  );
439
443
  result = maybePromise instanceof Promise ? await maybePromise : maybePromise;
@@ -2555,6 +2559,9 @@ var Bitfab = class {
2555
2559
  contexts: [],
2556
2560
  ...replayCtxAtRoot?.testRunId && {
2557
2561
  testRunId: replayCtxAtRoot.testRunId
2562
+ },
2563
+ ...replayCtxAtRoot?.inputSourceTraceId && {
2564
+ inputSourceTraceId: replayCtxAtRoot.inputSourceTraceId
2558
2565
  }
2559
2566
  });
2560
2567
  pendingSpanPromises.set(traceId, []);
@@ -2603,7 +2610,8 @@ var Bitfab = class {
2603
2610
  sessionId: traceState?.sessionId,
2604
2611
  metadata: traceState?.metadata,
2605
2612
  contexts: traceState?.contexts ?? [],
2606
- testRunId: traceState?.testRunId
2613
+ testRunId: traceState?.testRunId,
2614
+ inputSourceTraceId: traceState?.inputSourceTraceId
2607
2615
  });
2608
2616
  activeTraceStates.delete(traceId);
2609
2617
  } else {
@@ -2680,6 +2688,9 @@ var Bitfab = class {
2680
2688
  if (params.contexts && params.contexts.length > 0) {
2681
2689
  rawTrace.contexts = params.contexts;
2682
2690
  }
2691
+ if (params.inputSourceTraceId) {
2692
+ rawTrace.input_source_trace_id = params.inputSourceTraceId;
2693
+ }
2683
2694
  this.httpClient.sendExternalTrace({
2684
2695
  type: "sdk-function",
2685
2696
  source: "typescript-sdk-function",