@bitfab/sdk 0.28.7 → 0.28.9

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
@@ -683,7 +683,7 @@ __export(index_exports, {
683
683
  module.exports = __toCommonJS(index_exports);
684
684
 
685
685
  // src/version.generated.ts
686
- var __version__ = "0.28.7";
686
+ var __version__ = "0.28.9";
687
687
 
688
688
  // src/constants.ts
689
689
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -3962,13 +3962,16 @@ var Bitfab = class {
3962
3962
  }
3963
3963
  try {
3964
3964
  const endedAt = (/* @__PURE__ */ new Date()).toISOString();
3965
- const spanPromise = self.sendWrapperSpan({
3965
+ const traceDropped = activeTraceStates.get(traceId)?.dropped === true;
3966
+ const spanPromise = traceDropped ? Promise.resolve() : self.sendWrapperSpan({
3966
3967
  ...baseSpanParams,
3967
3968
  ...params,
3968
3969
  contexts: newContext.contexts,
3969
3970
  prompt: newContext.prompt,
3970
3971
  endedAt,
3971
- ...replayCtx?.testRunId && { testRunId: replayCtx.testRunId },
3972
+ ...replayCtx?.testRunId && {
3973
+ testRunId: replayCtx.testRunId
3974
+ },
3972
3975
  ...replayCtx?.inputSourceSpanId && {
3973
3976
  inputSourceSpanId: replayCtx.inputSourceSpanId
3974
3977
  }
@@ -4056,7 +4059,7 @@ var Bitfab = class {
4056
4059
  meta: mockSpan.outputMeta
4057
4060
  });
4058
4061
  }
4059
- void sendSpan({ result: output });
4062
+ void sendSpan({ result: output, mocked: true });
4060
4063
  if (fnReturnsPromise) {
4061
4064
  return Promise.resolve(output);
4062
4065
  }
@@ -4308,7 +4311,8 @@ var Bitfab = class {
4308
4311
  sourceTraceId: params.traceId,
4309
4312
  traceFunctionKey: params.traceFunctionKey,
4310
4313
  rawSpan: externalSpan,
4311
- ...params.testRunId && { testRunId: params.testRunId }
4314
+ ...params.testRunId && { testRunId: params.testRunId },
4315
+ ...params.mocked && { mocked: true }
4312
4316
  });
4313
4317
  }
4314
4318
  /**