@bitfab/sdk 0.52.6 → 0.53.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.
- package/dist/{chunk-3TL4SATS.js → chunk-3IKQHUGK.js} +31 -9
- package/dist/chunk-3IKQHUGK.js.map +1 -0
- package/dist/{chunk-RC6XLP6M.js → chunk-E3O64PDG.js} +2 -2
- package/dist/{chunk-RC6XLP6M.js.map → chunk-E3O64PDG.js.map} +1 -1
- package/dist/{chunk-WYC4QRK3.js → chunk-KSKRPIY6.js} +2 -2
- package/dist/{chunk-A6KY2IFA.js → chunk-PAM7GY2V.js} +3 -3
- package/dist/{chunk-7KIRLN47.js → chunk-WIBQUZPU.js} +2 -2
- package/dist/{chunk-7KIRLN47.js.map → chunk-WIBQUZPU.js.map} +1 -1
- package/dist/{http-EL26HG5B.js → http-C4CWGASW.js} +2 -2
- package/dist/{http-YMBQ4XJO.js → http-NLURGVPA.js} +2 -2
- package/dist/index.cjs +26 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/node.cjs +26 -4
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +3 -3
- package/dist/{replay-DXDWFFJK.js → replay-2Y3G4EB4.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-3TL4SATS.js.map +0 -1
- /package/dist/{chunk-WYC4QRK3.js.map → chunk-KSKRPIY6.js.map} +0 -0
- /package/dist/{chunk-A6KY2IFA.js.map → chunk-PAM7GY2V.js.map} +0 -0
- /package/dist/{http-EL26HG5B.js.map → http-C4CWGASW.js.map} +0 -0
- /package/dist/{http-YMBQ4XJO.js.map → http-NLURGVPA.js.map} +0 -0
- /package/dist/{replay-DXDWFFJK.js.map → replay-2Y3G4EB4.js.map} +0 -0
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
getCurrentTrace,
|
|
20
20
|
reseedFromRegistry,
|
|
21
21
|
seedFromRegistry
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-3IKQHUGK.js";
|
|
23
23
|
import "./chunk-E5BLYL5X.js";
|
|
24
24
|
import {
|
|
25
25
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
ReplayError,
|
|
29
29
|
reportReplayProgress,
|
|
30
30
|
serializeReplayResult
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-KSKRPIY6.js";
|
|
32
32
|
import {
|
|
33
33
|
BitfabError,
|
|
34
34
|
DEFAULT_SERVICE_URL,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
MixedTracingError,
|
|
37
37
|
__version__,
|
|
38
38
|
flushTraces
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-WIBQUZPU.js";
|
|
40
40
|
import "./chunk-H6LZRFMN.js";
|
|
41
41
|
export {
|
|
42
42
|
BITFAB_PROGRESS_PREFIX,
|
package/dist/node.cjs
CHANGED
|
@@ -88,7 +88,7 @@ var __version__, __packageName__;
|
|
|
88
88
|
var init_version_generated = __esm({
|
|
89
89
|
"src/version.generated.ts"() {
|
|
90
90
|
"use strict";
|
|
91
|
-
__version__ = "0.
|
|
91
|
+
__version__ = "0.53.0";
|
|
92
92
|
__packageName__ = "@bitfab/sdk";
|
|
93
93
|
}
|
|
94
94
|
});
|
|
@@ -6892,6 +6892,26 @@ var DEFAULT_AUTO_TRACE_MAX_SPANS = 500;
|
|
|
6892
6892
|
var AUTO_TRACE_PROTOCOL = "ts-auto-v1";
|
|
6893
6893
|
var AUTO_TRACE_POLICY_REFRESH_MS = 6e4;
|
|
6894
6894
|
var AUTO_TRACE_POLICY_RETRY_MS = 1e4;
|
|
6895
|
+
function spanOwnerName(receiver) {
|
|
6896
|
+
if (typeof receiver === "function") {
|
|
6897
|
+
return receiver.name !== "" ? receiver.name : void 0;
|
|
6898
|
+
}
|
|
6899
|
+
if (typeof receiver !== "object" || receiver === null) {
|
|
6900
|
+
return void 0;
|
|
6901
|
+
}
|
|
6902
|
+
const owner = receiver.constructor;
|
|
6903
|
+
if (typeof owner !== "function" || owner === Object || owner.name === "") {
|
|
6904
|
+
return void 0;
|
|
6905
|
+
}
|
|
6906
|
+
return owner.name;
|
|
6907
|
+
}
|
|
6908
|
+
function qualifiedSpanName(receiver, functionName) {
|
|
6909
|
+
if (functionName === void 0) {
|
|
6910
|
+
return void 0;
|
|
6911
|
+
}
|
|
6912
|
+
const owner = spanOwnerName(receiver);
|
|
6913
|
+
return owner === void 0 ? functionName : `${owner}.${functionName}`;
|
|
6914
|
+
}
|
|
6895
6915
|
function autoTraceLimit(value, fallback) {
|
|
6896
6916
|
return value !== void 0 && Number.isFinite(value) && value >= 0 ? Math.floor(value) : fallback;
|
|
6897
6917
|
}
|
|
@@ -7094,12 +7114,13 @@ var Bitfab = class {
|
|
|
7094
7114
|
);
|
|
7095
7115
|
const excluded = new Set(options.exclude ?? []);
|
|
7096
7116
|
const includeWrappers = options.includeWrappers ?? false;
|
|
7117
|
+
const rootNameFor = (receiver) => options.name ?? (fn.name !== "" ? qualifiedSpanName(receiver, name) ?? name : name);
|
|
7097
7118
|
const rootOptions = {
|
|
7098
|
-
name: options.name
|
|
7119
|
+
name: options.name,
|
|
7120
|
+
nameFor: rootNameFor,
|
|
7099
7121
|
type: options.type ?? "custom",
|
|
7100
7122
|
surface: "opt-out"
|
|
7101
7123
|
};
|
|
7102
|
-
const rootName = options.name ?? name;
|
|
7103
7124
|
const buildTracedRoot = (spanOptions) => this.withSpan(
|
|
7104
7125
|
traceFunctionKey,
|
|
7105
7126
|
spanOptions,
|
|
@@ -7239,6 +7260,7 @@ var Bitfab = class {
|
|
|
7239
7260
|
return tracedRoot.apply(this, args);
|
|
7240
7261
|
}
|
|
7241
7262
|
const link = getReplayContext() || inSeedScope() ? void 0 : { traceFunctionKey };
|
|
7263
|
+
const rootName = rootNameFor(this);
|
|
7242
7264
|
return invokeThroughAutoTraceEntries(
|
|
7243
7265
|
enclosing,
|
|
7244
7266
|
(entry, next) => entry.context.invokeNestedRoot(
|
|
@@ -7905,7 +7927,7 @@ var Bitfab = class {
|
|
|
7905
7927
|
const baseSpanParams = {
|
|
7906
7928
|
traceFunctionKey,
|
|
7907
7929
|
functionName,
|
|
7908
|
-
spanName: options.name ?? functionName ?? traceFunctionKey,
|
|
7930
|
+
spanName: options.name ?? options.nameFor?.(this) ?? qualifiedSpanName(this, functionName) ?? traceFunctionKey,
|
|
7909
7931
|
traceId,
|
|
7910
7932
|
spanId,
|
|
7911
7933
|
parentSpanId,
|