@bitfab/sdk 0.65.5 → 0.65.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/{autoTrace-KM9pYqk9.cjs → autoTrace-CQw0qMBt.cjs} +3 -2
- package/dist/autoTrace-CQw0qMBt.cjs.map +1 -0
- package/dist/{autoTrace-CZu0BXhG.js → autoTrace-O40k8f5M.js} +3 -2
- package/dist/autoTrace-O40k8f5M.js.map +1 -0
- package/dist/autoTrace.cjs +1 -1
- package/dist/autoTrace.d.cts +6 -2
- package/dist/autoTrace.d.ts +6 -2
- package/dist/autoTrace.js +1 -1
- package/dist/{http-CG1Irqxx.js → http-lnqCEnB1.js} +3 -3
- package/dist/{http-CG1Irqxx.js.map → http-lnqCEnB1.js.map} +1 -1
- package/dist/{index-BFkAwvuc.d.cts → index-CFOLQ1IF.d.cts} +1 -1
- package/dist/{index-BFkAwvuc.d.ts → index-CFOLQ1IF.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/node.cjs +2 -2
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +3 -3
- package/dist/registryCommand-Di8x0YoJ.js.map +1 -1
- package/dist/{src-CfFkki5l.js → src-BungStQw.js} +18 -14
- package/dist/{src-CfFkki5l.js.map → src-BungStQw.js.map} +1 -1
- package/dist/{src-BRKm0P_S.cjs → src-FFSCRXpz.cjs} +16 -12
- package/dist/{src-BRKm0P_S.cjs.map → src-FFSCRXpz.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/autoTrace-CZu0BXhG.js.map +0 -1
- package/dist/autoTrace-KM9pYqk9.cjs.map +0 -1
|
@@ -29,7 +29,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
enumerable: true
|
|
30
30
|
}) : target, mod));
|
|
31
31
|
//#endregion
|
|
32
|
-
const require_autoTrace = require("./autoTrace-
|
|
32
|
+
const require_autoTrace = require("./autoTrace-CQw0qMBt.cjs");
|
|
33
33
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
34
34
|
let _opentelemetry_core = require("@opentelemetry/core");
|
|
35
35
|
let _opentelemetry_resources = require("@opentelemetry/resources");
|
|
@@ -58,7 +58,7 @@ var CategoriesClient = class {
|
|
|
58
58
|
const AssertionCategoriesClient = CategoriesClient;
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region src/version.generated.ts
|
|
61
|
-
const __version__ = "0.65.
|
|
61
|
+
const __version__ = "0.65.6";
|
|
62
62
|
const __packageName__ = "@bitfab/sdk";
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region src/constants.ts
|
|
@@ -6748,13 +6748,13 @@ function getCurrentSpan() {
|
|
|
6748
6748
|
addContext(context) {
|
|
6749
6749
|
try {
|
|
6750
6750
|
if (typeof context !== "object" || context === null) return;
|
|
6751
|
-
current.contexts.push(context);
|
|
6751
|
+
current.details.contexts.push(context);
|
|
6752
6752
|
} catch {}
|
|
6753
6753
|
},
|
|
6754
6754
|
setPrompt(prompt) {
|
|
6755
6755
|
try {
|
|
6756
6756
|
if (typeof prompt !== "string") return;
|
|
6757
|
-
current.prompt = prompt;
|
|
6757
|
+
current.details.prompt = prompt;
|
|
6758
6758
|
} catch {}
|
|
6759
6759
|
}
|
|
6760
6760
|
};
|
|
@@ -7035,7 +7035,7 @@ var Bitfab = class {
|
|
|
7035
7035
|
};
|
|
7036
7036
|
const autoTraceContext = {
|
|
7037
7037
|
traceFunctionKey,
|
|
7038
|
-
invoke(definition, inputs, invokeFn, entry, nodeConfiguration) {
|
|
7038
|
+
invoke(definition, inputs, invokeFn, entry, spanDetails, nodeConfiguration) {
|
|
7039
7039
|
const nameParts = definition.name.split(".");
|
|
7040
7040
|
const simpleName = nameParts[nameParts.length - 1];
|
|
7041
7041
|
const invokeWithoutNode = () => nodeConfiguration === void 0 ? invokeFn() : require_autoTrace.clearAutoTraceNodeConfiguration(invokeFn);
|
|
@@ -7055,6 +7055,7 @@ var Bitfab = class {
|
|
|
7055
7055
|
functionId: definition.id,
|
|
7056
7056
|
captureContent: true,
|
|
7057
7057
|
autoTraceDefinition: definition,
|
|
7058
|
+
spanDetails,
|
|
7058
7059
|
...declaredNode && { declaredNode },
|
|
7059
7060
|
...nodeExperimentId !== void 0 && { experimentId: nodeExperimentId },
|
|
7060
7061
|
...mockOnReplay !== void 0 && { mockOnReplay },
|
|
@@ -7063,7 +7064,7 @@ var Bitfab = class {
|
|
|
7063
7064
|
};
|
|
7064
7065
|
return openChild(entry, childOptions, inputs, definition.async === true, invokeFn);
|
|
7065
7066
|
},
|
|
7066
|
-
invokeNestedRoot(nestedName, nestedFunctionName, inputs, invokeFn, entry, link) {
|
|
7067
|
+
invokeNestedRoot(nestedName, nestedFunctionName, inputs, invokeFn, entry, link, spanDetails) {
|
|
7067
7068
|
if (excluded.has(nestedName) || excluded.has(nestedFunctionName) || !recordsSpan(entry, nestedName, true)) return invokeFn();
|
|
7068
7069
|
const childOptions = {
|
|
7069
7070
|
name: nestedName,
|
|
@@ -7073,6 +7074,7 @@ var Bitfab = class {
|
|
|
7073
7074
|
instrumentation: "trace",
|
|
7074
7075
|
captureContent: true,
|
|
7075
7076
|
declaredNode: true,
|
|
7077
|
+
spanDetails,
|
|
7076
7078
|
...link !== void 0 && { nestedTrace: link }
|
|
7077
7079
|
};
|
|
7078
7080
|
return openChild(entry, childOptions, inputs, false, invokeFn);
|
|
@@ -7091,13 +7093,15 @@ var Bitfab = class {
|
|
|
7091
7093
|
}
|
|
7092
7094
|
const link = getReplayContext() || inSeedScope() ? void 0 : { traceFunctionKey };
|
|
7093
7095
|
const rootName = rootNameFor(this);
|
|
7094
|
-
|
|
7096
|
+
const spanDetails = { contexts: [] };
|
|
7097
|
+
return require_autoTrace.invokeThroughAutoTraceEntries(enclosing, (entry, next) => entry.context.invokeNestedRoot(rootName, name, args, next, entry, link, spanDetails), () => {
|
|
7095
7098
|
if (link === void 0) return runRootFunction(this, args);
|
|
7096
7099
|
const innermost = enclosing[enclosing.length - 1];
|
|
7097
7100
|
const innermostStack = (require_autoTrace.currentAutoTraceEntries().find((entry) => entry.context === innermost.context) ?? innermost).spanStack;
|
|
7098
7101
|
const copy = innermostStack[innermostStack.length - 1];
|
|
7099
7102
|
const detachedRoot = buildTracedRoot({
|
|
7100
7103
|
...rootOptions,
|
|
7104
|
+
spanDetails,
|
|
7101
7105
|
...copy !== void 0 && { enclosingTrace: {
|
|
7102
7106
|
traceId: copy.traceId,
|
|
7103
7107
|
spanId: copy.spanId,
|
|
@@ -7263,7 +7267,7 @@ var Bitfab = class {
|
|
|
7263
7267
|
if (!root) return;
|
|
7264
7268
|
const rootId = `${root.traceId}:${root.spanId}`;
|
|
7265
7269
|
if (recordedRoots.has(rootId)) return;
|
|
7266
|
-
root.contexts.push(context);
|
|
7270
|
+
root.details.contexts.push(context);
|
|
7267
7271
|
recordedRoots.add(rootId);
|
|
7268
7272
|
}
|
|
7269
7273
|
}, options);
|
|
@@ -7404,7 +7408,7 @@ var Bitfab = class {
|
|
|
7404
7408
|
const newContext = {
|
|
7405
7409
|
traceId,
|
|
7406
7410
|
spanId,
|
|
7407
|
-
contexts: [],
|
|
7411
|
+
details: options.spanDetails ?? { contexts: [] },
|
|
7408
7412
|
spanName: options.name ?? options.nameFor?.(this) ?? qualifiedSpanName(this, functionNameAtOpen) ?? traceFunctionKey,
|
|
7409
7413
|
rootTraceFunctionKey: rootTraceFunctionKeyOfTrace(traceId, traceFunctionKey),
|
|
7410
7414
|
instrumentation: options.instrumentation ?? "span",
|
|
@@ -7468,8 +7472,8 @@ var Bitfab = class {
|
|
|
7468
7472
|
if (!(activeTraceStates.get(traceId)?.dropped === true)) self.sendWrapperSpan({
|
|
7469
7473
|
...baseSpanParams,
|
|
7470
7474
|
...params,
|
|
7471
|
-
contexts: newContext.contexts,
|
|
7472
|
-
prompt: newContext.prompt,
|
|
7475
|
+
contexts: newContext.details.contexts,
|
|
7476
|
+
prompt: newContext.details.prompt,
|
|
7473
7477
|
endedAt,
|
|
7474
7478
|
...experimentId !== void 0 && { experimentId },
|
|
7475
7479
|
...replayCtx?.inputSourceSpanId && { inputSourceSpanId: replayCtx.inputSourceSpanId }
|
|
@@ -8431,4 +8435,4 @@ Object.defineProperty(exports, "serializeReplayResult", {
|
|
|
8431
8435
|
}
|
|
8432
8436
|
});
|
|
8433
8437
|
|
|
8434
|
-
//# sourceMappingURL=src-
|
|
8438
|
+
//# sourceMappingURL=src-FFSCRXpz.cjs.map
|