@workflow/world-testing 5.0.0-beta.32 → 5.0.0-beta.34
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/.well-known/workflow/v1/flow.mjs +1314 -1030
- package/dist/.well-known/workflow/v1/manifest.json +292 -292
- package/dist/.well-known/workflow/v1/step.mjs +400 -220
- package/package.json +7 -6
|
@@ -15585,7 +15585,7 @@ var init_waits2 = __esm({
|
|
|
15585
15585
|
});
|
|
15586
15586
|
|
|
15587
15587
|
// ../world/dist/analytics.js
|
|
15588
|
-
var NullableDateSchema2, NullableStringSchema2, NullableBooleanSchema2, AnalyticsRunSchema2, AnalyticsStepSchema2, AnalyticsEventSchema2, AnalyticsHookSchema2, AnalyticsWaitSchema2;
|
|
15588
|
+
var NAIVE_DATETIME2, UTCDateSchema2, NullableDateSchema2, NullableStringSchema2, NullableBooleanSchema2, AnalyticsRunSchema2, AnalyticsStepSchema2, AnalyticsEventSchema2, AnalyticsHookSchema2, AnalyticsWaitSchema2, AnalyticsAttributeKeySchema2;
|
|
15589
15589
|
var init_analytics2 = __esm({
|
|
15590
15590
|
"../world/dist/analytics.js"() {
|
|
15591
15591
|
"use strict";
|
|
@@ -15594,7 +15594,14 @@ var init_analytics2 = __esm({
|
|
|
15594
15594
|
init_runs2();
|
|
15595
15595
|
init_steps2();
|
|
15596
15596
|
init_waits2();
|
|
15597
|
-
|
|
15597
|
+
NAIVE_DATETIME2 = /^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}(?:\.\d+)?$/;
|
|
15598
|
+
UTCDateSchema2 = external_exports2.preprocess((value) => {
|
|
15599
|
+
if (typeof value === "string" && NAIVE_DATETIME2.test(value)) {
|
|
15600
|
+
return `${value.replace(" ", "T")}Z`;
|
|
15601
|
+
}
|
|
15602
|
+
return value;
|
|
15603
|
+
}, external_exports2.coerce.date());
|
|
15604
|
+
NullableDateSchema2 = UTCDateSchema2.nullable().optional();
|
|
15598
15605
|
NullableStringSchema2 = external_exports2.string().nullable().optional();
|
|
15599
15606
|
NullableBooleanSchema2 = external_exports2.boolean().nullable().optional();
|
|
15600
15607
|
AnalyticsRunSchema2 = external_exports2.object({
|
|
@@ -15604,8 +15611,8 @@ var init_analytics2 = __esm({
|
|
|
15604
15611
|
workflowName: external_exports2.string(),
|
|
15605
15612
|
specVersion: external_exports2.coerce.number().optional(),
|
|
15606
15613
|
attributes: external_exports2.record(external_exports2.string(), external_exports2.string()).default({}),
|
|
15607
|
-
createdAt:
|
|
15608
|
-
updatedAt:
|
|
15614
|
+
createdAt: UTCDateSchema2,
|
|
15615
|
+
updatedAt: UTCDateSchema2,
|
|
15609
15616
|
startedAt: NullableDateSchema2,
|
|
15610
15617
|
completedAt: NullableDateSchema2,
|
|
15611
15618
|
errorCode: NullableStringSchema2,
|
|
@@ -15618,8 +15625,8 @@ var init_analytics2 = __esm({
|
|
|
15618
15625
|
stepName: NullableStringSchema2,
|
|
15619
15626
|
status: StepStatusSchema2,
|
|
15620
15627
|
attempt: external_exports2.number().optional(),
|
|
15621
|
-
createdAt:
|
|
15622
|
-
updatedAt:
|
|
15628
|
+
createdAt: UTCDateSchema2,
|
|
15629
|
+
updatedAt: UTCDateSchema2,
|
|
15623
15630
|
startedAt: NullableDateSchema2,
|
|
15624
15631
|
completedAt: NullableDateSchema2,
|
|
15625
15632
|
retryAfter: NullableDateSchema2,
|
|
@@ -15637,8 +15644,8 @@ var init_analytics2 = __esm({
|
|
|
15637
15644
|
workflowName: external_exports2.string(),
|
|
15638
15645
|
deploymentId: external_exports2.string(),
|
|
15639
15646
|
specVersion: external_exports2.coerce.number().optional(),
|
|
15640
|
-
runCreatedAt:
|
|
15641
|
-
createdAt:
|
|
15647
|
+
runCreatedAt: UTCDateSchema2,
|
|
15648
|
+
createdAt: UTCDateSchema2,
|
|
15642
15649
|
region: NullableStringSchema2,
|
|
15643
15650
|
vercelId: NullableStringSchema2,
|
|
15644
15651
|
requestId: NullableStringSchema2,
|
|
@@ -15654,8 +15661,8 @@ var init_analytics2 = __esm({
|
|
|
15654
15661
|
runId: external_exports2.string(),
|
|
15655
15662
|
hookId: external_exports2.string(),
|
|
15656
15663
|
status: external_exports2.enum(["created", "received", "disposed", "conflict"]),
|
|
15657
|
-
createdAt:
|
|
15658
|
-
updatedAt:
|
|
15664
|
+
createdAt: UTCDateSchema2,
|
|
15665
|
+
updatedAt: UTCDateSchema2,
|
|
15659
15666
|
receivedAt: NullableDateSchema2,
|
|
15660
15667
|
disposedAt: NullableDateSchema2,
|
|
15661
15668
|
isWebhook: NullableBooleanSchema2,
|
|
@@ -15668,12 +15675,18 @@ var init_analytics2 = __esm({
|
|
|
15668
15675
|
waitId: external_exports2.string(),
|
|
15669
15676
|
status: WaitStatusSchema2,
|
|
15670
15677
|
resumeAt: NullableDateSchema2,
|
|
15671
|
-
createdAt:
|
|
15672
|
-
updatedAt:
|
|
15678
|
+
createdAt: UTCDateSchema2,
|
|
15679
|
+
updatedAt: UTCDateSchema2,
|
|
15673
15680
|
completedAt: NullableDateSchema2,
|
|
15674
15681
|
workflowCoreVersion: NullableStringSchema2,
|
|
15675
15682
|
workflowEncryptionEnabled: NullableBooleanSchema2
|
|
15676
15683
|
});
|
|
15684
|
+
AnalyticsAttributeKeySchema2 = external_exports2.object({
|
|
15685
|
+
key: external_exports2.string(),
|
|
15686
|
+
runCount: external_exports2.coerce.number(),
|
|
15687
|
+
firstSeenAt: external_exports2.coerce.date(),
|
|
15688
|
+
lastSeenAt: external_exports2.coerce.date()
|
|
15689
|
+
});
|
|
15677
15690
|
}
|
|
15678
15691
|
});
|
|
15679
15692
|
|
|
@@ -16169,6 +16182,7 @@ __export(dist_exports, {
|
|
|
16169
16182
|
ATTRIBUTE_KEY_MAX_LENGTH: () => ATTRIBUTE_KEY_MAX_LENGTH2,
|
|
16170
16183
|
ATTRIBUTE_MAX_PER_RUN: () => ATTRIBUTE_MAX_PER_RUN2,
|
|
16171
16184
|
ATTRIBUTE_VALUE_MAX_BYTES: () => ATTRIBUTE_VALUE_MAX_BYTES2,
|
|
16185
|
+
AnalyticsAttributeKeySchema: () => AnalyticsAttributeKeySchema2,
|
|
16172
16186
|
AnalyticsEventSchema: () => AnalyticsEventSchema2,
|
|
16173
16187
|
AnalyticsHookSchema: () => AnalyticsHookSchema2,
|
|
16174
16188
|
AnalyticsRunSchema: () => AnalyticsRunSchema2,
|
|
@@ -17099,47 +17113,23 @@ Caused by: ${options.cause.stack}`;
|
|
|
17099
17113
|
}
|
|
17100
17114
|
});
|
|
17101
17115
|
|
|
17102
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17103
|
-
var _globalThis;
|
|
17104
|
-
var init_globalThis = __esm({
|
|
17105
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.js"() {
|
|
17106
|
-
_globalThis = typeof globalThis === "object" ? globalThis : global;
|
|
17107
|
-
}
|
|
17108
|
-
});
|
|
17109
|
-
|
|
17110
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/platform/node/index.js
|
|
17111
|
-
var init_node3 = __esm({
|
|
17112
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/platform/node/index.js"() {
|
|
17113
|
-
init_globalThis();
|
|
17114
|
-
}
|
|
17115
|
-
});
|
|
17116
|
-
|
|
17117
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/platform/index.js
|
|
17118
|
-
var init_platform = __esm({
|
|
17119
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/platform/index.js"() {
|
|
17120
|
-
init_node3();
|
|
17121
|
-
}
|
|
17122
|
-
});
|
|
17123
|
-
|
|
17124
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/version.js
|
|
17116
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/version.js
|
|
17125
17117
|
var VERSION;
|
|
17126
17118
|
var init_version2 = __esm({
|
|
17127
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17128
|
-
VERSION = "1.9.
|
|
17119
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/version.js"() {
|
|
17120
|
+
VERSION = "1.9.1";
|
|
17129
17121
|
}
|
|
17130
17122
|
});
|
|
17131
17123
|
|
|
17132
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17124
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/internal/semver.js
|
|
17133
17125
|
function _makeCompatibilityCheck(ownVersion) {
|
|
17134
|
-
|
|
17135
|
-
|
|
17136
|
-
|
|
17126
|
+
const acceptedVersions = /* @__PURE__ */ new Set([ownVersion]);
|
|
17127
|
+
const rejectedVersions = /* @__PURE__ */ new Set();
|
|
17128
|
+
const myVersionMatch = ownVersion.match(re);
|
|
17137
17129
|
if (!myVersionMatch) {
|
|
17138
|
-
return
|
|
17139
|
-
return false;
|
|
17140
|
-
};
|
|
17130
|
+
return () => false;
|
|
17141
17131
|
}
|
|
17142
|
-
|
|
17132
|
+
const ownVersionParsed = {
|
|
17143
17133
|
major: +myVersionMatch[1],
|
|
17144
17134
|
minor: +myVersionMatch[2],
|
|
17145
17135
|
patch: +myVersionMatch[3],
|
|
@@ -17167,11 +17157,11 @@ function _makeCompatibilityCheck(ownVersion) {
|
|
|
17167
17157
|
if (rejectedVersions.has(globalVersion)) {
|
|
17168
17158
|
return false;
|
|
17169
17159
|
}
|
|
17170
|
-
|
|
17160
|
+
const globalVersionMatch = globalVersion.match(re);
|
|
17171
17161
|
if (!globalVersionMatch) {
|
|
17172
17162
|
return _reject(globalVersion);
|
|
17173
17163
|
}
|
|
17174
|
-
|
|
17164
|
+
const globalVersionParsed = {
|
|
17175
17165
|
major: +globalVersionMatch[1],
|
|
17176
17166
|
minor: +globalVersionMatch[2],
|
|
17177
17167
|
patch: +globalVersionMatch[3],
|
|
@@ -17197,7 +17187,7 @@ function _makeCompatibilityCheck(ownVersion) {
|
|
|
17197
17187
|
}
|
|
17198
17188
|
var re, isCompatible;
|
|
17199
17189
|
var init_semver = __esm({
|
|
17200
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17190
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/internal/semver.js"() {
|
|
17201
17191
|
init_version2();
|
|
17202
17192
|
re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
17203
17193
|
__name(_makeCompatibilityCheck, "_makeCompatibilityCheck");
|
|
@@ -17205,149 +17195,98 @@ var init_semver = __esm({
|
|
|
17205
17195
|
}
|
|
17206
17196
|
});
|
|
17207
17197
|
|
|
17208
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17209
|
-
function registerGlobal(type, instance, diag3, allowOverride) {
|
|
17198
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/internal/global-utils.js
|
|
17199
|
+
function registerGlobal(type, instance, diag3, allowOverride = false) {
|
|
17210
17200
|
var _a3;
|
|
17211
|
-
|
|
17212
|
-
allowOverride = false;
|
|
17213
|
-
}
|
|
17214
|
-
var api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== void 0 ? _a3 : {
|
|
17201
|
+
const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== void 0 ? _a3 : {
|
|
17215
17202
|
version: VERSION
|
|
17216
17203
|
};
|
|
17217
17204
|
if (!allowOverride && api[type]) {
|
|
17218
|
-
|
|
17205
|
+
const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
|
|
17219
17206
|
diag3.error(err.stack || err.message);
|
|
17220
17207
|
return false;
|
|
17221
17208
|
}
|
|
17222
17209
|
if (api.version !== VERSION) {
|
|
17223
|
-
|
|
17210
|
+
const err = new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${VERSION}`);
|
|
17224
17211
|
diag3.error(err.stack || err.message);
|
|
17225
17212
|
return false;
|
|
17226
17213
|
}
|
|
17227
17214
|
api[type] = instance;
|
|
17228
|
-
diag3.debug(
|
|
17215
|
+
diag3.debug(`@opentelemetry/api: Registered a global for ${type} v${VERSION}.`);
|
|
17229
17216
|
return true;
|
|
17230
17217
|
}
|
|
17231
17218
|
function getGlobal(type) {
|
|
17232
17219
|
var _a3, _b;
|
|
17233
|
-
|
|
17220
|
+
const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === void 0 ? void 0 : _a3.version;
|
|
17234
17221
|
if (!globalVersion || !isCompatible(globalVersion)) {
|
|
17235
17222
|
return;
|
|
17236
17223
|
}
|
|
17237
17224
|
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
|
|
17238
17225
|
}
|
|
17239
17226
|
function unregisterGlobal(type, diag3) {
|
|
17240
|
-
diag3.debug(
|
|
17241
|
-
|
|
17227
|
+
diag3.debug(`@opentelemetry/api: Unregistering a global for ${type} v${VERSION}.`);
|
|
17228
|
+
const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
17242
17229
|
if (api) {
|
|
17243
17230
|
delete api[type];
|
|
17244
17231
|
}
|
|
17245
17232
|
}
|
|
17246
17233
|
var major, GLOBAL_OPENTELEMETRY_API_KEY, _global;
|
|
17247
17234
|
var init_global_utils = __esm({
|
|
17248
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17249
|
-
init_platform();
|
|
17235
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/internal/global-utils.js"() {
|
|
17250
17236
|
init_version2();
|
|
17251
17237
|
init_semver();
|
|
17252
17238
|
major = VERSION.split(".")[0];
|
|
17253
|
-
GLOBAL_OPENTELEMETRY_API_KEY = /* @__PURE__ */ Symbol.for(
|
|
17254
|
-
_global =
|
|
17239
|
+
GLOBAL_OPENTELEMETRY_API_KEY = /* @__PURE__ */ Symbol.for(`opentelemetry.js.api.${major}`);
|
|
17240
|
+
_global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
17255
17241
|
__name(registerGlobal, "registerGlobal");
|
|
17256
17242
|
__name(getGlobal, "getGlobal");
|
|
17257
17243
|
__name(unregisterGlobal, "unregisterGlobal");
|
|
17258
17244
|
}
|
|
17259
17245
|
});
|
|
17260
17246
|
|
|
17261
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17247
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js
|
|
17262
17248
|
function logProxy(funcName, namespace, args) {
|
|
17263
|
-
|
|
17249
|
+
const logger = getGlobal("diag");
|
|
17264
17250
|
if (!logger) {
|
|
17265
17251
|
return;
|
|
17266
17252
|
}
|
|
17267
|
-
|
|
17268
|
-
return logger[funcName].apply(logger, __spreadArray([], __read(args), false));
|
|
17253
|
+
return logger[funcName](namespace, ...args);
|
|
17269
17254
|
}
|
|
17270
|
-
var
|
|
17255
|
+
var DiagComponentLogger;
|
|
17271
17256
|
var init_ComponentLogger = __esm({
|
|
17272
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17257
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js"() {
|
|
17273
17258
|
init_global_utils();
|
|
17274
|
-
|
|
17275
|
-
|
|
17276
|
-
|
|
17277
|
-
var i = m.call(o), r, ar = [], e;
|
|
17278
|
-
try {
|
|
17279
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
17280
|
-
} catch (error95) {
|
|
17281
|
-
e = { error: error95 };
|
|
17282
|
-
} finally {
|
|
17283
|
-
try {
|
|
17284
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
17285
|
-
} finally {
|
|
17286
|
-
if (e) throw e.error;
|
|
17287
|
-
}
|
|
17288
|
-
}
|
|
17289
|
-
return ar;
|
|
17290
|
-
};
|
|
17291
|
-
__spreadArray = function(to, from, pack) {
|
|
17292
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
17293
|
-
if (ar || !(i in from)) {
|
|
17294
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17295
|
-
ar[i] = from[i];
|
|
17296
|
-
}
|
|
17259
|
+
DiagComponentLogger = class {
|
|
17260
|
+
static {
|
|
17261
|
+
__name(this, "DiagComponentLogger");
|
|
17297
17262
|
}
|
|
17298
|
-
|
|
17299
|
-
};
|
|
17300
|
-
DiagComponentLogger = /** @class */
|
|
17301
|
-
(function() {
|
|
17302
|
-
function DiagComponentLogger2(props) {
|
|
17263
|
+
constructor(props) {
|
|
17303
17264
|
this._namespace = props.namespace || "DiagComponentLogger";
|
|
17304
17265
|
}
|
|
17305
|
-
|
|
17306
|
-
DiagComponentLogger2.prototype.debug = function() {
|
|
17307
|
-
var args = [];
|
|
17308
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
17309
|
-
args[_i] = arguments[_i];
|
|
17310
|
-
}
|
|
17266
|
+
debug(...args) {
|
|
17311
17267
|
return logProxy("debug", this._namespace, args);
|
|
17312
|
-
}
|
|
17313
|
-
|
|
17314
|
-
var args = [];
|
|
17315
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
17316
|
-
args[_i] = arguments[_i];
|
|
17317
|
-
}
|
|
17268
|
+
}
|
|
17269
|
+
error(...args) {
|
|
17318
17270
|
return logProxy("error", this._namespace, args);
|
|
17319
|
-
}
|
|
17320
|
-
|
|
17321
|
-
var args = [];
|
|
17322
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
17323
|
-
args[_i] = arguments[_i];
|
|
17324
|
-
}
|
|
17271
|
+
}
|
|
17272
|
+
info(...args) {
|
|
17325
17273
|
return logProxy("info", this._namespace, args);
|
|
17326
|
-
}
|
|
17327
|
-
|
|
17328
|
-
var args = [];
|
|
17329
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
17330
|
-
args[_i] = arguments[_i];
|
|
17331
|
-
}
|
|
17274
|
+
}
|
|
17275
|
+
warn(...args) {
|
|
17332
17276
|
return logProxy("warn", this._namespace, args);
|
|
17333
|
-
}
|
|
17334
|
-
|
|
17335
|
-
var args = [];
|
|
17336
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
17337
|
-
args[_i] = arguments[_i];
|
|
17338
|
-
}
|
|
17277
|
+
}
|
|
17278
|
+
verbose(...args) {
|
|
17339
17279
|
return logProxy("verbose", this._namespace, args);
|
|
17340
|
-
}
|
|
17341
|
-
|
|
17342
|
-
})();
|
|
17280
|
+
}
|
|
17281
|
+
};
|
|
17343
17282
|
__name(logProxy, "logProxy");
|
|
17344
17283
|
}
|
|
17345
17284
|
});
|
|
17346
17285
|
|
|
17347
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17286
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/types.js
|
|
17348
17287
|
var DiagLogLevel;
|
|
17349
17288
|
var init_types2 = __esm({
|
|
17350
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17289
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/types.js"() {
|
|
17351
17290
|
(function(DiagLogLevel2) {
|
|
17352
17291
|
DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
|
|
17353
17292
|
DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
|
|
@@ -17360,7 +17299,7 @@ var init_types2 = __esm({
|
|
|
17360
17299
|
}
|
|
17361
17300
|
});
|
|
17362
17301
|
|
|
17363
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17302
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js
|
|
17364
17303
|
function createLogLevelDiagLogger(maxLevel, logger) {
|
|
17365
17304
|
if (maxLevel < DiagLogLevel.NONE) {
|
|
17366
17305
|
maxLevel = DiagLogLevel.NONE;
|
|
@@ -17369,7 +17308,7 @@ function createLogLevelDiagLogger(maxLevel, logger) {
|
|
|
17369
17308
|
}
|
|
17370
17309
|
logger = logger || {};
|
|
17371
17310
|
function _filterFunc(funcName, theLevel) {
|
|
17372
|
-
|
|
17311
|
+
const theFunc = logger[funcName];
|
|
17373
17312
|
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
17374
17313
|
return theFunc.bind(logger);
|
|
17375
17314
|
}
|
|
@@ -17386,71 +17325,51 @@ function createLogLevelDiagLogger(maxLevel, logger) {
|
|
|
17386
17325
|
};
|
|
17387
17326
|
}
|
|
17388
17327
|
var init_logLevelLogger = __esm({
|
|
17389
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17328
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js"() {
|
|
17390
17329
|
init_types2();
|
|
17391
17330
|
__name(createLogLevelDiagLogger, "createLogLevelDiagLogger");
|
|
17392
17331
|
}
|
|
17393
17332
|
});
|
|
17394
17333
|
|
|
17395
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17396
|
-
var
|
|
17334
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/diag.js
|
|
17335
|
+
var API_NAME, DiagAPI;
|
|
17397
17336
|
var init_diag = __esm({
|
|
17398
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17337
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/diag.js"() {
|
|
17399
17338
|
init_ComponentLogger();
|
|
17400
17339
|
init_logLevelLogger();
|
|
17401
17340
|
init_types2();
|
|
17402
17341
|
init_global_utils();
|
|
17403
|
-
|
|
17404
|
-
|
|
17405
|
-
|
|
17406
|
-
|
|
17407
|
-
try {
|
|
17408
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
17409
|
-
} catch (error95) {
|
|
17410
|
-
e = { error: error95 };
|
|
17411
|
-
} finally {
|
|
17412
|
-
try {
|
|
17413
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
17414
|
-
} finally {
|
|
17415
|
-
if (e) throw e.error;
|
|
17416
|
-
}
|
|
17342
|
+
API_NAME = "diag";
|
|
17343
|
+
DiagAPI = class _DiagAPI {
|
|
17344
|
+
static {
|
|
17345
|
+
__name(this, "DiagAPI");
|
|
17417
17346
|
}
|
|
17418
|
-
|
|
17419
|
-
|
|
17420
|
-
|
|
17421
|
-
|
|
17422
|
-
if (ar || !(i in from)) {
|
|
17423
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17424
|
-
ar[i] = from[i];
|
|
17347
|
+
/** Get the singleton instance of the DiagAPI API */
|
|
17348
|
+
static instance() {
|
|
17349
|
+
if (!this._instance) {
|
|
17350
|
+
this._instance = new _DiagAPI();
|
|
17425
17351
|
}
|
|
17352
|
+
return this._instance;
|
|
17426
17353
|
}
|
|
17427
|
-
|
|
17428
|
-
|
|
17429
|
-
|
|
17430
|
-
|
|
17431
|
-
|
|
17432
|
-
function DiagAPI2() {
|
|
17354
|
+
/**
|
|
17355
|
+
* Private internal constructor
|
|
17356
|
+
* @private
|
|
17357
|
+
*/
|
|
17358
|
+
constructor() {
|
|
17433
17359
|
function _logProxy(funcName) {
|
|
17434
|
-
return function() {
|
|
17435
|
-
|
|
17436
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
17437
|
-
args[_i] = arguments[_i];
|
|
17438
|
-
}
|
|
17439
|
-
var logger = getGlobal("diag");
|
|
17360
|
+
return function(...args) {
|
|
17361
|
+
const logger = getGlobal("diag");
|
|
17440
17362
|
if (!logger)
|
|
17441
17363
|
return;
|
|
17442
|
-
return logger[funcName]
|
|
17364
|
+
return logger[funcName](...args);
|
|
17443
17365
|
};
|
|
17444
17366
|
}
|
|
17445
17367
|
__name(_logProxy, "_logProxy");
|
|
17446
|
-
|
|
17447
|
-
|
|
17368
|
+
const self2 = this;
|
|
17369
|
+
const setLogger = /* @__PURE__ */ __name((logger, optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }) => {
|
|
17448
17370
|
var _a3, _b, _c;
|
|
17449
|
-
if (optionsOrLogLevel === void 0) {
|
|
17450
|
-
optionsOrLogLevel = { logLevel: DiagLogLevel.INFO };
|
|
17451
|
-
}
|
|
17452
17371
|
if (logger === self2) {
|
|
17453
|
-
|
|
17372
|
+
const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
17454
17373
|
self2.error((_a3 = err.stack) !== null && _a3 !== void 0 ? _a3 : err.message);
|
|
17455
17374
|
return false;
|
|
17456
17375
|
}
|
|
@@ -17459,20 +17378,20 @@ var init_diag = __esm({
|
|
|
17459
17378
|
logLevel: optionsOrLogLevel
|
|
17460
17379
|
};
|
|
17461
17380
|
}
|
|
17462
|
-
|
|
17463
|
-
|
|
17381
|
+
const oldLogger = getGlobal("diag");
|
|
17382
|
+
const newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);
|
|
17464
17383
|
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
17465
|
-
|
|
17466
|
-
oldLogger.warn(
|
|
17467
|
-
newLogger.warn(
|
|
17384
|
+
const stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : "<failed to generate stacktrace>";
|
|
17385
|
+
oldLogger.warn(`Current logger will be overwritten from ${stack}`);
|
|
17386
|
+
newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
|
|
17468
17387
|
}
|
|
17469
17388
|
return registerGlobal("diag", newLogger, self2, true);
|
|
17470
17389
|
}, "setLogger");
|
|
17471
17390
|
self2.setLogger = setLogger;
|
|
17472
|
-
self2.disable =
|
|
17391
|
+
self2.disable = () => {
|
|
17473
17392
|
unregisterGlobal(API_NAME, self2);
|
|
17474
17393
|
};
|
|
17475
|
-
self2.createComponentLogger =
|
|
17394
|
+
self2.createComponentLogger = (options) => {
|
|
17476
17395
|
return new DiagComponentLogger(options);
|
|
17477
17396
|
};
|
|
17478
17397
|
self2.verbose = _logProxy("verbose");
|
|
@@ -17481,140 +17400,82 @@ var init_diag = __esm({
|
|
|
17481
17400
|
self2.warn = _logProxy("warn");
|
|
17482
17401
|
self2.error = _logProxy("error");
|
|
17483
17402
|
}
|
|
17484
|
-
|
|
17485
|
-
DiagAPI2.instance = function() {
|
|
17486
|
-
if (!this._instance) {
|
|
17487
|
-
this._instance = new DiagAPI2();
|
|
17488
|
-
}
|
|
17489
|
-
return this._instance;
|
|
17490
|
-
};
|
|
17491
|
-
return DiagAPI2;
|
|
17492
|
-
})();
|
|
17403
|
+
};
|
|
17493
17404
|
}
|
|
17494
17405
|
});
|
|
17495
17406
|
|
|
17496
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17497
|
-
var
|
|
17407
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js
|
|
17408
|
+
var BaggageImpl;
|
|
17498
17409
|
var init_baggage_impl = __esm({
|
|
17499
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17500
|
-
|
|
17501
|
-
|
|
17502
|
-
|
|
17503
|
-
var i = m.call(o), r, ar = [], e;
|
|
17504
|
-
try {
|
|
17505
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
17506
|
-
} catch (error95) {
|
|
17507
|
-
e = { error: error95 };
|
|
17508
|
-
} finally {
|
|
17509
|
-
try {
|
|
17510
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
17511
|
-
} finally {
|
|
17512
|
-
if (e) throw e.error;
|
|
17513
|
-
}
|
|
17410
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js"() {
|
|
17411
|
+
BaggageImpl = class _BaggageImpl {
|
|
17412
|
+
static {
|
|
17413
|
+
__name(this, "BaggageImpl");
|
|
17514
17414
|
}
|
|
17515
|
-
|
|
17516
|
-
};
|
|
17517
|
-
__values = function(o) {
|
|
17518
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
17519
|
-
if (m) return m.call(o);
|
|
17520
|
-
if (o && typeof o.length === "number") return {
|
|
17521
|
-
next: /* @__PURE__ */ __name(function() {
|
|
17522
|
-
if (o && i >= o.length) o = void 0;
|
|
17523
|
-
return { value: o && o[i++], done: !o };
|
|
17524
|
-
}, "next")
|
|
17525
|
-
};
|
|
17526
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
17527
|
-
};
|
|
17528
|
-
BaggageImpl = /** @class */
|
|
17529
|
-
(function() {
|
|
17530
|
-
function BaggageImpl2(entries) {
|
|
17415
|
+
constructor(entries) {
|
|
17531
17416
|
this._entries = entries ? new Map(entries) : /* @__PURE__ */ new Map();
|
|
17532
17417
|
}
|
|
17533
|
-
|
|
17534
|
-
|
|
17535
|
-
var entry = this._entries.get(key);
|
|
17418
|
+
getEntry(key) {
|
|
17419
|
+
const entry = this._entries.get(key);
|
|
17536
17420
|
if (!entry) {
|
|
17537
17421
|
return void 0;
|
|
17538
17422
|
}
|
|
17539
17423
|
return Object.assign({}, entry);
|
|
17540
|
-
}
|
|
17541
|
-
|
|
17542
|
-
return Array.from(this._entries.entries())
|
|
17543
|
-
|
|
17544
|
-
|
|
17545
|
-
|
|
17546
|
-
};
|
|
17547
|
-
BaggageImpl2.prototype.setEntry = function(key, entry) {
|
|
17548
|
-
var newBaggage = new BaggageImpl2(this._entries);
|
|
17424
|
+
}
|
|
17425
|
+
getAllEntries() {
|
|
17426
|
+
return Array.from(this._entries.entries());
|
|
17427
|
+
}
|
|
17428
|
+
setEntry(key, entry) {
|
|
17429
|
+
const newBaggage = new _BaggageImpl(this._entries);
|
|
17549
17430
|
newBaggage._entries.set(key, entry);
|
|
17550
17431
|
return newBaggage;
|
|
17551
|
-
}
|
|
17552
|
-
|
|
17553
|
-
|
|
17432
|
+
}
|
|
17433
|
+
removeEntry(key) {
|
|
17434
|
+
const newBaggage = new _BaggageImpl(this._entries);
|
|
17554
17435
|
newBaggage._entries.delete(key);
|
|
17555
17436
|
return newBaggage;
|
|
17556
|
-
}
|
|
17557
|
-
|
|
17558
|
-
|
|
17559
|
-
|
|
17560
|
-
|
|
17561
|
-
keys[_i] = arguments[_i];
|
|
17562
|
-
}
|
|
17563
|
-
var newBaggage = new BaggageImpl2(this._entries);
|
|
17564
|
-
try {
|
|
17565
|
-
for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {
|
|
17566
|
-
var key = keys_1_1.value;
|
|
17567
|
-
newBaggage._entries.delete(key);
|
|
17568
|
-
}
|
|
17569
|
-
} catch (e_1_1) {
|
|
17570
|
-
e_1 = { error: e_1_1 };
|
|
17571
|
-
} finally {
|
|
17572
|
-
try {
|
|
17573
|
-
if (keys_1_1 && !keys_1_1.done && (_a3 = keys_1.return)) _a3.call(keys_1);
|
|
17574
|
-
} finally {
|
|
17575
|
-
if (e_1) throw e_1.error;
|
|
17576
|
-
}
|
|
17437
|
+
}
|
|
17438
|
+
removeEntries(...keys) {
|
|
17439
|
+
const newBaggage = new _BaggageImpl(this._entries);
|
|
17440
|
+
for (const key of keys) {
|
|
17441
|
+
newBaggage._entries.delete(key);
|
|
17577
17442
|
}
|
|
17578
17443
|
return newBaggage;
|
|
17579
|
-
}
|
|
17580
|
-
|
|
17581
|
-
return new
|
|
17582
|
-
}
|
|
17583
|
-
|
|
17584
|
-
})();
|
|
17444
|
+
}
|
|
17445
|
+
clear() {
|
|
17446
|
+
return new _BaggageImpl();
|
|
17447
|
+
}
|
|
17448
|
+
};
|
|
17585
17449
|
}
|
|
17586
17450
|
});
|
|
17587
17451
|
|
|
17588
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17452
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js
|
|
17589
17453
|
var baggageEntryMetadataSymbol;
|
|
17590
17454
|
var init_symbol = __esm({
|
|
17591
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17455
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js"() {
|
|
17592
17456
|
baggageEntryMetadataSymbol = /* @__PURE__ */ Symbol("BaggageEntryMetadata");
|
|
17593
17457
|
}
|
|
17594
17458
|
});
|
|
17595
17459
|
|
|
17596
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17597
|
-
function createBaggage(entries) {
|
|
17598
|
-
if (entries === void 0) {
|
|
17599
|
-
entries = {};
|
|
17600
|
-
}
|
|
17460
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/utils.js
|
|
17461
|
+
function createBaggage(entries = {}) {
|
|
17601
17462
|
return new BaggageImpl(new Map(Object.entries(entries)));
|
|
17602
17463
|
}
|
|
17603
17464
|
function baggageEntryMetadataFromString(str) {
|
|
17604
17465
|
if (typeof str !== "string") {
|
|
17605
|
-
diag.error(
|
|
17466
|
+
diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
|
|
17606
17467
|
str = "";
|
|
17607
17468
|
}
|
|
17608
17469
|
return {
|
|
17609
17470
|
__TYPE__: baggageEntryMetadataSymbol,
|
|
17610
|
-
toString
|
|
17471
|
+
toString() {
|
|
17611
17472
|
return str;
|
|
17612
|
-
}
|
|
17473
|
+
}
|
|
17613
17474
|
};
|
|
17614
17475
|
}
|
|
17615
17476
|
var diag;
|
|
17616
17477
|
var init_utils2 = __esm({
|
|
17617
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17478
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/utils.js"() {
|
|
17618
17479
|
init_diag();
|
|
17619
17480
|
init_baggage_impl();
|
|
17620
17481
|
init_symbol();
|
|
@@ -17624,44 +17485,47 @@ var init_utils2 = __esm({
|
|
|
17624
17485
|
}
|
|
17625
17486
|
});
|
|
17626
17487
|
|
|
17627
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17488
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context/context.js
|
|
17628
17489
|
function createContextKey(description) {
|
|
17629
17490
|
return Symbol.for(description);
|
|
17630
17491
|
}
|
|
17631
17492
|
var BaseContext, ROOT_CONTEXT;
|
|
17632
17493
|
var init_context = __esm({
|
|
17633
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17494
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context/context.js"() {
|
|
17634
17495
|
__name(createContextKey, "createContextKey");
|
|
17635
|
-
BaseContext =
|
|
17636
|
-
|
|
17637
|
-
|
|
17638
|
-
|
|
17496
|
+
BaseContext = class _BaseContext {
|
|
17497
|
+
static {
|
|
17498
|
+
__name(this, "BaseContext");
|
|
17499
|
+
}
|
|
17500
|
+
/**
|
|
17501
|
+
* Construct a new context which inherits values from an optional parent context.
|
|
17502
|
+
*
|
|
17503
|
+
* @param parentContext a context from which to inherit values
|
|
17504
|
+
*/
|
|
17505
|
+
constructor(parentContext) {
|
|
17506
|
+
const self2 = this;
|
|
17639
17507
|
self2._currentContext = parentContext ? new Map(parentContext) : /* @__PURE__ */ new Map();
|
|
17640
|
-
self2.getValue =
|
|
17641
|
-
|
|
17642
|
-
|
|
17643
|
-
self2.setValue = function(key, value) {
|
|
17644
|
-
var context2 = new BaseContext2(self2._currentContext);
|
|
17508
|
+
self2.getValue = (key) => self2._currentContext.get(key);
|
|
17509
|
+
self2.setValue = (key, value) => {
|
|
17510
|
+
const context2 = new _BaseContext(self2._currentContext);
|
|
17645
17511
|
context2._currentContext.set(key, value);
|
|
17646
17512
|
return context2;
|
|
17647
17513
|
};
|
|
17648
|
-
self2.deleteValue =
|
|
17649
|
-
|
|
17514
|
+
self2.deleteValue = (key) => {
|
|
17515
|
+
const context2 = new _BaseContext(self2._currentContext);
|
|
17650
17516
|
context2._currentContext.delete(key);
|
|
17651
17517
|
return context2;
|
|
17652
17518
|
};
|
|
17653
17519
|
}
|
|
17654
|
-
|
|
17655
|
-
return BaseContext2;
|
|
17656
|
-
})();
|
|
17520
|
+
};
|
|
17657
17521
|
ROOT_CONTEXT = new BaseContext();
|
|
17658
17522
|
}
|
|
17659
17523
|
});
|
|
17660
17524
|
|
|
17661
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17662
|
-
var consoleMap, DiagConsoleLogger;
|
|
17525
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.js
|
|
17526
|
+
var consoleMap, _originalConsoleMethods, DiagConsoleLogger;
|
|
17663
17527
|
var init_consoleLogger = __esm({
|
|
17664
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17528
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.js"() {
|
|
17665
17529
|
consoleMap = [
|
|
17666
17530
|
{ n: "error", c: "error" },
|
|
17667
17531
|
{ n: "warn", c: "warn" },
|
|
@@ -17669,185 +17533,176 @@ var init_consoleLogger = __esm({
|
|
|
17669
17533
|
{ n: "debug", c: "debug" },
|
|
17670
17534
|
{ n: "verbose", c: "trace" }
|
|
17671
17535
|
];
|
|
17672
|
-
|
|
17673
|
-
|
|
17674
|
-
|
|
17536
|
+
_originalConsoleMethods = {};
|
|
17537
|
+
if (typeof console !== "undefined") {
|
|
17538
|
+
const keys = [
|
|
17539
|
+
"error",
|
|
17540
|
+
"warn",
|
|
17541
|
+
"info",
|
|
17542
|
+
"debug",
|
|
17543
|
+
"trace",
|
|
17544
|
+
"log"
|
|
17545
|
+
];
|
|
17546
|
+
for (const key of keys) {
|
|
17547
|
+
if (typeof console[key] === "function") {
|
|
17548
|
+
_originalConsoleMethods[key] = console[key];
|
|
17549
|
+
}
|
|
17550
|
+
}
|
|
17551
|
+
}
|
|
17552
|
+
DiagConsoleLogger = class {
|
|
17553
|
+
static {
|
|
17554
|
+
__name(this, "DiagConsoleLogger");
|
|
17555
|
+
}
|
|
17556
|
+
constructor() {
|
|
17675
17557
|
function _consoleFunc(funcName) {
|
|
17676
|
-
return function() {
|
|
17677
|
-
|
|
17678
|
-
|
|
17679
|
-
|
|
17558
|
+
return function(...args) {
|
|
17559
|
+
let theFunc = _originalConsoleMethods[funcName];
|
|
17560
|
+
if (typeof theFunc !== "function") {
|
|
17561
|
+
theFunc = _originalConsoleMethods["log"];
|
|
17680
17562
|
}
|
|
17681
|
-
if (console) {
|
|
17682
|
-
|
|
17563
|
+
if (typeof theFunc !== "function" && console) {
|
|
17564
|
+
theFunc = console[funcName];
|
|
17683
17565
|
if (typeof theFunc !== "function") {
|
|
17684
17566
|
theFunc = console.log;
|
|
17685
17567
|
}
|
|
17686
|
-
|
|
17687
|
-
|
|
17688
|
-
|
|
17568
|
+
}
|
|
17569
|
+
if (typeof theFunc === "function") {
|
|
17570
|
+
return theFunc.apply(console, args);
|
|
17689
17571
|
}
|
|
17690
17572
|
};
|
|
17691
17573
|
}
|
|
17692
17574
|
__name(_consoleFunc, "_consoleFunc");
|
|
17693
|
-
for (
|
|
17575
|
+
for (let i = 0; i < consoleMap.length; i++) {
|
|
17694
17576
|
this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
|
|
17695
17577
|
}
|
|
17696
17578
|
}
|
|
17697
|
-
|
|
17698
|
-
return DiagConsoleLogger2;
|
|
17699
|
-
})();
|
|
17579
|
+
};
|
|
17700
17580
|
}
|
|
17701
17581
|
});
|
|
17702
17582
|
|
|
17703
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17583
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js
|
|
17704
17584
|
function createNoopMeter() {
|
|
17705
17585
|
return NOOP_METER;
|
|
17706
17586
|
}
|
|
17707
|
-
var
|
|
17587
|
+
var NoopMeter, NoopMetric, NoopCounterMetric, NoopUpDownCounterMetric, NoopGaugeMetric, NoopHistogramMetric, NoopObservableMetric, NoopObservableCounterMetric, NoopObservableGaugeMetric, NoopObservableUpDownCounterMetric, NOOP_METER, NOOP_COUNTER_METRIC, NOOP_GAUGE_METRIC, NOOP_HISTOGRAM_METRIC, NOOP_UP_DOWN_COUNTER_METRIC, NOOP_OBSERVABLE_COUNTER_METRIC, NOOP_OBSERVABLE_GAUGE_METRIC, NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
|
|
17708
17588
|
var init_NoopMeter = __esm({
|
|
17709
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17710
|
-
|
|
17711
|
-
|
|
17712
|
-
|
|
17713
|
-
|
|
17714
|
-
|
|
17715
|
-
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
17716
|
-
};
|
|
17717
|
-
return extendStatics(d, b);
|
|
17718
|
-
}, "extendStatics");
|
|
17719
|
-
return function(d, b) {
|
|
17720
|
-
if (typeof b !== "function" && b !== null)
|
|
17721
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
17722
|
-
extendStatics(d, b);
|
|
17723
|
-
function __() {
|
|
17724
|
-
this.constructor = d;
|
|
17725
|
-
}
|
|
17726
|
-
__name(__, "__");
|
|
17727
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
17728
|
-
};
|
|
17729
|
-
})();
|
|
17730
|
-
NoopMeter = /** @class */
|
|
17731
|
-
(function() {
|
|
17732
|
-
function NoopMeter2() {
|
|
17589
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js"() {
|
|
17590
|
+
NoopMeter = class {
|
|
17591
|
+
static {
|
|
17592
|
+
__name(this, "NoopMeter");
|
|
17593
|
+
}
|
|
17594
|
+
constructor() {
|
|
17733
17595
|
}
|
|
17734
|
-
|
|
17735
|
-
|
|
17596
|
+
/**
|
|
17597
|
+
* @see {@link Meter.createGauge}
|
|
17598
|
+
*/
|
|
17599
|
+
createGauge(_name, _options) {
|
|
17736
17600
|
return NOOP_GAUGE_METRIC;
|
|
17737
|
-
}
|
|
17738
|
-
|
|
17601
|
+
}
|
|
17602
|
+
/**
|
|
17603
|
+
* @see {@link Meter.createHistogram}
|
|
17604
|
+
*/
|
|
17605
|
+
createHistogram(_name, _options) {
|
|
17739
17606
|
return NOOP_HISTOGRAM_METRIC;
|
|
17740
|
-
}
|
|
17741
|
-
|
|
17607
|
+
}
|
|
17608
|
+
/**
|
|
17609
|
+
* @see {@link Meter.createCounter}
|
|
17610
|
+
*/
|
|
17611
|
+
createCounter(_name, _options) {
|
|
17742
17612
|
return NOOP_COUNTER_METRIC;
|
|
17743
|
-
}
|
|
17744
|
-
|
|
17613
|
+
}
|
|
17614
|
+
/**
|
|
17615
|
+
* @see {@link Meter.createUpDownCounter}
|
|
17616
|
+
*/
|
|
17617
|
+
createUpDownCounter(_name, _options) {
|
|
17745
17618
|
return NOOP_UP_DOWN_COUNTER_METRIC;
|
|
17746
|
-
}
|
|
17747
|
-
|
|
17619
|
+
}
|
|
17620
|
+
/**
|
|
17621
|
+
* @see {@link Meter.createObservableGauge}
|
|
17622
|
+
*/
|
|
17623
|
+
createObservableGauge(_name, _options) {
|
|
17748
17624
|
return NOOP_OBSERVABLE_GAUGE_METRIC;
|
|
17749
|
-
}
|
|
17750
|
-
|
|
17625
|
+
}
|
|
17626
|
+
/**
|
|
17627
|
+
* @see {@link Meter.createObservableCounter}
|
|
17628
|
+
*/
|
|
17629
|
+
createObservableCounter(_name, _options) {
|
|
17751
17630
|
return NOOP_OBSERVABLE_COUNTER_METRIC;
|
|
17752
|
-
}
|
|
17753
|
-
|
|
17631
|
+
}
|
|
17632
|
+
/**
|
|
17633
|
+
* @see {@link Meter.createObservableUpDownCounter}
|
|
17634
|
+
*/
|
|
17635
|
+
createObservableUpDownCounter(_name, _options) {
|
|
17754
17636
|
return NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
|
|
17755
|
-
};
|
|
17756
|
-
NoopMeter2.prototype.addBatchObservableCallback = function(_callback, _observables) {
|
|
17757
|
-
};
|
|
17758
|
-
NoopMeter2.prototype.removeBatchObservableCallback = function(_callback) {
|
|
17759
|
-
};
|
|
17760
|
-
return NoopMeter2;
|
|
17761
|
-
})();
|
|
17762
|
-
NoopMetric = /** @class */
|
|
17763
|
-
/* @__PURE__ */ (function() {
|
|
17764
|
-
function NoopMetric2() {
|
|
17765
17637
|
}
|
|
17766
|
-
|
|
17767
|
-
|
|
17768
|
-
|
|
17769
|
-
|
|
17770
|
-
|
|
17771
|
-
|
|
17772
|
-
|
|
17773
|
-
|
|
17774
|
-
|
|
17775
|
-
|
|
17776
|
-
|
|
17777
|
-
|
|
17778
|
-
|
|
17779
|
-
|
|
17780
|
-
|
|
17781
|
-
|
|
17782
|
-
|
|
17783
|
-
|
|
17784
|
-
|
|
17785
|
-
}
|
|
17786
|
-
|
|
17787
|
-
|
|
17788
|
-
|
|
17789
|
-
|
|
17790
|
-
|
|
17791
|
-
|
|
17792
|
-
|
|
17793
|
-
|
|
17794
|
-
|
|
17795
|
-
|
|
17796
|
-
|
|
17797
|
-
|
|
17798
|
-
|
|
17799
|
-
}
|
|
17800
|
-
|
|
17801
|
-
|
|
17802
|
-
|
|
17803
|
-
|
|
17804
|
-
|
|
17805
|
-
|
|
17806
|
-
|
|
17807
|
-
|
|
17808
|
-
|
|
17809
|
-
|
|
17810
|
-
|
|
17811
|
-
|
|
17812
|
-
|
|
17813
|
-
|
|
17814
|
-
|
|
17815
|
-
|
|
17816
|
-
|
|
17817
|
-
|
|
17818
|
-
|
|
17819
|
-
|
|
17820
|
-
|
|
17821
|
-
|
|
17822
|
-
|
|
17823
|
-
}
|
|
17824
|
-
|
|
17825
|
-
|
|
17826
|
-
|
|
17827
|
-
|
|
17828
|
-
|
|
17829
|
-
|
|
17830
|
-
|
|
17831
|
-
|
|
17832
|
-
|
|
17833
|
-
|
|
17834
|
-
(function(_super) {
|
|
17835
|
-
__extends(NoopObservableGaugeMetric2, _super);
|
|
17836
|
-
function NoopObservableGaugeMetric2() {
|
|
17837
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
17838
|
-
}
|
|
17839
|
-
__name(NoopObservableGaugeMetric2, "NoopObservableGaugeMetric");
|
|
17840
|
-
return NoopObservableGaugeMetric2;
|
|
17841
|
-
})(NoopObservableMetric);
|
|
17842
|
-
NoopObservableUpDownCounterMetric = /** @class */
|
|
17843
|
-
(function(_super) {
|
|
17844
|
-
__extends(NoopObservableUpDownCounterMetric2, _super);
|
|
17845
|
-
function NoopObservableUpDownCounterMetric2() {
|
|
17846
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
17847
|
-
}
|
|
17848
|
-
__name(NoopObservableUpDownCounterMetric2, "NoopObservableUpDownCounterMetric");
|
|
17849
|
-
return NoopObservableUpDownCounterMetric2;
|
|
17850
|
-
})(NoopObservableMetric);
|
|
17638
|
+
/**
|
|
17639
|
+
* @see {@link Meter.addBatchObservableCallback}
|
|
17640
|
+
*/
|
|
17641
|
+
addBatchObservableCallback(_callback, _observables) {
|
|
17642
|
+
}
|
|
17643
|
+
/**
|
|
17644
|
+
* @see {@link Meter.removeBatchObservableCallback}
|
|
17645
|
+
*/
|
|
17646
|
+
removeBatchObservableCallback(_callback) {
|
|
17647
|
+
}
|
|
17648
|
+
};
|
|
17649
|
+
NoopMetric = class {
|
|
17650
|
+
static {
|
|
17651
|
+
__name(this, "NoopMetric");
|
|
17652
|
+
}
|
|
17653
|
+
};
|
|
17654
|
+
NoopCounterMetric = class extends NoopMetric {
|
|
17655
|
+
static {
|
|
17656
|
+
__name(this, "NoopCounterMetric");
|
|
17657
|
+
}
|
|
17658
|
+
add(_value, _attributes) {
|
|
17659
|
+
}
|
|
17660
|
+
};
|
|
17661
|
+
NoopUpDownCounterMetric = class extends NoopMetric {
|
|
17662
|
+
static {
|
|
17663
|
+
__name(this, "NoopUpDownCounterMetric");
|
|
17664
|
+
}
|
|
17665
|
+
add(_value, _attributes) {
|
|
17666
|
+
}
|
|
17667
|
+
};
|
|
17668
|
+
NoopGaugeMetric = class extends NoopMetric {
|
|
17669
|
+
static {
|
|
17670
|
+
__name(this, "NoopGaugeMetric");
|
|
17671
|
+
}
|
|
17672
|
+
record(_value, _attributes) {
|
|
17673
|
+
}
|
|
17674
|
+
};
|
|
17675
|
+
NoopHistogramMetric = class extends NoopMetric {
|
|
17676
|
+
static {
|
|
17677
|
+
__name(this, "NoopHistogramMetric");
|
|
17678
|
+
}
|
|
17679
|
+
record(_value, _attributes) {
|
|
17680
|
+
}
|
|
17681
|
+
};
|
|
17682
|
+
NoopObservableMetric = class {
|
|
17683
|
+
static {
|
|
17684
|
+
__name(this, "NoopObservableMetric");
|
|
17685
|
+
}
|
|
17686
|
+
addCallback(_callback) {
|
|
17687
|
+
}
|
|
17688
|
+
removeCallback(_callback) {
|
|
17689
|
+
}
|
|
17690
|
+
};
|
|
17691
|
+
NoopObservableCounterMetric = class extends NoopObservableMetric {
|
|
17692
|
+
static {
|
|
17693
|
+
__name(this, "NoopObservableCounterMetric");
|
|
17694
|
+
}
|
|
17695
|
+
};
|
|
17696
|
+
NoopObservableGaugeMetric = class extends NoopObservableMetric {
|
|
17697
|
+
static {
|
|
17698
|
+
__name(this, "NoopObservableGaugeMetric");
|
|
17699
|
+
}
|
|
17700
|
+
};
|
|
17701
|
+
NoopObservableUpDownCounterMetric = class extends NoopObservableMetric {
|
|
17702
|
+
static {
|
|
17703
|
+
__name(this, "NoopObservableUpDownCounterMetric");
|
|
17704
|
+
}
|
|
17705
|
+
};
|
|
17851
17706
|
NOOP_METER = new NoopMeter();
|
|
17852
17707
|
NOOP_COUNTER_METRIC = new NoopCounterMetric();
|
|
17853
17708
|
NOOP_GAUGE_METRIC = new NoopGaugeMetric();
|
|
@@ -17860,10 +17715,10 @@ var init_NoopMeter = __esm({
|
|
|
17860
17715
|
}
|
|
17861
17716
|
});
|
|
17862
17717
|
|
|
17863
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17718
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics/Metric.js
|
|
17864
17719
|
var ValueType;
|
|
17865
17720
|
var init_Metric = __esm({
|
|
17866
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17721
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics/Metric.js"() {
|
|
17867
17722
|
(function(ValueType2) {
|
|
17868
17723
|
ValueType2[ValueType2["INT"] = 0] = "INT";
|
|
17869
17724
|
ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
|
|
@@ -17871,174 +17726,136 @@ var init_Metric = __esm({
|
|
|
17871
17726
|
}
|
|
17872
17727
|
});
|
|
17873
17728
|
|
|
17874
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17729
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js
|
|
17875
17730
|
var defaultTextMapGetter, defaultTextMapSetter;
|
|
17876
17731
|
var init_TextMapPropagator = __esm({
|
|
17877
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17732
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js"() {
|
|
17878
17733
|
defaultTextMapGetter = {
|
|
17879
|
-
get
|
|
17734
|
+
get(carrier, key) {
|
|
17880
17735
|
if (carrier == null) {
|
|
17881
17736
|
return void 0;
|
|
17882
17737
|
}
|
|
17883
17738
|
return carrier[key];
|
|
17884
|
-
},
|
|
17885
|
-
keys
|
|
17739
|
+
},
|
|
17740
|
+
keys(carrier) {
|
|
17886
17741
|
if (carrier == null) {
|
|
17887
17742
|
return [];
|
|
17888
17743
|
}
|
|
17889
17744
|
return Object.keys(carrier);
|
|
17890
|
-
}
|
|
17745
|
+
}
|
|
17891
17746
|
};
|
|
17892
17747
|
defaultTextMapSetter = {
|
|
17893
|
-
set
|
|
17748
|
+
set(carrier, key, value) {
|
|
17894
17749
|
if (carrier == null) {
|
|
17895
17750
|
return;
|
|
17896
17751
|
}
|
|
17897
17752
|
carrier[key] = value;
|
|
17898
|
-
}
|
|
17753
|
+
}
|
|
17899
17754
|
};
|
|
17900
17755
|
}
|
|
17901
17756
|
});
|
|
17902
17757
|
|
|
17903
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17904
|
-
var
|
|
17758
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js
|
|
17759
|
+
var NoopContextManager;
|
|
17905
17760
|
var init_NoopContextManager = __esm({
|
|
17906
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17761
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js"() {
|
|
17907
17762
|
init_context();
|
|
17908
|
-
|
|
17909
|
-
|
|
17910
|
-
|
|
17911
|
-
var i = m.call(o), r, ar = [], e;
|
|
17912
|
-
try {
|
|
17913
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
17914
|
-
} catch (error95) {
|
|
17915
|
-
e = { error: error95 };
|
|
17916
|
-
} finally {
|
|
17917
|
-
try {
|
|
17918
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
17919
|
-
} finally {
|
|
17920
|
-
if (e) throw e.error;
|
|
17921
|
-
}
|
|
17763
|
+
NoopContextManager = class {
|
|
17764
|
+
static {
|
|
17765
|
+
__name(this, "NoopContextManager");
|
|
17922
17766
|
}
|
|
17923
|
-
|
|
17924
|
-
|
|
17925
|
-
__spreadArray3 = function(to, from, pack) {
|
|
17926
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
17927
|
-
if (ar || !(i in from)) {
|
|
17928
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17929
|
-
ar[i] = from[i];
|
|
17930
|
-
}
|
|
17767
|
+
active() {
|
|
17768
|
+
return ROOT_CONTEXT;
|
|
17931
17769
|
}
|
|
17932
|
-
|
|
17933
|
-
|
|
17934
|
-
NoopContextManager = /** @class */
|
|
17935
|
-
(function() {
|
|
17936
|
-
function NoopContextManager2() {
|
|
17770
|
+
with(_context, fn, thisArg, ...args) {
|
|
17771
|
+
return fn.call(thisArg, ...args);
|
|
17937
17772
|
}
|
|
17938
|
-
|
|
17939
|
-
NoopContextManager2.prototype.active = function() {
|
|
17940
|
-
return ROOT_CONTEXT;
|
|
17941
|
-
};
|
|
17942
|
-
NoopContextManager2.prototype.with = function(_context, fn, thisArg) {
|
|
17943
|
-
var args = [];
|
|
17944
|
-
for (var _i = 3; _i < arguments.length; _i++) {
|
|
17945
|
-
args[_i - 3] = arguments[_i];
|
|
17946
|
-
}
|
|
17947
|
-
return fn.call.apply(fn, __spreadArray3([thisArg], __read4(args), false));
|
|
17948
|
-
};
|
|
17949
|
-
NoopContextManager2.prototype.bind = function(_context, target) {
|
|
17773
|
+
bind(_context, target) {
|
|
17950
17774
|
return target;
|
|
17951
|
-
}
|
|
17952
|
-
|
|
17775
|
+
}
|
|
17776
|
+
enable() {
|
|
17953
17777
|
return this;
|
|
17954
|
-
}
|
|
17955
|
-
|
|
17778
|
+
}
|
|
17779
|
+
disable() {
|
|
17956
17780
|
return this;
|
|
17957
|
-
}
|
|
17958
|
-
|
|
17959
|
-
})();
|
|
17781
|
+
}
|
|
17782
|
+
};
|
|
17960
17783
|
}
|
|
17961
17784
|
});
|
|
17962
17785
|
|
|
17963
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17964
|
-
var
|
|
17786
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/context.js
|
|
17787
|
+
var API_NAME2, NOOP_CONTEXT_MANAGER, ContextAPI;
|
|
17965
17788
|
var init_context2 = __esm({
|
|
17966
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17789
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/context.js"() {
|
|
17967
17790
|
init_NoopContextManager();
|
|
17968
17791
|
init_global_utils();
|
|
17969
17792
|
init_diag();
|
|
17970
|
-
__read5 = function(o, n) {
|
|
17971
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
17972
|
-
if (!m) return o;
|
|
17973
|
-
var i = m.call(o), r, ar = [], e;
|
|
17974
|
-
try {
|
|
17975
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
17976
|
-
} catch (error95) {
|
|
17977
|
-
e = { error: error95 };
|
|
17978
|
-
} finally {
|
|
17979
|
-
try {
|
|
17980
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
17981
|
-
} finally {
|
|
17982
|
-
if (e) throw e.error;
|
|
17983
|
-
}
|
|
17984
|
-
}
|
|
17985
|
-
return ar;
|
|
17986
|
-
};
|
|
17987
|
-
__spreadArray4 = function(to, from, pack) {
|
|
17988
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
17989
|
-
if (ar || !(i in from)) {
|
|
17990
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17991
|
-
ar[i] = from[i];
|
|
17992
|
-
}
|
|
17993
|
-
}
|
|
17994
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
17995
|
-
};
|
|
17996
17793
|
API_NAME2 = "context";
|
|
17997
17794
|
NOOP_CONTEXT_MANAGER = new NoopContextManager();
|
|
17998
|
-
ContextAPI =
|
|
17999
|
-
|
|
18000
|
-
|
|
17795
|
+
ContextAPI = class _ContextAPI {
|
|
17796
|
+
static {
|
|
17797
|
+
__name(this, "ContextAPI");
|
|
17798
|
+
}
|
|
17799
|
+
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
17800
|
+
constructor() {
|
|
18001
17801
|
}
|
|
18002
|
-
|
|
18003
|
-
|
|
17802
|
+
/** Get the singleton instance of the Context API */
|
|
17803
|
+
static getInstance() {
|
|
18004
17804
|
if (!this._instance) {
|
|
18005
|
-
this._instance = new
|
|
17805
|
+
this._instance = new _ContextAPI();
|
|
18006
17806
|
}
|
|
18007
17807
|
return this._instance;
|
|
18008
|
-
}
|
|
18009
|
-
|
|
17808
|
+
}
|
|
17809
|
+
/**
|
|
17810
|
+
* Set the current context manager.
|
|
17811
|
+
*
|
|
17812
|
+
* @returns true if the context manager was successfully registered, else false
|
|
17813
|
+
*/
|
|
17814
|
+
setGlobalContextManager(contextManager) {
|
|
18010
17815
|
return registerGlobal(API_NAME2, contextManager, DiagAPI.instance());
|
|
18011
|
-
}
|
|
18012
|
-
|
|
17816
|
+
}
|
|
17817
|
+
/**
|
|
17818
|
+
* Get the currently active context
|
|
17819
|
+
*/
|
|
17820
|
+
active() {
|
|
18013
17821
|
return this._getContextManager().active();
|
|
18014
|
-
}
|
|
18015
|
-
|
|
18016
|
-
|
|
18017
|
-
|
|
18018
|
-
|
|
18019
|
-
|
|
18020
|
-
|
|
18021
|
-
|
|
18022
|
-
|
|
18023
|
-
|
|
17822
|
+
}
|
|
17823
|
+
/**
|
|
17824
|
+
* Execute a function with an active context
|
|
17825
|
+
*
|
|
17826
|
+
* @param context context to be active during function execution
|
|
17827
|
+
* @param fn function to execute in a context
|
|
17828
|
+
* @param thisArg optional receiver to be used for calling fn
|
|
17829
|
+
* @param args optional arguments forwarded to fn
|
|
17830
|
+
*/
|
|
17831
|
+
with(context2, fn, thisArg, ...args) {
|
|
17832
|
+
return this._getContextManager().with(context2, fn, thisArg, ...args);
|
|
17833
|
+
}
|
|
17834
|
+
/**
|
|
17835
|
+
* Bind a context to a target function or event emitter
|
|
17836
|
+
*
|
|
17837
|
+
* @param context context to bind to the event emitter or function. Defaults to the currently active context
|
|
17838
|
+
* @param target function or event emitter to bind
|
|
17839
|
+
*/
|
|
17840
|
+
bind(context2, target) {
|
|
18024
17841
|
return this._getContextManager().bind(context2, target);
|
|
18025
|
-
}
|
|
18026
|
-
|
|
17842
|
+
}
|
|
17843
|
+
_getContextManager() {
|
|
18027
17844
|
return getGlobal(API_NAME2) || NOOP_CONTEXT_MANAGER;
|
|
18028
|
-
}
|
|
18029
|
-
|
|
17845
|
+
}
|
|
17846
|
+
/** Disable and remove the global context manager */
|
|
17847
|
+
disable() {
|
|
18030
17848
|
this._getContextManager().disable();
|
|
18031
17849
|
unregisterGlobal(API_NAME2, DiagAPI.instance());
|
|
18032
|
-
}
|
|
18033
|
-
|
|
18034
|
-
})();
|
|
17850
|
+
}
|
|
17851
|
+
};
|
|
18035
17852
|
}
|
|
18036
17853
|
});
|
|
18037
17854
|
|
|
18038
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17855
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js
|
|
18039
17856
|
var TraceFlags;
|
|
18040
17857
|
var init_trace_flags = __esm({
|
|
18041
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17858
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js"() {
|
|
18042
17859
|
(function(TraceFlags2) {
|
|
18043
17860
|
TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
|
|
18044
17861
|
TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
|
|
@@ -18046,10 +17863,10 @@ var init_trace_flags = __esm({
|
|
|
18046
17863
|
}
|
|
18047
17864
|
});
|
|
18048
17865
|
|
|
18049
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17866
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js
|
|
18050
17867
|
var INVALID_SPANID, INVALID_TRACEID, INVALID_SPAN_CONTEXT;
|
|
18051
17868
|
var init_invalid_span_constants = __esm({
|
|
18052
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17869
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js"() {
|
|
18053
17870
|
init_trace_flags();
|
|
18054
17871
|
INVALID_SPANID = "0000000000000000";
|
|
18055
17872
|
INVALID_TRACEID = "00000000000000000000000000000000";
|
|
@@ -18061,57 +17878,63 @@ var init_invalid_span_constants = __esm({
|
|
|
18061
17878
|
}
|
|
18062
17879
|
});
|
|
18063
17880
|
|
|
18064
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17881
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js
|
|
18065
17882
|
var NonRecordingSpan;
|
|
18066
17883
|
var init_NonRecordingSpan = __esm({
|
|
18067
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17884
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js"() {
|
|
18068
17885
|
init_invalid_span_constants();
|
|
18069
|
-
NonRecordingSpan =
|
|
18070
|
-
|
|
18071
|
-
|
|
18072
|
-
|
|
18073
|
-
|
|
18074
|
-
|
|
18075
|
-
this._spanContext = _spanContext;
|
|
17886
|
+
NonRecordingSpan = class {
|
|
17887
|
+
static {
|
|
17888
|
+
__name(this, "NonRecordingSpan");
|
|
17889
|
+
}
|
|
17890
|
+
constructor(spanContext = INVALID_SPAN_CONTEXT) {
|
|
17891
|
+
this._spanContext = spanContext;
|
|
18076
17892
|
}
|
|
18077
|
-
|
|
18078
|
-
|
|
17893
|
+
// Returns a SpanContext.
|
|
17894
|
+
spanContext() {
|
|
18079
17895
|
return this._spanContext;
|
|
18080
|
-
}
|
|
18081
|
-
|
|
17896
|
+
}
|
|
17897
|
+
// By default does nothing
|
|
17898
|
+
setAttribute(_key, _value) {
|
|
18082
17899
|
return this;
|
|
18083
|
-
}
|
|
18084
|
-
|
|
17900
|
+
}
|
|
17901
|
+
// By default does nothing
|
|
17902
|
+
setAttributes(_attributes) {
|
|
18085
17903
|
return this;
|
|
18086
|
-
}
|
|
18087
|
-
|
|
17904
|
+
}
|
|
17905
|
+
// By default does nothing
|
|
17906
|
+
addEvent(_name, _attributes) {
|
|
18088
17907
|
return this;
|
|
18089
|
-
}
|
|
18090
|
-
|
|
17908
|
+
}
|
|
17909
|
+
addLink(_link) {
|
|
18091
17910
|
return this;
|
|
18092
|
-
}
|
|
18093
|
-
|
|
17911
|
+
}
|
|
17912
|
+
addLinks(_links) {
|
|
18094
17913
|
return this;
|
|
18095
|
-
}
|
|
18096
|
-
|
|
17914
|
+
}
|
|
17915
|
+
// By default does nothing
|
|
17916
|
+
setStatus(_status) {
|
|
18097
17917
|
return this;
|
|
18098
|
-
}
|
|
18099
|
-
|
|
17918
|
+
}
|
|
17919
|
+
// By default does nothing
|
|
17920
|
+
updateName(_name) {
|
|
18100
17921
|
return this;
|
|
18101
|
-
}
|
|
18102
|
-
|
|
18103
|
-
|
|
18104
|
-
|
|
17922
|
+
}
|
|
17923
|
+
// By default does nothing
|
|
17924
|
+
end(_endTime) {
|
|
17925
|
+
}
|
|
17926
|
+
// isRecording always returns false for NonRecordingSpan.
|
|
17927
|
+
isRecording() {
|
|
18105
17928
|
return false;
|
|
18106
|
-
}
|
|
18107
|
-
|
|
18108
|
-
|
|
18109
|
-
|
|
18110
|
-
}
|
|
17929
|
+
}
|
|
17930
|
+
// By default does nothing
|
|
17931
|
+
recordException(_exception, _time) {
|
|
17932
|
+
}
|
|
17933
|
+
};
|
|
18111
17934
|
}
|
|
18112
17935
|
});
|
|
18113
17936
|
|
|
18114
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17937
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/context-utils.js
|
|
18115
17938
|
function getSpan(context2) {
|
|
18116
17939
|
return context2.getValue(SPAN_KEY) || void 0;
|
|
18117
17940
|
}
|
|
@@ -18133,7 +17956,7 @@ function getSpanContext(context2) {
|
|
|
18133
17956
|
}
|
|
18134
17957
|
var SPAN_KEY;
|
|
18135
17958
|
var init_context_utils = __esm({
|
|
18136
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17959
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/context-utils.js"() {
|
|
18137
17960
|
init_context();
|
|
18138
17961
|
init_NonRecordingSpan();
|
|
18139
17962
|
init_context2();
|
|
@@ -18147,12 +17970,21 @@ var init_context_utils = __esm({
|
|
|
18147
17970
|
}
|
|
18148
17971
|
});
|
|
18149
17972
|
|
|
18150
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17973
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js
|
|
17974
|
+
function isValidHex(id, length) {
|
|
17975
|
+
if (typeof id !== "string" || id.length !== length)
|
|
17976
|
+
return false;
|
|
17977
|
+
let r = 0;
|
|
17978
|
+
for (let i = 0; i < id.length; i += 4) {
|
|
17979
|
+
r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
|
|
17980
|
+
}
|
|
17981
|
+
return r === length;
|
|
17982
|
+
}
|
|
18151
17983
|
function isValidTraceId(traceId) {
|
|
18152
|
-
return
|
|
17984
|
+
return isValidHex(traceId, 32) && traceId !== INVALID_TRACEID;
|
|
18153
17985
|
}
|
|
18154
17986
|
function isValidSpanId(spanId) {
|
|
18155
|
-
return
|
|
17987
|
+
return isValidHex(spanId, 16) && spanId !== INVALID_SPANID;
|
|
18156
17988
|
}
|
|
18157
17989
|
function isSpanContextValid(spanContext) {
|
|
18158
17990
|
return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
|
|
@@ -18160,13 +17992,117 @@ function isSpanContextValid(spanContext) {
|
|
|
18160
17992
|
function wrapSpanContext(spanContext) {
|
|
18161
17993
|
return new NonRecordingSpan(spanContext);
|
|
18162
17994
|
}
|
|
18163
|
-
var
|
|
17995
|
+
var isHex;
|
|
18164
17996
|
var init_spancontext_utils = __esm({
|
|
18165
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
17997
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js"() {
|
|
18166
17998
|
init_invalid_span_constants();
|
|
18167
17999
|
init_NonRecordingSpan();
|
|
18168
|
-
|
|
18169
|
-
|
|
18000
|
+
isHex = new Uint8Array([
|
|
18001
|
+
0,
|
|
18002
|
+
0,
|
|
18003
|
+
0,
|
|
18004
|
+
0,
|
|
18005
|
+
0,
|
|
18006
|
+
0,
|
|
18007
|
+
0,
|
|
18008
|
+
0,
|
|
18009
|
+
0,
|
|
18010
|
+
0,
|
|
18011
|
+
0,
|
|
18012
|
+
0,
|
|
18013
|
+
0,
|
|
18014
|
+
0,
|
|
18015
|
+
0,
|
|
18016
|
+
0,
|
|
18017
|
+
0,
|
|
18018
|
+
0,
|
|
18019
|
+
0,
|
|
18020
|
+
0,
|
|
18021
|
+
0,
|
|
18022
|
+
0,
|
|
18023
|
+
0,
|
|
18024
|
+
0,
|
|
18025
|
+
0,
|
|
18026
|
+
0,
|
|
18027
|
+
0,
|
|
18028
|
+
0,
|
|
18029
|
+
0,
|
|
18030
|
+
0,
|
|
18031
|
+
0,
|
|
18032
|
+
0,
|
|
18033
|
+
0,
|
|
18034
|
+
0,
|
|
18035
|
+
0,
|
|
18036
|
+
0,
|
|
18037
|
+
0,
|
|
18038
|
+
0,
|
|
18039
|
+
0,
|
|
18040
|
+
0,
|
|
18041
|
+
0,
|
|
18042
|
+
0,
|
|
18043
|
+
0,
|
|
18044
|
+
0,
|
|
18045
|
+
0,
|
|
18046
|
+
0,
|
|
18047
|
+
0,
|
|
18048
|
+
0,
|
|
18049
|
+
1,
|
|
18050
|
+
1,
|
|
18051
|
+
1,
|
|
18052
|
+
1,
|
|
18053
|
+
1,
|
|
18054
|
+
1,
|
|
18055
|
+
1,
|
|
18056
|
+
1,
|
|
18057
|
+
1,
|
|
18058
|
+
1,
|
|
18059
|
+
0,
|
|
18060
|
+
0,
|
|
18061
|
+
0,
|
|
18062
|
+
0,
|
|
18063
|
+
0,
|
|
18064
|
+
0,
|
|
18065
|
+
0,
|
|
18066
|
+
1,
|
|
18067
|
+
1,
|
|
18068
|
+
1,
|
|
18069
|
+
1,
|
|
18070
|
+
1,
|
|
18071
|
+
1,
|
|
18072
|
+
0,
|
|
18073
|
+
0,
|
|
18074
|
+
0,
|
|
18075
|
+
0,
|
|
18076
|
+
0,
|
|
18077
|
+
0,
|
|
18078
|
+
0,
|
|
18079
|
+
0,
|
|
18080
|
+
0,
|
|
18081
|
+
0,
|
|
18082
|
+
0,
|
|
18083
|
+
0,
|
|
18084
|
+
0,
|
|
18085
|
+
0,
|
|
18086
|
+
0,
|
|
18087
|
+
0,
|
|
18088
|
+
0,
|
|
18089
|
+
0,
|
|
18090
|
+
0,
|
|
18091
|
+
0,
|
|
18092
|
+
0,
|
|
18093
|
+
0,
|
|
18094
|
+
0,
|
|
18095
|
+
0,
|
|
18096
|
+
0,
|
|
18097
|
+
0,
|
|
18098
|
+
1,
|
|
18099
|
+
1,
|
|
18100
|
+
1,
|
|
18101
|
+
1,
|
|
18102
|
+
1,
|
|
18103
|
+
1
|
|
18104
|
+
]);
|
|
18105
|
+
__name(isValidHex, "isValidHex");
|
|
18170
18106
|
__name(isValidTraceId, "isValidTraceId");
|
|
18171
18107
|
__name(isValidSpanId, "isValidSpanId");
|
|
18172
18108
|
__name(isSpanContextValid, "isSpanContextValid");
|
|
@@ -18174,42 +18110,39 @@ var init_spancontext_utils = __esm({
|
|
|
18174
18110
|
}
|
|
18175
18111
|
});
|
|
18176
18112
|
|
|
18177
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18113
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js
|
|
18178
18114
|
function isSpanContext(spanContext) {
|
|
18179
|
-
return typeof spanContext === "object" && typeof spanContext["spanId"] === "string" && typeof spanContext["traceId"] === "string" && typeof spanContext["traceFlags"] === "number";
|
|
18115
|
+
return spanContext !== null && typeof spanContext === "object" && "spanId" in spanContext && typeof spanContext["spanId"] === "string" && "traceId" in spanContext && typeof spanContext["traceId"] === "string" && "traceFlags" in spanContext && typeof spanContext["traceFlags"] === "number";
|
|
18180
18116
|
}
|
|
18181
18117
|
var contextApi, NoopTracer;
|
|
18182
18118
|
var init_NoopTracer = __esm({
|
|
18183
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18119
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js"() {
|
|
18184
18120
|
init_context2();
|
|
18185
18121
|
init_context_utils();
|
|
18186
18122
|
init_NonRecordingSpan();
|
|
18187
18123
|
init_spancontext_utils();
|
|
18188
18124
|
contextApi = ContextAPI.getInstance();
|
|
18189
|
-
NoopTracer =
|
|
18190
|
-
|
|
18191
|
-
|
|
18125
|
+
NoopTracer = class {
|
|
18126
|
+
static {
|
|
18127
|
+
__name(this, "NoopTracer");
|
|
18192
18128
|
}
|
|
18193
|
-
|
|
18194
|
-
|
|
18195
|
-
|
|
18196
|
-
context2 = contextApi.active();
|
|
18197
|
-
}
|
|
18198
|
-
var root = Boolean(options === null || options === void 0 ? void 0 : options.root);
|
|
18129
|
+
// startSpan starts a noop span.
|
|
18130
|
+
startSpan(name, options, context2 = contextApi.active()) {
|
|
18131
|
+
const root = Boolean(options === null || options === void 0 ? void 0 : options.root);
|
|
18199
18132
|
if (root) {
|
|
18200
18133
|
return new NonRecordingSpan();
|
|
18201
18134
|
}
|
|
18202
|
-
|
|
18135
|
+
const parentFromContext = context2 && getSpanContext(context2);
|
|
18203
18136
|
if (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext)) {
|
|
18204
18137
|
return new NonRecordingSpan(parentFromContext);
|
|
18205
18138
|
} else {
|
|
18206
18139
|
return new NonRecordingSpan();
|
|
18207
18140
|
}
|
|
18208
|
-
}
|
|
18209
|
-
|
|
18210
|
-
|
|
18211
|
-
|
|
18212
|
-
|
|
18141
|
+
}
|
|
18142
|
+
startActiveSpan(name, arg2, arg3, arg4) {
|
|
18143
|
+
let opts;
|
|
18144
|
+
let ctx;
|
|
18145
|
+
let fn;
|
|
18213
18146
|
if (arguments.length < 2) {
|
|
18214
18147
|
return;
|
|
18215
18148
|
} else if (arguments.length === 2) {
|
|
@@ -18222,109 +18155,114 @@ var init_NoopTracer = __esm({
|
|
|
18222
18155
|
ctx = arg3;
|
|
18223
18156
|
fn = arg4;
|
|
18224
18157
|
}
|
|
18225
|
-
|
|
18226
|
-
|
|
18227
|
-
|
|
18158
|
+
const parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
|
|
18159
|
+
const span = this.startSpan(name, opts, parentContext);
|
|
18160
|
+
const contextWithSpanSet = setSpan(parentContext, span);
|
|
18228
18161
|
return contextApi.with(contextWithSpanSet, fn, void 0, span);
|
|
18229
|
-
}
|
|
18230
|
-
|
|
18231
|
-
})();
|
|
18162
|
+
}
|
|
18163
|
+
};
|
|
18232
18164
|
__name(isSpanContext, "isSpanContext");
|
|
18233
18165
|
}
|
|
18234
18166
|
});
|
|
18235
18167
|
|
|
18236
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18168
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js
|
|
18237
18169
|
var NOOP_TRACER, ProxyTracer;
|
|
18238
18170
|
var init_ProxyTracer = __esm({
|
|
18239
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18171
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js"() {
|
|
18240
18172
|
init_NoopTracer();
|
|
18241
18173
|
NOOP_TRACER = new NoopTracer();
|
|
18242
|
-
ProxyTracer =
|
|
18243
|
-
|
|
18244
|
-
|
|
18245
|
-
|
|
18174
|
+
ProxyTracer = class {
|
|
18175
|
+
static {
|
|
18176
|
+
__name(this, "ProxyTracer");
|
|
18177
|
+
}
|
|
18178
|
+
constructor(provider, name, version5, options) {
|
|
18179
|
+
this._provider = provider;
|
|
18246
18180
|
this.name = name;
|
|
18247
18181
|
this.version = version5;
|
|
18248
18182
|
this.options = options;
|
|
18249
18183
|
}
|
|
18250
|
-
|
|
18251
|
-
ProxyTracer2.prototype.startSpan = function(name, options, context2) {
|
|
18184
|
+
startSpan(name, options, context2) {
|
|
18252
18185
|
return this._getTracer().startSpan(name, options, context2);
|
|
18253
|
-
}
|
|
18254
|
-
|
|
18255
|
-
|
|
18186
|
+
}
|
|
18187
|
+
startActiveSpan(_name, _options, _context, _fn) {
|
|
18188
|
+
const tracer = this._getTracer();
|
|
18256
18189
|
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
18257
|
-
}
|
|
18258
|
-
|
|
18190
|
+
}
|
|
18191
|
+
/**
|
|
18192
|
+
* Try to get a tracer from the proxy tracer provider.
|
|
18193
|
+
* If the proxy tracer provider has no delegate, return a noop tracer.
|
|
18194
|
+
*/
|
|
18195
|
+
_getTracer() {
|
|
18259
18196
|
if (this._delegate) {
|
|
18260
18197
|
return this._delegate;
|
|
18261
18198
|
}
|
|
18262
|
-
|
|
18199
|
+
const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
18263
18200
|
if (!tracer) {
|
|
18264
18201
|
return NOOP_TRACER;
|
|
18265
18202
|
}
|
|
18266
18203
|
this._delegate = tracer;
|
|
18267
18204
|
return this._delegate;
|
|
18268
|
-
}
|
|
18269
|
-
|
|
18270
|
-
})();
|
|
18205
|
+
}
|
|
18206
|
+
};
|
|
18271
18207
|
}
|
|
18272
18208
|
});
|
|
18273
18209
|
|
|
18274
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18210
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js
|
|
18275
18211
|
var NoopTracerProvider;
|
|
18276
18212
|
var init_NoopTracerProvider = __esm({
|
|
18277
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18213
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js"() {
|
|
18278
18214
|
init_NoopTracer();
|
|
18279
|
-
NoopTracerProvider =
|
|
18280
|
-
|
|
18281
|
-
|
|
18215
|
+
NoopTracerProvider = class {
|
|
18216
|
+
static {
|
|
18217
|
+
__name(this, "NoopTracerProvider");
|
|
18282
18218
|
}
|
|
18283
|
-
|
|
18284
|
-
NoopTracerProvider2.prototype.getTracer = function(_name, _version, _options) {
|
|
18219
|
+
getTracer(_name, _version, _options) {
|
|
18285
18220
|
return new NoopTracer();
|
|
18286
|
-
}
|
|
18287
|
-
|
|
18288
|
-
})();
|
|
18221
|
+
}
|
|
18222
|
+
};
|
|
18289
18223
|
}
|
|
18290
18224
|
});
|
|
18291
18225
|
|
|
18292
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18226
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js
|
|
18293
18227
|
var NOOP_TRACER_PROVIDER, ProxyTracerProvider;
|
|
18294
18228
|
var init_ProxyTracerProvider = __esm({
|
|
18295
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18229
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js"() {
|
|
18296
18230
|
init_ProxyTracer();
|
|
18297
18231
|
init_NoopTracerProvider();
|
|
18298
18232
|
NOOP_TRACER_PROVIDER = new NoopTracerProvider();
|
|
18299
|
-
ProxyTracerProvider =
|
|
18300
|
-
|
|
18301
|
-
|
|
18233
|
+
ProxyTracerProvider = class {
|
|
18234
|
+
static {
|
|
18235
|
+
__name(this, "ProxyTracerProvider");
|
|
18302
18236
|
}
|
|
18303
|
-
|
|
18304
|
-
|
|
18237
|
+
/**
|
|
18238
|
+
* Get a {@link ProxyTracer}
|
|
18239
|
+
*/
|
|
18240
|
+
getTracer(name, version5, options) {
|
|
18305
18241
|
var _a3;
|
|
18306
18242
|
return (_a3 = this.getDelegateTracer(name, version5, options)) !== null && _a3 !== void 0 ? _a3 : new ProxyTracer(this, name, version5, options);
|
|
18307
|
-
}
|
|
18308
|
-
|
|
18243
|
+
}
|
|
18244
|
+
getDelegate() {
|
|
18309
18245
|
var _a3;
|
|
18310
18246
|
return (_a3 = this._delegate) !== null && _a3 !== void 0 ? _a3 : NOOP_TRACER_PROVIDER;
|
|
18311
|
-
}
|
|
18312
|
-
|
|
18247
|
+
}
|
|
18248
|
+
/**
|
|
18249
|
+
* Set the delegate tracer provider
|
|
18250
|
+
*/
|
|
18251
|
+
setDelegate(delegate) {
|
|
18313
18252
|
this._delegate = delegate;
|
|
18314
|
-
}
|
|
18315
|
-
|
|
18253
|
+
}
|
|
18254
|
+
getDelegateTracer(name, version5, options) {
|
|
18316
18255
|
var _a3;
|
|
18317
18256
|
return (_a3 = this._delegate) === null || _a3 === void 0 ? void 0 : _a3.getTracer(name, version5, options);
|
|
18318
|
-
}
|
|
18319
|
-
|
|
18320
|
-
})();
|
|
18257
|
+
}
|
|
18258
|
+
};
|
|
18321
18259
|
}
|
|
18322
18260
|
});
|
|
18323
18261
|
|
|
18324
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18262
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js
|
|
18325
18263
|
var SamplingDecision;
|
|
18326
18264
|
var init_SamplingResult = __esm({
|
|
18327
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18265
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js"() {
|
|
18328
18266
|
(function(SamplingDecision2) {
|
|
18329
18267
|
SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
|
|
18330
18268
|
SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
|
|
@@ -18333,10 +18271,10 @@ var init_SamplingResult = __esm({
|
|
|
18333
18271
|
}
|
|
18334
18272
|
});
|
|
18335
18273
|
|
|
18336
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18274
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/span_kind.js
|
|
18337
18275
|
var SpanKind;
|
|
18338
18276
|
var init_span_kind = __esm({
|
|
18339
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18277
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/span_kind.js"() {
|
|
18340
18278
|
(function(SpanKind2) {
|
|
18341
18279
|
SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
|
|
18342
18280
|
SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
|
|
@@ -18347,10 +18285,10 @@ var init_span_kind = __esm({
|
|
|
18347
18285
|
}
|
|
18348
18286
|
});
|
|
18349
18287
|
|
|
18350
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18288
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/status.js
|
|
18351
18289
|
var SpanStatusCode;
|
|
18352
18290
|
var init_status = __esm({
|
|
18353
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18291
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/status.js"() {
|
|
18354
18292
|
(function(SpanStatusCode2) {
|
|
18355
18293
|
SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
|
|
18356
18294
|
SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
|
|
@@ -18359,7 +18297,7 @@ var init_status = __esm({
|
|
|
18359
18297
|
}
|
|
18360
18298
|
});
|
|
18361
18299
|
|
|
18362
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18300
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.js
|
|
18363
18301
|
function validateKey(key) {
|
|
18364
18302
|
return VALID_KEY_REGEX.test(key);
|
|
18365
18303
|
}
|
|
@@ -18368,11 +18306,11 @@ function validateValue(value) {
|
|
|
18368
18306
|
}
|
|
18369
18307
|
var VALID_KEY_CHAR_RANGE, VALID_KEY, VALID_VENDOR_KEY, VALID_KEY_REGEX, VALID_VALUE_BASE_REGEX, INVALID_VALUE_COMMA_EQUAL_REGEX;
|
|
18370
18308
|
var init_tracestate_validators = __esm({
|
|
18371
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18309
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.js"() {
|
|
18372
18310
|
VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
18373
|
-
VALID_KEY =
|
|
18374
|
-
VALID_VENDOR_KEY =
|
|
18375
|
-
VALID_KEY_REGEX = new RegExp(
|
|
18311
|
+
VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
|
|
18312
|
+
VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
|
|
18313
|
+
VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
|
|
18376
18314
|
VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
18377
18315
|
INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
18378
18316
|
__name(validateKey, "validateKey");
|
|
@@ -18380,55 +18318,55 @@ var init_tracestate_validators = __esm({
|
|
|
18380
18318
|
}
|
|
18381
18319
|
});
|
|
18382
18320
|
|
|
18383
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18321
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.js
|
|
18384
18322
|
var MAX_TRACE_STATE_ITEMS, MAX_TRACE_STATE_LEN, LIST_MEMBERS_SEPARATOR, LIST_MEMBER_KEY_VALUE_SPLITTER, TraceStateImpl;
|
|
18385
18323
|
var init_tracestate_impl = __esm({
|
|
18386
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18324
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.js"() {
|
|
18387
18325
|
init_tracestate_validators();
|
|
18388
18326
|
MAX_TRACE_STATE_ITEMS = 32;
|
|
18389
18327
|
MAX_TRACE_STATE_LEN = 512;
|
|
18390
18328
|
LIST_MEMBERS_SEPARATOR = ",";
|
|
18391
18329
|
LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
18392
|
-
TraceStateImpl =
|
|
18393
|
-
|
|
18394
|
-
|
|
18330
|
+
TraceStateImpl = class _TraceStateImpl {
|
|
18331
|
+
static {
|
|
18332
|
+
__name(this, "TraceStateImpl");
|
|
18333
|
+
}
|
|
18334
|
+
constructor(rawTraceState) {
|
|
18395
18335
|
this._internalState = /* @__PURE__ */ new Map();
|
|
18396
18336
|
if (rawTraceState)
|
|
18397
18337
|
this._parse(rawTraceState);
|
|
18398
18338
|
}
|
|
18399
|
-
|
|
18400
|
-
|
|
18401
|
-
var traceState = this._clone();
|
|
18339
|
+
set(key, value) {
|
|
18340
|
+
const traceState = this._clone();
|
|
18402
18341
|
if (traceState._internalState.has(key)) {
|
|
18403
18342
|
traceState._internalState.delete(key);
|
|
18404
18343
|
}
|
|
18405
18344
|
traceState._internalState.set(key, value);
|
|
18406
18345
|
return traceState;
|
|
18407
|
-
}
|
|
18408
|
-
|
|
18409
|
-
|
|
18346
|
+
}
|
|
18347
|
+
unset(key) {
|
|
18348
|
+
const traceState = this._clone();
|
|
18410
18349
|
traceState._internalState.delete(key);
|
|
18411
18350
|
return traceState;
|
|
18412
|
-
}
|
|
18413
|
-
|
|
18351
|
+
}
|
|
18352
|
+
get(key) {
|
|
18414
18353
|
return this._internalState.get(key);
|
|
18415
|
-
}
|
|
18416
|
-
|
|
18417
|
-
|
|
18418
|
-
|
|
18419
|
-
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key));
|
|
18354
|
+
}
|
|
18355
|
+
serialize() {
|
|
18356
|
+
return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
|
|
18357
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
|
|
18420
18358
|
return agg;
|
|
18421
18359
|
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
18422
|
-
}
|
|
18423
|
-
|
|
18360
|
+
}
|
|
18361
|
+
_parse(rawTraceState) {
|
|
18424
18362
|
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
18425
18363
|
return;
|
|
18426
|
-
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).
|
|
18427
|
-
|
|
18428
|
-
|
|
18364
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
|
|
18365
|
+
const listMember = part.trim();
|
|
18366
|
+
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
18429
18367
|
if (i !== -1) {
|
|
18430
|
-
|
|
18431
|
-
|
|
18368
|
+
const key = listMember.slice(0, i);
|
|
18369
|
+
const value = listMember.slice(i + 1, part.length);
|
|
18432
18370
|
if (validateKey(key) && validateValue(value)) {
|
|
18433
18371
|
agg.set(key, value);
|
|
18434
18372
|
} else {
|
|
@@ -18439,136 +18377,147 @@ var init_tracestate_impl = __esm({
|
|
|
18439
18377
|
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
18440
18378
|
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
18441
18379
|
}
|
|
18442
|
-
}
|
|
18443
|
-
|
|
18380
|
+
}
|
|
18381
|
+
// @ts-expect-error TS6133 Accessed in tests only.
|
|
18382
|
+
_keys() {
|
|
18444
18383
|
return Array.from(this._internalState.keys()).reverse();
|
|
18445
|
-
}
|
|
18446
|
-
|
|
18447
|
-
|
|
18384
|
+
}
|
|
18385
|
+
_clone() {
|
|
18386
|
+
const traceState = new _TraceStateImpl();
|
|
18448
18387
|
traceState._internalState = new Map(this._internalState);
|
|
18449
18388
|
return traceState;
|
|
18450
|
-
}
|
|
18451
|
-
|
|
18452
|
-
})();
|
|
18389
|
+
}
|
|
18390
|
+
};
|
|
18453
18391
|
}
|
|
18454
18392
|
});
|
|
18455
18393
|
|
|
18456
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18394
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/internal/utils.js
|
|
18457
18395
|
function createTraceState(rawTraceState) {
|
|
18458
18396
|
return new TraceStateImpl(rawTraceState);
|
|
18459
18397
|
}
|
|
18460
18398
|
var init_utils3 = __esm({
|
|
18461
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18399
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/internal/utils.js"() {
|
|
18462
18400
|
init_tracestate_impl();
|
|
18463
18401
|
__name(createTraceState, "createTraceState");
|
|
18464
18402
|
}
|
|
18465
18403
|
});
|
|
18466
18404
|
|
|
18467
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18405
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context-api.js
|
|
18468
18406
|
var context;
|
|
18469
18407
|
var init_context_api = __esm({
|
|
18470
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18408
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context-api.js"() {
|
|
18471
18409
|
init_context2();
|
|
18472
18410
|
context = ContextAPI.getInstance();
|
|
18473
18411
|
}
|
|
18474
18412
|
});
|
|
18475
18413
|
|
|
18476
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18414
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag-api.js
|
|
18477
18415
|
var diag2;
|
|
18478
18416
|
var init_diag_api = __esm({
|
|
18479
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18417
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag-api.js"() {
|
|
18480
18418
|
init_diag();
|
|
18481
18419
|
diag2 = DiagAPI.instance();
|
|
18482
18420
|
}
|
|
18483
18421
|
});
|
|
18484
18422
|
|
|
18485
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18423
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.js
|
|
18486
18424
|
var NoopMeterProvider, NOOP_METER_PROVIDER;
|
|
18487
18425
|
var init_NoopMeterProvider = __esm({
|
|
18488
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18426
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.js"() {
|
|
18489
18427
|
init_NoopMeter();
|
|
18490
|
-
NoopMeterProvider =
|
|
18491
|
-
|
|
18492
|
-
|
|
18428
|
+
NoopMeterProvider = class {
|
|
18429
|
+
static {
|
|
18430
|
+
__name(this, "NoopMeterProvider");
|
|
18493
18431
|
}
|
|
18494
|
-
|
|
18495
|
-
NoopMeterProvider2.prototype.getMeter = function(_name, _version, _options) {
|
|
18432
|
+
getMeter(_name, _version, _options) {
|
|
18496
18433
|
return NOOP_METER;
|
|
18497
|
-
}
|
|
18498
|
-
|
|
18499
|
-
})();
|
|
18434
|
+
}
|
|
18435
|
+
};
|
|
18500
18436
|
NOOP_METER_PROVIDER = new NoopMeterProvider();
|
|
18501
18437
|
}
|
|
18502
18438
|
});
|
|
18503
18439
|
|
|
18504
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18440
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/metrics.js
|
|
18505
18441
|
var API_NAME3, MetricsAPI;
|
|
18506
18442
|
var init_metrics = __esm({
|
|
18507
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18443
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/metrics.js"() {
|
|
18508
18444
|
init_NoopMeterProvider();
|
|
18509
18445
|
init_global_utils();
|
|
18510
18446
|
init_diag();
|
|
18511
18447
|
API_NAME3 = "metrics";
|
|
18512
|
-
MetricsAPI =
|
|
18513
|
-
|
|
18514
|
-
|
|
18448
|
+
MetricsAPI = class _MetricsAPI {
|
|
18449
|
+
static {
|
|
18450
|
+
__name(this, "MetricsAPI");
|
|
18515
18451
|
}
|
|
18516
|
-
|
|
18517
|
-
|
|
18452
|
+
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
18453
|
+
constructor() {
|
|
18454
|
+
}
|
|
18455
|
+
/** Get the singleton instance of the Metrics API */
|
|
18456
|
+
static getInstance() {
|
|
18518
18457
|
if (!this._instance) {
|
|
18519
|
-
this._instance = new
|
|
18458
|
+
this._instance = new _MetricsAPI();
|
|
18520
18459
|
}
|
|
18521
18460
|
return this._instance;
|
|
18522
|
-
}
|
|
18523
|
-
|
|
18461
|
+
}
|
|
18462
|
+
/**
|
|
18463
|
+
* Set the current global meter provider.
|
|
18464
|
+
* Returns true if the meter provider was successfully registered, else false.
|
|
18465
|
+
*/
|
|
18466
|
+
setGlobalMeterProvider(provider) {
|
|
18524
18467
|
return registerGlobal(API_NAME3, provider, DiagAPI.instance());
|
|
18525
|
-
}
|
|
18526
|
-
|
|
18468
|
+
}
|
|
18469
|
+
/**
|
|
18470
|
+
* Returns the global meter provider.
|
|
18471
|
+
*/
|
|
18472
|
+
getMeterProvider() {
|
|
18527
18473
|
return getGlobal(API_NAME3) || NOOP_METER_PROVIDER;
|
|
18528
|
-
}
|
|
18529
|
-
|
|
18474
|
+
}
|
|
18475
|
+
/**
|
|
18476
|
+
* Returns a meter from the global meter provider.
|
|
18477
|
+
*/
|
|
18478
|
+
getMeter(name, version5, options) {
|
|
18530
18479
|
return this.getMeterProvider().getMeter(name, version5, options);
|
|
18531
|
-
}
|
|
18532
|
-
|
|
18480
|
+
}
|
|
18481
|
+
/** Remove the global meter provider */
|
|
18482
|
+
disable() {
|
|
18533
18483
|
unregisterGlobal(API_NAME3, DiagAPI.instance());
|
|
18534
|
-
}
|
|
18535
|
-
|
|
18536
|
-
})();
|
|
18484
|
+
}
|
|
18485
|
+
};
|
|
18537
18486
|
}
|
|
18538
18487
|
});
|
|
18539
18488
|
|
|
18540
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18489
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics-api.js
|
|
18541
18490
|
var metrics;
|
|
18542
18491
|
var init_metrics_api = __esm({
|
|
18543
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18492
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics-api.js"() {
|
|
18544
18493
|
init_metrics();
|
|
18545
18494
|
metrics = MetricsAPI.getInstance();
|
|
18546
18495
|
}
|
|
18547
18496
|
});
|
|
18548
18497
|
|
|
18549
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18498
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js
|
|
18550
18499
|
var NoopTextMapPropagator;
|
|
18551
18500
|
var init_NoopTextMapPropagator = __esm({
|
|
18552
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18553
|
-
NoopTextMapPropagator =
|
|
18554
|
-
|
|
18555
|
-
|
|
18501
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js"() {
|
|
18502
|
+
NoopTextMapPropagator = class {
|
|
18503
|
+
static {
|
|
18504
|
+
__name(this, "NoopTextMapPropagator");
|
|
18556
18505
|
}
|
|
18557
|
-
|
|
18558
|
-
|
|
18559
|
-
}
|
|
18560
|
-
|
|
18506
|
+
/** Noop inject function does nothing */
|
|
18507
|
+
inject(_context, _carrier) {
|
|
18508
|
+
}
|
|
18509
|
+
/** Noop extract function does nothing and returns the input context */
|
|
18510
|
+
extract(context2, _carrier) {
|
|
18561
18511
|
return context2;
|
|
18562
|
-
}
|
|
18563
|
-
|
|
18512
|
+
}
|
|
18513
|
+
fields() {
|
|
18564
18514
|
return [];
|
|
18565
|
-
}
|
|
18566
|
-
|
|
18567
|
-
})();
|
|
18515
|
+
}
|
|
18516
|
+
};
|
|
18568
18517
|
}
|
|
18569
18518
|
});
|
|
18570
18519
|
|
|
18571
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18520
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js
|
|
18572
18521
|
function getBaggage(context2) {
|
|
18573
18522
|
return context2.getValue(BAGGAGE_KEY) || void 0;
|
|
18574
18523
|
}
|
|
@@ -18583,7 +18532,7 @@ function deleteBaggage(context2) {
|
|
|
18583
18532
|
}
|
|
18584
18533
|
var BAGGAGE_KEY;
|
|
18585
18534
|
var init_context_helpers = __esm({
|
|
18586
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18535
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js"() {
|
|
18587
18536
|
init_context2();
|
|
18588
18537
|
init_context();
|
|
18589
18538
|
BAGGAGE_KEY = createContextKey("OpenTelemetry Baggage Key");
|
|
@@ -18594,10 +18543,10 @@ var init_context_helpers = __esm({
|
|
|
18594
18543
|
}
|
|
18595
18544
|
});
|
|
18596
18545
|
|
|
18597
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18546
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/propagation.js
|
|
18598
18547
|
var API_NAME4, NOOP_TEXT_MAP_PROPAGATOR, PropagationAPI;
|
|
18599
18548
|
var init_propagation = __esm({
|
|
18600
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18549
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/propagation.js"() {
|
|
18601
18550
|
init_global_utils();
|
|
18602
18551
|
init_NoopTextMapPropagator();
|
|
18603
18552
|
init_TextMapPropagator();
|
|
@@ -18606,73 +18555,95 @@ var init_propagation = __esm({
|
|
|
18606
18555
|
init_diag();
|
|
18607
18556
|
API_NAME4 = "propagation";
|
|
18608
18557
|
NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator();
|
|
18609
|
-
PropagationAPI =
|
|
18610
|
-
|
|
18611
|
-
|
|
18558
|
+
PropagationAPI = class _PropagationAPI {
|
|
18559
|
+
static {
|
|
18560
|
+
__name(this, "PropagationAPI");
|
|
18561
|
+
}
|
|
18562
|
+
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
18563
|
+
constructor() {
|
|
18612
18564
|
this.createBaggage = createBaggage;
|
|
18613
18565
|
this.getBaggage = getBaggage;
|
|
18614
18566
|
this.getActiveBaggage = getActiveBaggage;
|
|
18615
18567
|
this.setBaggage = setBaggage;
|
|
18616
18568
|
this.deleteBaggage = deleteBaggage;
|
|
18617
18569
|
}
|
|
18618
|
-
|
|
18619
|
-
|
|
18570
|
+
/** Get the singleton instance of the Propagator API */
|
|
18571
|
+
static getInstance() {
|
|
18620
18572
|
if (!this._instance) {
|
|
18621
|
-
this._instance = new
|
|
18573
|
+
this._instance = new _PropagationAPI();
|
|
18622
18574
|
}
|
|
18623
18575
|
return this._instance;
|
|
18624
|
-
}
|
|
18625
|
-
|
|
18576
|
+
}
|
|
18577
|
+
/**
|
|
18578
|
+
* Set the current propagator.
|
|
18579
|
+
*
|
|
18580
|
+
* @returns true if the propagator was successfully registered, else false
|
|
18581
|
+
*/
|
|
18582
|
+
setGlobalPropagator(propagator) {
|
|
18626
18583
|
return registerGlobal(API_NAME4, propagator, DiagAPI.instance());
|
|
18627
|
-
}
|
|
18628
|
-
|
|
18629
|
-
|
|
18630
|
-
|
|
18631
|
-
|
|
18584
|
+
}
|
|
18585
|
+
/**
|
|
18586
|
+
* Inject context into a carrier to be propagated inter-process
|
|
18587
|
+
*
|
|
18588
|
+
* @param context Context carrying tracing data to inject
|
|
18589
|
+
* @param carrier carrier to inject context into
|
|
18590
|
+
* @param setter Function used to set values on the carrier
|
|
18591
|
+
*/
|
|
18592
|
+
inject(context2, carrier, setter = defaultTextMapSetter) {
|
|
18632
18593
|
return this._getGlobalPropagator().inject(context2, carrier, setter);
|
|
18633
|
-
}
|
|
18634
|
-
|
|
18635
|
-
|
|
18636
|
-
|
|
18637
|
-
|
|
18594
|
+
}
|
|
18595
|
+
/**
|
|
18596
|
+
* Extract context from a carrier
|
|
18597
|
+
*
|
|
18598
|
+
* @param context Context which the newly created context will inherit from
|
|
18599
|
+
* @param carrier Carrier to extract context from
|
|
18600
|
+
* @param getter Function used to extract keys from a carrier
|
|
18601
|
+
*/
|
|
18602
|
+
extract(context2, carrier, getter = defaultTextMapGetter) {
|
|
18638
18603
|
return this._getGlobalPropagator().extract(context2, carrier, getter);
|
|
18639
|
-
}
|
|
18640
|
-
|
|
18604
|
+
}
|
|
18605
|
+
/**
|
|
18606
|
+
* Return a list of all fields which may be used by the propagator.
|
|
18607
|
+
*/
|
|
18608
|
+
fields() {
|
|
18641
18609
|
return this._getGlobalPropagator().fields();
|
|
18642
|
-
}
|
|
18643
|
-
|
|
18610
|
+
}
|
|
18611
|
+
/** Remove the global propagator */
|
|
18612
|
+
disable() {
|
|
18644
18613
|
unregisterGlobal(API_NAME4, DiagAPI.instance());
|
|
18645
|
-
}
|
|
18646
|
-
|
|
18614
|
+
}
|
|
18615
|
+
_getGlobalPropagator() {
|
|
18647
18616
|
return getGlobal(API_NAME4) || NOOP_TEXT_MAP_PROPAGATOR;
|
|
18648
|
-
}
|
|
18649
|
-
|
|
18650
|
-
})();
|
|
18617
|
+
}
|
|
18618
|
+
};
|
|
18651
18619
|
}
|
|
18652
18620
|
});
|
|
18653
18621
|
|
|
18654
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18622
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/propagation-api.js
|
|
18655
18623
|
var propagation;
|
|
18656
18624
|
var init_propagation_api = __esm({
|
|
18657
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18625
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/propagation-api.js"() {
|
|
18658
18626
|
init_propagation();
|
|
18659
18627
|
propagation = PropagationAPI.getInstance();
|
|
18660
18628
|
}
|
|
18661
18629
|
});
|
|
18662
18630
|
|
|
18663
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18631
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/trace.js
|
|
18664
18632
|
var API_NAME5, TraceAPI;
|
|
18665
18633
|
var init_trace = __esm({
|
|
18666
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18634
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/trace.js"() {
|
|
18667
18635
|
init_global_utils();
|
|
18668
18636
|
init_ProxyTracerProvider();
|
|
18669
18637
|
init_spancontext_utils();
|
|
18670
18638
|
init_context_utils();
|
|
18671
18639
|
init_diag();
|
|
18672
18640
|
API_NAME5 = "trace";
|
|
18673
|
-
TraceAPI =
|
|
18674
|
-
|
|
18675
|
-
|
|
18641
|
+
TraceAPI = class _TraceAPI {
|
|
18642
|
+
static {
|
|
18643
|
+
__name(this, "TraceAPI");
|
|
18644
|
+
}
|
|
18645
|
+
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
18646
|
+
constructor() {
|
|
18676
18647
|
this._proxyTracerProvider = new ProxyTracerProvider();
|
|
18677
18648
|
this.wrapSpanContext = wrapSpanContext;
|
|
18678
18649
|
this.isSpanContextValid = isSpanContextValid;
|
|
@@ -18683,45 +18654,56 @@ var init_trace = __esm({
|
|
|
18683
18654
|
this.setSpan = setSpan;
|
|
18684
18655
|
this.setSpanContext = setSpanContext;
|
|
18685
18656
|
}
|
|
18686
|
-
|
|
18687
|
-
|
|
18657
|
+
/** Get the singleton instance of the Trace API */
|
|
18658
|
+
static getInstance() {
|
|
18688
18659
|
if (!this._instance) {
|
|
18689
|
-
this._instance = new
|
|
18660
|
+
this._instance = new _TraceAPI();
|
|
18690
18661
|
}
|
|
18691
18662
|
return this._instance;
|
|
18692
|
-
}
|
|
18693
|
-
|
|
18694
|
-
|
|
18663
|
+
}
|
|
18664
|
+
/**
|
|
18665
|
+
* Set the current global tracer.
|
|
18666
|
+
*
|
|
18667
|
+
* @returns true if the tracer provider was successfully registered, else false
|
|
18668
|
+
*/
|
|
18669
|
+
setGlobalTracerProvider(provider) {
|
|
18670
|
+
const success3 = registerGlobal(API_NAME5, this._proxyTracerProvider, DiagAPI.instance());
|
|
18695
18671
|
if (success3) {
|
|
18696
18672
|
this._proxyTracerProvider.setDelegate(provider);
|
|
18697
18673
|
}
|
|
18698
18674
|
return success3;
|
|
18699
|
-
}
|
|
18700
|
-
|
|
18675
|
+
}
|
|
18676
|
+
/**
|
|
18677
|
+
* Returns the global tracer provider.
|
|
18678
|
+
*/
|
|
18679
|
+
getTracerProvider() {
|
|
18701
18680
|
return getGlobal(API_NAME5) || this._proxyTracerProvider;
|
|
18702
|
-
}
|
|
18703
|
-
|
|
18681
|
+
}
|
|
18682
|
+
/**
|
|
18683
|
+
* Returns a tracer from the global tracer provider.
|
|
18684
|
+
*/
|
|
18685
|
+
getTracer(name, version5) {
|
|
18704
18686
|
return this.getTracerProvider().getTracer(name, version5);
|
|
18705
|
-
}
|
|
18706
|
-
|
|
18687
|
+
}
|
|
18688
|
+
/** Remove the global tracer provider */
|
|
18689
|
+
disable() {
|
|
18707
18690
|
unregisterGlobal(API_NAME5, DiagAPI.instance());
|
|
18708
18691
|
this._proxyTracerProvider = new ProxyTracerProvider();
|
|
18709
|
-
}
|
|
18710
|
-
|
|
18711
|
-
})();
|
|
18692
|
+
}
|
|
18693
|
+
};
|
|
18712
18694
|
}
|
|
18713
18695
|
});
|
|
18714
18696
|
|
|
18715
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18697
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace-api.js
|
|
18716
18698
|
var trace2;
|
|
18717
18699
|
var init_trace_api = __esm({
|
|
18718
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18700
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace-api.js"() {
|
|
18719
18701
|
init_trace();
|
|
18720
18702
|
trace2 = TraceAPI.getInstance();
|
|
18721
18703
|
}
|
|
18722
18704
|
});
|
|
18723
18705
|
|
|
18724
|
-
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18706
|
+
// ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/index.js
|
|
18725
18707
|
var esm_exports = {};
|
|
18726
18708
|
__export(esm_exports, {
|
|
18727
18709
|
DiagConsoleLogger: () => DiagConsoleLogger,
|
|
@@ -18755,7 +18737,7 @@ __export(esm_exports, {
|
|
|
18755
18737
|
});
|
|
18756
18738
|
var esm_default;
|
|
18757
18739
|
var init_esm = __esm({
|
|
18758
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
18740
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/index.js"() {
|
|
18759
18741
|
init_utils2();
|
|
18760
18742
|
init_context();
|
|
18761
18743
|
init_consoleLogger();
|
|
@@ -45278,6 +45260,29 @@ async function withTraceContext(traceCarrier, fn) {
|
|
|
45278
45260
|
}
|
|
45279
45261
|
return otel.context.with(extractedContext, async () => await fn());
|
|
45280
45262
|
}
|
|
45263
|
+
function logOtelDiagnosticOnce2(otel, tracer) {
|
|
45264
|
+
const debugEnabled = typeof process !== "undefined" && typeof process.env.DEBUG === "string" && (process.env.DEBUG.includes("workflow:") || process.env.DEBUG === "*");
|
|
45265
|
+
if (otelDiagLogged2 || !debugEnabled)
|
|
45266
|
+
return;
|
|
45267
|
+
otelDiagLogged2 = true;
|
|
45268
|
+
try {
|
|
45269
|
+
const g = globalThis[/* @__PURE__ */ Symbol.for("opentelemetry.js.api.1")];
|
|
45270
|
+
const provider = otel.trace.getTracerProvider();
|
|
45271
|
+
const delegate = provider.getDelegate?.() ?? provider;
|
|
45272
|
+
const probe = tracer.startSpan("workflow.otel.probe.core");
|
|
45273
|
+
console.warn("[workflow:otel-diag] core", JSON.stringify({
|
|
45274
|
+
globalRegistrationVersion: g?.version ?? null,
|
|
45275
|
+
providerCtor: provider?.constructor?.name ?? null,
|
|
45276
|
+
delegateCtor: delegate?.constructor?.name ?? null,
|
|
45277
|
+
tracerCtor: tracer?.constructor?.name ?? null,
|
|
45278
|
+
probeCtor: probe?.constructor?.name ?? null,
|
|
45279
|
+
probeRecording: probe.isRecording()
|
|
45280
|
+
}));
|
|
45281
|
+
probe.end();
|
|
45282
|
+
} catch (error95) {
|
|
45283
|
+
console.warn("[workflow:otel-diag] core failed:", error95 instanceof Error ? error95.message : error95);
|
|
45284
|
+
}
|
|
45285
|
+
}
|
|
45281
45286
|
async function trace4(spanName, ...args) {
|
|
45282
45287
|
const [tracer, otel] = await Promise.all([Tracer2.value, OtelApi2.value]);
|
|
45283
45288
|
const { fn, opts } = typeof args[0] === "function" ? { fn: args[0], opts: {} } : { fn: args[1], opts: args[0] };
|
|
@@ -45374,7 +45379,7 @@ async function withWorkflowBaggage(context2, fn) {
|
|
|
45374
45379
|
const contextWithBaggage = otel.propagation.setBaggage(otel.context.active(), baggage);
|
|
45375
45380
|
return otel.context.with(contextWithBaggage, () => fn());
|
|
45376
45381
|
}
|
|
45377
|
-
var warnedUnrecognizedTraceModes, OtelApi2, Tracer2;
|
|
45382
|
+
var warnedUnrecognizedTraceModes, OtelApi2, Tracer2, otelDiagLogged2;
|
|
45378
45383
|
var init_telemetry2 = __esm({
|
|
45379
45384
|
"../core/dist/telemetry.js"() {
|
|
45380
45385
|
"use strict";
|
|
@@ -45402,8 +45407,12 @@ var init_telemetry2 = __esm({
|
|
|
45402
45407
|
const api = await OtelApi2.value;
|
|
45403
45408
|
if (!api)
|
|
45404
45409
|
return null;
|
|
45405
|
-
|
|
45410
|
+
const tracer = api.trace.getTracer("workflow");
|
|
45411
|
+
logOtelDiagnosticOnce2(api, tracer);
|
|
45412
|
+
return tracer;
|
|
45406
45413
|
});
|
|
45414
|
+
otelDiagLogged2 = false;
|
|
45415
|
+
__name(logOtelDiagnosticOnce2, "logOtelDiagnosticOnce");
|
|
45407
45416
|
__name(trace4, "trace");
|
|
45408
45417
|
__name(recordElapsedSpan2, "recordElapsedSpan");
|
|
45409
45418
|
__name(applyWorkflowSuspensionToSpan2, "applyWorkflowSuspensionToSpan");
|
|
@@ -45576,7 +45585,7 @@ var version4;
|
|
|
45576
45585
|
var init_version3 = __esm({
|
|
45577
45586
|
"../core/dist/version.js"() {
|
|
45578
45587
|
"use strict";
|
|
45579
|
-
version4 = "5.0.0-beta.
|
|
45588
|
+
version4 = "5.0.0-beta.34";
|
|
45580
45589
|
}
|
|
45581
45590
|
});
|
|
45582
45591
|
|
|
@@ -51721,7 +51730,7 @@ function getByteUnframingStream2() {
|
|
|
51721
51730
|
}
|
|
51722
51731
|
});
|
|
51723
51732
|
}
|
|
51724
|
-
function recordReadTimeToFirstChunk2(startEpochMs, runId, name, startIndex) {
|
|
51733
|
+
function recordReadTimeToFirstChunk2(startEpochMs, runId, name, startIndex, connectMs) {
|
|
51725
51734
|
void (async () => {
|
|
51726
51735
|
await recordElapsedSpan2("workflow.stream.read", startEpochMs, {
|
|
51727
51736
|
kind: await getSpanKind3("CLIENT"),
|
|
@@ -51730,11 +51739,28 @@ function recordReadTimeToFirstChunk2(startEpochMs, runId, name, startIndex) {
|
|
|
51730
51739
|
"workflow.stream.name": name,
|
|
51731
51740
|
"workflow.stream.operation": "read",
|
|
51732
51741
|
"workflow.stream.read.ttfc_ms": Date.now() - startEpochMs,
|
|
51742
|
+
...typeof connectMs === "number" ? { "workflow.stream.read.connect_ms": connectMs } : {},
|
|
51733
51743
|
...typeof startIndex === "number" ? { "workflow.stream.start_index": startIndex } : {}
|
|
51734
51744
|
}
|
|
51735
51745
|
});
|
|
51736
51746
|
})();
|
|
51737
51747
|
}
|
|
51748
|
+
function recordStreamReadComplete2(startEpochMs, runId, name, chunkCount, byteCount, reconnects) {
|
|
51749
|
+
void (async () => {
|
|
51750
|
+
await recordElapsedSpan2("workflow.stream.read.complete", startEpochMs, {
|
|
51751
|
+
kind: await getSpanKind3("CLIENT"),
|
|
51752
|
+
attributes: {
|
|
51753
|
+
"workflow.run.id": runId,
|
|
51754
|
+
"workflow.stream.name": name,
|
|
51755
|
+
"workflow.stream.operation": "read_complete",
|
|
51756
|
+
"workflow.stream.read.total_ms": Date.now() - startEpochMs,
|
|
51757
|
+
"workflow.stream.read.chunks": chunkCount,
|
|
51758
|
+
"workflow.stream.read.bytes": byteCount,
|
|
51759
|
+
...typeof reconnects === "number" ? { "workflow.stream.read.reconnects": reconnects } : {}
|
|
51760
|
+
}
|
|
51761
|
+
});
|
|
51762
|
+
})();
|
|
51763
|
+
}
|
|
51738
51764
|
function createReconnectingFramedStream2(runId, name, startIndex) {
|
|
51739
51765
|
const reconnectSupported = startIndex === void 0 || startIndex >= 0;
|
|
51740
51766
|
let currentStartIndex = startIndex ?? 0;
|
|
@@ -51743,10 +51769,18 @@ function createReconnectingFramedStream2(runId, name, startIndex) {
|
|
|
51743
51769
|
let totalReconnectCount = 0;
|
|
51744
51770
|
let reader;
|
|
51745
51771
|
let buffer3 = new Uint8Array(0);
|
|
51772
|
+
let readStart;
|
|
51773
|
+
let connectMs;
|
|
51774
|
+
let firstChunkReported = false;
|
|
51775
|
+
let chunksDelivered = 0;
|
|
51776
|
+
let bytesDelivered = 0;
|
|
51746
51777
|
async function connect() {
|
|
51747
51778
|
const world = await getWorldLazy2();
|
|
51748
51779
|
const effectiveStartIndex = reconnectSupported ? currentStartIndex + consumedFrames : startIndex;
|
|
51780
|
+
const connectStart = Date.now();
|
|
51749
51781
|
const stream = await world.streams.get(runId, name, effectiveStartIndex);
|
|
51782
|
+
if (connectMs === void 0)
|
|
51783
|
+
connectMs = Date.now() - connectStart;
|
|
51750
51784
|
reader = stream.getReader();
|
|
51751
51785
|
}
|
|
51752
51786
|
__name(connect, "connect");
|
|
@@ -51780,6 +51814,8 @@ function createReconnectingFramedStream2(runId, name, startIndex) {
|
|
|
51780
51814
|
__name(reconnect, "reconnect");
|
|
51781
51815
|
return new ReadableStream({
|
|
51782
51816
|
pull: /* @__PURE__ */ __name(async (controller) => {
|
|
51817
|
+
if (readStart === void 0)
|
|
51818
|
+
readStart = Date.now();
|
|
51783
51819
|
for (; ; ) {
|
|
51784
51820
|
if (!reader) {
|
|
51785
51821
|
try {
|
|
@@ -51807,6 +51843,9 @@ function createReconnectingFramedStream2(runId, name, startIndex) {
|
|
|
51807
51843
|
}
|
|
51808
51844
|
if (result.done || !result.value) {
|
|
51809
51845
|
reader = void 0;
|
|
51846
|
+
if (readStart !== void 0) {
|
|
51847
|
+
recordStreamReadComplete2(readStart, runId, name, chunksDelivered, bytesDelivered, totalReconnectCount);
|
|
51848
|
+
}
|
|
51810
51849
|
controller.close();
|
|
51811
51850
|
return;
|
|
51812
51851
|
}
|
|
@@ -51826,6 +51865,12 @@ function createReconnectingFramedStream2(runId, name, startIndex) {
|
|
|
51826
51865
|
controller.enqueue(buffer3.slice(0, total));
|
|
51827
51866
|
buffer3 = buffer3.slice(total);
|
|
51828
51867
|
consumedFrames++;
|
|
51868
|
+
chunksDelivered++;
|
|
51869
|
+
bytesDelivered += total;
|
|
51870
|
+
if (!firstChunkReported && readStart !== void 0) {
|
|
51871
|
+
firstChunkReported = true;
|
|
51872
|
+
recordReadTimeToFirstChunk2(readStart, runId, name, startIndex, connectMs);
|
|
51873
|
+
}
|
|
51829
51874
|
emitted = true;
|
|
51830
51875
|
}
|
|
51831
51876
|
if (emitted) {
|
|
@@ -51844,7 +51889,7 @@ function createReconnectingFramedStream2(runId, name, startIndex) {
|
|
|
51844
51889
|
}, "cancel")
|
|
51845
51890
|
});
|
|
51846
51891
|
}
|
|
51847
|
-
function recordStreamWriteFlush2(startEpochMs, dispatchEpochMs, runId, name, chunkCount, byteCount) {
|
|
51892
|
+
function recordStreamWriteFlush2(startEpochMs, dispatchEpochMs, runId, name, chunkCount, byteCount, rpcMs) {
|
|
51848
51893
|
void (async () => {
|
|
51849
51894
|
await recordElapsedSpan2("workflow.stream.flush", startEpochMs, {
|
|
51850
51895
|
kind: await getSpanKind3("CLIENT"),
|
|
@@ -51854,7 +51899,24 @@ function recordStreamWriteFlush2(startEpochMs, dispatchEpochMs, runId, name, chu
|
|
|
51854
51899
|
"workflow.stream.operation": "flush",
|
|
51855
51900
|
"workflow.stream.flush.buffer_dwell_ms": dispatchEpochMs - startEpochMs,
|
|
51856
51901
|
"workflow.stream.flush.chunks": chunkCount,
|
|
51857
|
-
"workflow.stream.flush.bytes": byteCount
|
|
51902
|
+
"workflow.stream.flush.bytes": byteCount,
|
|
51903
|
+
// Client-observed World write RPC duration (network hop included).
|
|
51904
|
+
// Same key as world-vercel's per-request span attribute so queries
|
|
51905
|
+
// work regardless of which layer emitted it.
|
|
51906
|
+
"workflow.stream.write.chunk_rtt": rpcMs
|
|
51907
|
+
}
|
|
51908
|
+
});
|
|
51909
|
+
})();
|
|
51910
|
+
}
|
|
51911
|
+
function recordStreamClose2(startEpochMs, runId, name) {
|
|
51912
|
+
void (async () => {
|
|
51913
|
+
await recordElapsedSpan2("workflow.stream.close", startEpochMs, {
|
|
51914
|
+
kind: await getSpanKind3("CLIENT"),
|
|
51915
|
+
attributes: {
|
|
51916
|
+
"workflow.run.id": runId,
|
|
51917
|
+
"workflow.stream.name": name,
|
|
51918
|
+
"workflow.stream.operation": "close",
|
|
51919
|
+
"workflow.stream.close.rpc_ms": Date.now() - startEpochMs
|
|
51858
51920
|
}
|
|
51859
51921
|
});
|
|
51860
51922
|
})();
|
|
@@ -52941,6 +53003,7 @@ var init_serialization4 = __esm({
|
|
|
52941
53003
|
__name(getByteFramingStream2, "getByteFramingStream");
|
|
52942
53004
|
__name(getByteUnframingStream2, "getByteUnframingStream");
|
|
52943
53005
|
__name(recordReadTimeToFirstChunk2, "recordReadTimeToFirstChunk");
|
|
53006
|
+
__name(recordStreamReadComplete2, "recordStreamReadComplete");
|
|
52944
53007
|
WorkflowServerReadableStream2 = class extends ReadableStream {
|
|
52945
53008
|
static {
|
|
52946
53009
|
__name(this, "WorkflowServerReadableStream");
|
|
@@ -52952,6 +53015,9 @@ var init_serialization4 = __esm({
|
|
|
52952
53015
|
}
|
|
52953
53016
|
let readStart;
|
|
52954
53017
|
let firstChunkReported = false;
|
|
53018
|
+
let connectMs;
|
|
53019
|
+
let chunksDelivered = 0;
|
|
53020
|
+
let bytesDelivered = 0;
|
|
52955
53021
|
super({
|
|
52956
53022
|
// @ts-expect-error Not sure why TypeScript is complaining about this
|
|
52957
53023
|
type: "bytes",
|
|
@@ -52961,7 +53027,9 @@ var init_serialization4 = __esm({
|
|
|
52961
53027
|
if (readStart === void 0)
|
|
52962
53028
|
readStart = Date.now();
|
|
52963
53029
|
const world = await getWorldLazy2();
|
|
53030
|
+
const connectStart = Date.now();
|
|
52964
53031
|
const stream = await world.streams.get(runId, name, startIndex);
|
|
53032
|
+
connectMs = Date.now() - connectStart;
|
|
52965
53033
|
reader = this.#reader = stream.getReader();
|
|
52966
53034
|
}
|
|
52967
53035
|
if (!reader) {
|
|
@@ -52971,12 +53039,17 @@ var init_serialization4 = __esm({
|
|
|
52971
53039
|
const result = await reader.read();
|
|
52972
53040
|
if (result.done) {
|
|
52973
53041
|
this.#reader = void 0;
|
|
53042
|
+
if (readStart !== void 0) {
|
|
53043
|
+
recordStreamReadComplete2(readStart, runId, name, chunksDelivered, bytesDelivered);
|
|
53044
|
+
}
|
|
52974
53045
|
controller.close();
|
|
52975
53046
|
} else {
|
|
52976
53047
|
if (!firstChunkReported && result.value.byteLength > 0 && readStart !== void 0) {
|
|
52977
53048
|
firstChunkReported = true;
|
|
52978
|
-
recordReadTimeToFirstChunk2(readStart, runId, name, startIndex);
|
|
53049
|
+
recordReadTimeToFirstChunk2(readStart, runId, name, startIndex, connectMs);
|
|
52979
53050
|
}
|
|
53051
|
+
chunksDelivered += 1;
|
|
53052
|
+
bytesDelivered += result.value.byteLength;
|
|
52980
53053
|
controller.enqueue(result.value);
|
|
52981
53054
|
}
|
|
52982
53055
|
}, "pull"),
|
|
@@ -53003,6 +53076,7 @@ var init_serialization4 = __esm({
|
|
|
53003
53076
|
integer: true
|
|
53004
53077
|
}), "getStreamFlushIntervalMs");
|
|
53005
53078
|
__name(recordStreamWriteFlush2, "recordStreamWriteFlush");
|
|
53079
|
+
__name(recordStreamClose2, "recordStreamClose");
|
|
53006
53080
|
WorkflowServerWritableStream2 = class extends WritableStream {
|
|
53007
53081
|
static {
|
|
53008
53082
|
__name(this, "WorkflowServerWritableStream");
|
|
@@ -53055,6 +53129,7 @@ var init_serialization4 = __esm({
|
|
|
53055
53129
|
if (resolvedFlushIntervalMs === void 0) {
|
|
53056
53130
|
resolvedFlushIntervalMs = world.streamFlushIntervalMs ?? getStreamFlushIntervalMs2();
|
|
53057
53131
|
}
|
|
53132
|
+
const rpcStartAt = Date.now();
|
|
53058
53133
|
try {
|
|
53059
53134
|
if (typeof world.streams.writeMulti === "function" && chunksToFlush.length > 1) {
|
|
53060
53135
|
await world.streams.writeMulti(runId, name, chunksToFlush);
|
|
@@ -53070,7 +53145,7 @@ var init_serialization4 = __esm({
|
|
|
53070
53145
|
throw error95;
|
|
53071
53146
|
}
|
|
53072
53147
|
if (batchStart !== void 0) {
|
|
53073
|
-
recordStreamWriteFlush2(batchStart, dispatchAt, runId, name, chunksToFlush.length, chunksToFlush.reduce((sum, c) => sum + c.byteLength, 0));
|
|
53148
|
+
recordStreamWriteFlush2(batchStart, dispatchAt, runId, name, chunksToFlush.length, chunksToFlush.reduce((sum, c) => sum + c.byteLength, 0), Date.now() - rpcStartAt);
|
|
53074
53149
|
}
|
|
53075
53150
|
buffer3 = [];
|
|
53076
53151
|
}, "flush");
|
|
@@ -53113,7 +53188,9 @@ var init_serialization4 = __esm({
|
|
|
53113
53188
|
await flush();
|
|
53114
53189
|
await ensureRunReady();
|
|
53115
53190
|
const world = await worldPromise;
|
|
53191
|
+
const closeStart = Date.now();
|
|
53116
53192
|
await world.streams.close(runId, name);
|
|
53193
|
+
recordStreamClose2(closeStart, runId, name);
|
|
53117
53194
|
},
|
|
53118
53195
|
abort(reason) {
|
|
53119
53196
|
if (flushTimer) {
|
|
@@ -71723,6 +71800,8 @@ var init_waits = __esm2({
|
|
|
71723
71800
|
});
|
|
71724
71801
|
}
|
|
71725
71802
|
});
|
|
71803
|
+
var NAIVE_DATETIME;
|
|
71804
|
+
var UTCDateSchema;
|
|
71726
71805
|
var NullableDateSchema;
|
|
71727
71806
|
var NullableStringSchema;
|
|
71728
71807
|
var NullableBooleanSchema;
|
|
@@ -71731,6 +71810,7 @@ var AnalyticsStepSchema;
|
|
|
71731
71810
|
var AnalyticsEventSchema;
|
|
71732
71811
|
var AnalyticsHookSchema;
|
|
71733
71812
|
var AnalyticsWaitSchema;
|
|
71813
|
+
var AnalyticsAttributeKeySchema;
|
|
71734
71814
|
var init_analytics = __esm2({
|
|
71735
71815
|
"../world/dist/analytics.js"() {
|
|
71736
71816
|
"use strict";
|
|
@@ -71739,7 +71819,14 @@ var init_analytics = __esm2({
|
|
|
71739
71819
|
init_runs();
|
|
71740
71820
|
init_steps();
|
|
71741
71821
|
init_waits();
|
|
71742
|
-
|
|
71822
|
+
NAIVE_DATETIME = /^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}(?:\.\d+)?$/;
|
|
71823
|
+
UTCDateSchema = external_exports.preprocess((value) => {
|
|
71824
|
+
if (typeof value === "string" && NAIVE_DATETIME.test(value)) {
|
|
71825
|
+
return `${value.replace(" ", "T")}Z`;
|
|
71826
|
+
}
|
|
71827
|
+
return value;
|
|
71828
|
+
}, external_exports.coerce.date());
|
|
71829
|
+
NullableDateSchema = UTCDateSchema.nullable().optional();
|
|
71743
71830
|
NullableStringSchema = external_exports.string().nullable().optional();
|
|
71744
71831
|
NullableBooleanSchema = external_exports.boolean().nullable().optional();
|
|
71745
71832
|
AnalyticsRunSchema = external_exports.object({
|
|
@@ -71749,8 +71836,8 @@ var init_analytics = __esm2({
|
|
|
71749
71836
|
workflowName: external_exports.string(),
|
|
71750
71837
|
specVersion: external_exports.coerce.number().optional(),
|
|
71751
71838
|
attributes: external_exports.record(external_exports.string(), external_exports.string()).default({}),
|
|
71752
|
-
createdAt:
|
|
71753
|
-
updatedAt:
|
|
71839
|
+
createdAt: UTCDateSchema,
|
|
71840
|
+
updatedAt: UTCDateSchema,
|
|
71754
71841
|
startedAt: NullableDateSchema,
|
|
71755
71842
|
completedAt: NullableDateSchema,
|
|
71756
71843
|
errorCode: NullableStringSchema,
|
|
@@ -71763,8 +71850,8 @@ var init_analytics = __esm2({
|
|
|
71763
71850
|
stepName: NullableStringSchema,
|
|
71764
71851
|
status: StepStatusSchema,
|
|
71765
71852
|
attempt: external_exports.number().optional(),
|
|
71766
|
-
createdAt:
|
|
71767
|
-
updatedAt:
|
|
71853
|
+
createdAt: UTCDateSchema,
|
|
71854
|
+
updatedAt: UTCDateSchema,
|
|
71768
71855
|
startedAt: NullableDateSchema,
|
|
71769
71856
|
completedAt: NullableDateSchema,
|
|
71770
71857
|
retryAfter: NullableDateSchema,
|
|
@@ -71782,8 +71869,8 @@ var init_analytics = __esm2({
|
|
|
71782
71869
|
workflowName: external_exports.string(),
|
|
71783
71870
|
deploymentId: external_exports.string(),
|
|
71784
71871
|
specVersion: external_exports.coerce.number().optional(),
|
|
71785
|
-
runCreatedAt:
|
|
71786
|
-
createdAt:
|
|
71872
|
+
runCreatedAt: UTCDateSchema,
|
|
71873
|
+
createdAt: UTCDateSchema,
|
|
71787
71874
|
region: NullableStringSchema,
|
|
71788
71875
|
vercelId: NullableStringSchema,
|
|
71789
71876
|
requestId: NullableStringSchema,
|
|
@@ -71804,8 +71891,8 @@ var init_analytics = __esm2({
|
|
|
71804
71891
|
"disposed",
|
|
71805
71892
|
"conflict"
|
|
71806
71893
|
]),
|
|
71807
|
-
createdAt:
|
|
71808
|
-
updatedAt:
|
|
71894
|
+
createdAt: UTCDateSchema,
|
|
71895
|
+
updatedAt: UTCDateSchema,
|
|
71809
71896
|
receivedAt: NullableDateSchema,
|
|
71810
71897
|
disposedAt: NullableDateSchema,
|
|
71811
71898
|
isWebhook: NullableBooleanSchema,
|
|
@@ -71818,12 +71905,18 @@ var init_analytics = __esm2({
|
|
|
71818
71905
|
waitId: external_exports.string(),
|
|
71819
71906
|
status: WaitStatusSchema,
|
|
71820
71907
|
resumeAt: NullableDateSchema,
|
|
71821
|
-
createdAt:
|
|
71822
|
-
updatedAt:
|
|
71908
|
+
createdAt: UTCDateSchema,
|
|
71909
|
+
updatedAt: UTCDateSchema,
|
|
71823
71910
|
completedAt: NullableDateSchema,
|
|
71824
71911
|
workflowCoreVersion: NullableStringSchema,
|
|
71825
71912
|
workflowEncryptionEnabled: NullableBooleanSchema
|
|
71826
71913
|
});
|
|
71914
|
+
AnalyticsAttributeKeySchema = external_exports.object({
|
|
71915
|
+
key: external_exports.string(),
|
|
71916
|
+
runCount: external_exports.coerce.number(),
|
|
71917
|
+
firstSeenAt: external_exports.coerce.date(),
|
|
71918
|
+
lastSeenAt: external_exports.coerce.date()
|
|
71919
|
+
});
|
|
71827
71920
|
}
|
|
71828
71921
|
});
|
|
71829
71922
|
function warnOnce(key, message) {
|
|
@@ -74710,76 +74803,18 @@ var init_semantic_conventions = __esm2({
|
|
|
74710
74803
|
ErrorCategory = SemanticConvention("error.category");
|
|
74711
74804
|
}
|
|
74712
74805
|
});
|
|
74713
|
-
var require_globalThis = __commonJS2({
|
|
74714
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js"(exports) {
|
|
74715
|
-
"use strict";
|
|
74716
|
-
Object.defineProperty(exports, "__esModule", {
|
|
74717
|
-
value: true
|
|
74718
|
-
});
|
|
74719
|
-
exports._globalThis = void 0;
|
|
74720
|
-
exports._globalThis = typeof globalThis === "object" ? globalThis : global;
|
|
74721
|
-
}
|
|
74722
|
-
});
|
|
74723
|
-
var require_node = __commonJS2({
|
|
74724
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/platform/node/index.js"(exports) {
|
|
74725
|
-
"use strict";
|
|
74726
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
74727
|
-
if (k2 === void 0) k2 = k;
|
|
74728
|
-
Object.defineProperty(o, k2, {
|
|
74729
|
-
enumerable: true,
|
|
74730
|
-
get: /* @__PURE__ */ __name2(function() {
|
|
74731
|
-
return m[k];
|
|
74732
|
-
}, "get")
|
|
74733
|
-
});
|
|
74734
|
-
} : function(o, m, k, k2) {
|
|
74735
|
-
if (k2 === void 0) k2 = k;
|
|
74736
|
-
o[k2] = m[k];
|
|
74737
|
-
});
|
|
74738
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports1) {
|
|
74739
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports1, p)) __createBinding(exports1, m, p);
|
|
74740
|
-
};
|
|
74741
|
-
Object.defineProperty(exports, "__esModule", {
|
|
74742
|
-
value: true
|
|
74743
|
-
});
|
|
74744
|
-
__exportStar(require_globalThis(), exports);
|
|
74745
|
-
}
|
|
74746
|
-
});
|
|
74747
|
-
var require_platform = __commonJS2({
|
|
74748
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/src/platform/index.js"(exports) {
|
|
74749
|
-
"use strict";
|
|
74750
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
74751
|
-
if (k2 === void 0) k2 = k;
|
|
74752
|
-
Object.defineProperty(o, k2, {
|
|
74753
|
-
enumerable: true,
|
|
74754
|
-
get: /* @__PURE__ */ __name2(function() {
|
|
74755
|
-
return m[k];
|
|
74756
|
-
}, "get")
|
|
74757
|
-
});
|
|
74758
|
-
} : function(o, m, k, k2) {
|
|
74759
|
-
if (k2 === void 0) k2 = k;
|
|
74760
|
-
o[k2] = m[k];
|
|
74761
|
-
});
|
|
74762
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports1) {
|
|
74763
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports1, p)) __createBinding(exports1, m, p);
|
|
74764
|
-
};
|
|
74765
|
-
Object.defineProperty(exports, "__esModule", {
|
|
74766
|
-
value: true
|
|
74767
|
-
});
|
|
74768
|
-
__exportStar(require_node(), exports);
|
|
74769
|
-
}
|
|
74770
|
-
});
|
|
74771
74806
|
var require_version = __commonJS2({
|
|
74772
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
74807
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/version.js"(exports) {
|
|
74773
74808
|
"use strict";
|
|
74774
74809
|
Object.defineProperty(exports, "__esModule", {
|
|
74775
74810
|
value: true
|
|
74776
74811
|
});
|
|
74777
74812
|
exports.VERSION = void 0;
|
|
74778
|
-
exports.VERSION = "1.9.
|
|
74813
|
+
exports.VERSION = "1.9.1";
|
|
74779
74814
|
}
|
|
74780
74815
|
});
|
|
74781
74816
|
var require_semver = __commonJS2({
|
|
74782
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
74817
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/internal/semver.js"(exports) {
|
|
74783
74818
|
"use strict";
|
|
74784
74819
|
Object.defineProperty(exports, "__esModule", {
|
|
74785
74820
|
value: true
|
|
@@ -74861,18 +74896,17 @@ var require_semver = __commonJS2({
|
|
|
74861
74896
|
}
|
|
74862
74897
|
});
|
|
74863
74898
|
var require_global_utils = __commonJS2({
|
|
74864
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
74899
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/internal/global-utils.js"(exports) {
|
|
74865
74900
|
"use strict";
|
|
74866
74901
|
Object.defineProperty(exports, "__esModule", {
|
|
74867
74902
|
value: true
|
|
74868
74903
|
});
|
|
74869
74904
|
exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0;
|
|
74870
|
-
var platform_1 = require_platform();
|
|
74871
74905
|
var version_1 = require_version();
|
|
74872
74906
|
var semver_1 = require_semver();
|
|
74873
74907
|
var major2 = version_1.VERSION.split(".")[0];
|
|
74874
74908
|
var GLOBAL_OPENTELEMETRY_API_KEY2 = /* @__PURE__ */ Symbol.for(`opentelemetry.js.api.${major2}`);
|
|
74875
|
-
var _global2 =
|
|
74909
|
+
var _global2 = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
74876
74910
|
function registerGlobal2(type, instance, diag3, allowOverride = false) {
|
|
74877
74911
|
var _a22;
|
|
74878
74912
|
const api = _global2[GLOBAL_OPENTELEMETRY_API_KEY2] = (_a22 = _global2[GLOBAL_OPENTELEMETRY_API_KEY2]) !== null && _a22 !== void 0 ? _a22 : {
|
|
@@ -74919,7 +74953,7 @@ var require_global_utils = __commonJS2({
|
|
|
74919
74953
|
}
|
|
74920
74954
|
});
|
|
74921
74955
|
var require_ComponentLogger = __commonJS2({
|
|
74922
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
74956
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js"(exports) {
|
|
74923
74957
|
"use strict";
|
|
74924
74958
|
Object.defineProperty(exports, "__esModule", {
|
|
74925
74959
|
value: true
|
|
@@ -74958,15 +74992,14 @@ var require_ComponentLogger = __commonJS2({
|
|
|
74958
74992
|
if (!logger) {
|
|
74959
74993
|
return;
|
|
74960
74994
|
}
|
|
74961
|
-
|
|
74962
|
-
return logger[funcName](...args);
|
|
74995
|
+
return logger[funcName](namespace, ...args);
|
|
74963
74996
|
}
|
|
74964
74997
|
__name(logProxy2, "logProxy");
|
|
74965
74998
|
__name2(logProxy2, "logProxy");
|
|
74966
74999
|
}
|
|
74967
75000
|
});
|
|
74968
75001
|
var require_types = __commonJS2({
|
|
74969
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75002
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/diag/types.js"(exports) {
|
|
74970
75003
|
"use strict";
|
|
74971
75004
|
Object.defineProperty(exports, "__esModule", {
|
|
74972
75005
|
value: true
|
|
@@ -74985,7 +75018,7 @@ var require_types = __commonJS2({
|
|
|
74985
75018
|
}
|
|
74986
75019
|
});
|
|
74987
75020
|
var require_logLevelLogger = __commonJS2({
|
|
74988
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75021
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js"(exports) {
|
|
74989
75022
|
"use strict";
|
|
74990
75023
|
Object.defineProperty(exports, "__esModule", {
|
|
74991
75024
|
value: true
|
|
@@ -75023,7 +75056,7 @@ var require_logLevelLogger = __commonJS2({
|
|
|
75023
75056
|
}
|
|
75024
75057
|
});
|
|
75025
75058
|
var require_diag = __commonJS2({
|
|
75026
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75059
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/api/diag.js"(exports) {
|
|
75027
75060
|
"use strict";
|
|
75028
75061
|
Object.defineProperty(exports, "__esModule", {
|
|
75029
75062
|
value: true
|
|
@@ -75041,6 +75074,13 @@ var require_diag = __commonJS2({
|
|
|
75041
75074
|
static {
|
|
75042
75075
|
__name2(this, "DiagAPI");
|
|
75043
75076
|
}
|
|
75077
|
+
/** Get the singleton instance of the DiagAPI API */
|
|
75078
|
+
static instance() {
|
|
75079
|
+
if (!this._instance) {
|
|
75080
|
+
this._instance = new _DiagAPI();
|
|
75081
|
+
}
|
|
75082
|
+
return this._instance;
|
|
75083
|
+
}
|
|
75044
75084
|
/**
|
|
75045
75085
|
* Private internal constructor
|
|
75046
75086
|
* @private
|
|
@@ -75092,19 +75132,12 @@ var require_diag = __commonJS2({
|
|
|
75092
75132
|
self2.warn = _logProxy("warn");
|
|
75093
75133
|
self2.error = _logProxy("error");
|
|
75094
75134
|
}
|
|
75095
|
-
/** Get the singleton instance of the DiagAPI API */
|
|
75096
|
-
static instance() {
|
|
75097
|
-
if (!this._instance) {
|
|
75098
|
-
this._instance = new _DiagAPI();
|
|
75099
|
-
}
|
|
75100
|
-
return this._instance;
|
|
75101
|
-
}
|
|
75102
75135
|
};
|
|
75103
75136
|
exports.DiagAPI = DiagAPI2;
|
|
75104
75137
|
}
|
|
75105
75138
|
});
|
|
75106
75139
|
var require_baggage_impl = __commonJS2({
|
|
75107
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75140
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js"(exports) {
|
|
75108
75141
|
"use strict";
|
|
75109
75142
|
Object.defineProperty(exports, "__esModule", {
|
|
75110
75143
|
value: true
|
|
@@ -75128,10 +75161,7 @@ var require_baggage_impl = __commonJS2({
|
|
|
75128
75161
|
return Object.assign({}, entry);
|
|
75129
75162
|
}
|
|
75130
75163
|
getAllEntries() {
|
|
75131
|
-
return Array.from(this._entries.entries())
|
|
75132
|
-
k,
|
|
75133
|
-
v
|
|
75134
|
-
]);
|
|
75164
|
+
return Array.from(this._entries.entries());
|
|
75135
75165
|
}
|
|
75136
75166
|
setEntry(key, entry) {
|
|
75137
75167
|
const newBaggage = new _BaggageImpl(this._entries);
|
|
@@ -75158,7 +75188,7 @@ var require_baggage_impl = __commonJS2({
|
|
|
75158
75188
|
}
|
|
75159
75189
|
});
|
|
75160
75190
|
var require_symbol = __commonJS2({
|
|
75161
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75191
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js"(exports) {
|
|
75162
75192
|
"use strict";
|
|
75163
75193
|
Object.defineProperty(exports, "__esModule", {
|
|
75164
75194
|
value: true
|
|
@@ -75168,7 +75198,7 @@ var require_symbol = __commonJS2({
|
|
|
75168
75198
|
}
|
|
75169
75199
|
});
|
|
75170
75200
|
var require_utils = __commonJS2({
|
|
75171
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75201
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/baggage/utils.js"(exports) {
|
|
75172
75202
|
"use strict";
|
|
75173
75203
|
Object.defineProperty(exports, "__esModule", {
|
|
75174
75204
|
value: true
|
|
@@ -75202,7 +75232,7 @@ var require_utils = __commonJS2({
|
|
|
75202
75232
|
}
|
|
75203
75233
|
});
|
|
75204
75234
|
var require_context = __commonJS2({
|
|
75205
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75235
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/context/context.js"(exports) {
|
|
75206
75236
|
"use strict";
|
|
75207
75237
|
Object.defineProperty(exports, "__esModule", {
|
|
75208
75238
|
value: true
|
|
@@ -75246,12 +75276,12 @@ var require_context = __commonJS2({
|
|
|
75246
75276
|
}
|
|
75247
75277
|
});
|
|
75248
75278
|
var require_consoleLogger = __commonJS2({
|
|
75249
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75279
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js"(exports) {
|
|
75250
75280
|
"use strict";
|
|
75251
75281
|
Object.defineProperty(exports, "__esModule", {
|
|
75252
75282
|
value: true
|
|
75253
75283
|
});
|
|
75254
|
-
exports.DiagConsoleLogger = void 0;
|
|
75284
|
+
exports.DiagConsoleLogger = exports._originalConsoleMethods = void 0;
|
|
75255
75285
|
var consoleMap2 = [
|
|
75256
75286
|
{
|
|
75257
75287
|
n: "error",
|
|
@@ -75274,6 +75304,22 @@ var require_consoleLogger = __commonJS2({
|
|
|
75274
75304
|
c: "trace"
|
|
75275
75305
|
}
|
|
75276
75306
|
];
|
|
75307
|
+
exports._originalConsoleMethods = {};
|
|
75308
|
+
if (typeof console !== "undefined") {
|
|
75309
|
+
const keys = [
|
|
75310
|
+
"error",
|
|
75311
|
+
"warn",
|
|
75312
|
+
"info",
|
|
75313
|
+
"debug",
|
|
75314
|
+
"trace",
|
|
75315
|
+
"log"
|
|
75316
|
+
];
|
|
75317
|
+
for (const key of keys) {
|
|
75318
|
+
if (typeof console[key] === "function") {
|
|
75319
|
+
exports._originalConsoleMethods[key] = console[key];
|
|
75320
|
+
}
|
|
75321
|
+
}
|
|
75322
|
+
}
|
|
75277
75323
|
var DiagConsoleLogger2 = class {
|
|
75278
75324
|
static {
|
|
75279
75325
|
__name(this, "DiagConsoleLogger");
|
|
@@ -75284,14 +75330,18 @@ var require_consoleLogger = __commonJS2({
|
|
|
75284
75330
|
constructor() {
|
|
75285
75331
|
function _consoleFunc(funcName) {
|
|
75286
75332
|
return function(...args) {
|
|
75287
|
-
|
|
75288
|
-
|
|
75333
|
+
let theFunc = exports._originalConsoleMethods[funcName];
|
|
75334
|
+
if (typeof theFunc !== "function") {
|
|
75335
|
+
theFunc = exports._originalConsoleMethods["log"];
|
|
75336
|
+
}
|
|
75337
|
+
if (typeof theFunc !== "function" && console) {
|
|
75338
|
+
theFunc = console[funcName];
|
|
75289
75339
|
if (typeof theFunc !== "function") {
|
|
75290
75340
|
theFunc = console.log;
|
|
75291
75341
|
}
|
|
75292
|
-
|
|
75293
|
-
|
|
75294
|
-
|
|
75342
|
+
}
|
|
75343
|
+
if (typeof theFunc === "function") {
|
|
75344
|
+
return theFunc.apply(console, args);
|
|
75295
75345
|
}
|
|
75296
75346
|
};
|
|
75297
75347
|
}
|
|
@@ -75306,7 +75356,7 @@ var require_consoleLogger = __commonJS2({
|
|
|
75306
75356
|
}
|
|
75307
75357
|
});
|
|
75308
75358
|
var require_NoopMeter = __commonJS2({
|
|
75309
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75359
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js"(exports) {
|
|
75310
75360
|
"use strict";
|
|
75311
75361
|
Object.defineProperty(exports, "__esModule", {
|
|
75312
75362
|
value: true
|
|
@@ -75485,7 +75535,7 @@ var require_NoopMeter = __commonJS2({
|
|
|
75485
75535
|
}
|
|
75486
75536
|
});
|
|
75487
75537
|
var require_Metric = __commonJS2({
|
|
75488
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75538
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/metrics/Metric.js"(exports) {
|
|
75489
75539
|
"use strict";
|
|
75490
75540
|
Object.defineProperty(exports, "__esModule", {
|
|
75491
75541
|
value: true
|
|
@@ -75499,7 +75549,7 @@ var require_Metric = __commonJS2({
|
|
|
75499
75549
|
}
|
|
75500
75550
|
});
|
|
75501
75551
|
var require_TextMapPropagator = __commonJS2({
|
|
75502
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75552
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js"(exports) {
|
|
75503
75553
|
"use strict";
|
|
75504
75554
|
Object.defineProperty(exports, "__esModule", {
|
|
75505
75555
|
value: true
|
|
@@ -75530,7 +75580,7 @@ var require_TextMapPropagator = __commonJS2({
|
|
|
75530
75580
|
}
|
|
75531
75581
|
});
|
|
75532
75582
|
var require_NoopContextManager = __commonJS2({
|
|
75533
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75583
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js"(exports) {
|
|
75534
75584
|
"use strict";
|
|
75535
75585
|
Object.defineProperty(exports, "__esModule", {
|
|
75536
75586
|
value: true
|
|
@@ -75564,7 +75614,7 @@ var require_NoopContextManager = __commonJS2({
|
|
|
75564
75614
|
}
|
|
75565
75615
|
});
|
|
75566
75616
|
var require_context2 = __commonJS2({
|
|
75567
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75617
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/api/context.js"(exports) {
|
|
75568
75618
|
"use strict";
|
|
75569
75619
|
Object.defineProperty(exports, "__esModule", {
|
|
75570
75620
|
value: true
|
|
@@ -75639,7 +75689,7 @@ var require_context2 = __commonJS2({
|
|
|
75639
75689
|
}
|
|
75640
75690
|
});
|
|
75641
75691
|
var require_trace_flags = __commonJS2({
|
|
75642
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75692
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/trace_flags.js"(exports) {
|
|
75643
75693
|
"use strict";
|
|
75644
75694
|
Object.defineProperty(exports, "__esModule", {
|
|
75645
75695
|
value: true
|
|
@@ -75653,7 +75703,7 @@ var require_trace_flags = __commonJS2({
|
|
|
75653
75703
|
}
|
|
75654
75704
|
});
|
|
75655
75705
|
var require_invalid_span_constants = __commonJS2({
|
|
75656
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75706
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js"(exports) {
|
|
75657
75707
|
"use strict";
|
|
75658
75708
|
Object.defineProperty(exports, "__esModule", {
|
|
75659
75709
|
value: true
|
|
@@ -75670,7 +75720,7 @@ var require_invalid_span_constants = __commonJS2({
|
|
|
75670
75720
|
}
|
|
75671
75721
|
});
|
|
75672
75722
|
var require_NonRecordingSpan = __commonJS2({
|
|
75673
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75723
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js"(exports) {
|
|
75674
75724
|
"use strict";
|
|
75675
75725
|
Object.defineProperty(exports, "__esModule", {
|
|
75676
75726
|
value: true
|
|
@@ -75684,8 +75734,8 @@ var require_NonRecordingSpan = __commonJS2({
|
|
|
75684
75734
|
static {
|
|
75685
75735
|
__name2(this, "NonRecordingSpan");
|
|
75686
75736
|
}
|
|
75687
|
-
constructor(
|
|
75688
|
-
this._spanContext =
|
|
75737
|
+
constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
|
|
75738
|
+
this._spanContext = spanContext;
|
|
75689
75739
|
}
|
|
75690
75740
|
// Returns a SpanContext.
|
|
75691
75741
|
spanContext() {
|
|
@@ -75732,7 +75782,7 @@ var require_NonRecordingSpan = __commonJS2({
|
|
|
75732
75782
|
}
|
|
75733
75783
|
});
|
|
75734
75784
|
var require_context_utils = __commonJS2({
|
|
75735
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75785
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/context-utils.js"(exports) {
|
|
75736
75786
|
"use strict";
|
|
75737
75787
|
Object.defineProperty(exports, "__esModule", {
|
|
75738
75788
|
value: true
|
|
@@ -75782,7 +75832,7 @@ var require_context_utils = __commonJS2({
|
|
|
75782
75832
|
}
|
|
75783
75833
|
});
|
|
75784
75834
|
var require_spancontext_utils = __commonJS2({
|
|
75785
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75835
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js"(exports) {
|
|
75786
75836
|
"use strict";
|
|
75787
75837
|
Object.defineProperty(exports, "__esModule", {
|
|
75788
75838
|
value: true
|
|
@@ -75790,16 +75840,129 @@ var require_spancontext_utils = __commonJS2({
|
|
|
75790
75840
|
exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0;
|
|
75791
75841
|
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
75792
75842
|
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
75793
|
-
var
|
|
75794
|
-
|
|
75843
|
+
var isHex2 = new Uint8Array([
|
|
75844
|
+
0,
|
|
75845
|
+
0,
|
|
75846
|
+
0,
|
|
75847
|
+
0,
|
|
75848
|
+
0,
|
|
75849
|
+
0,
|
|
75850
|
+
0,
|
|
75851
|
+
0,
|
|
75852
|
+
0,
|
|
75853
|
+
0,
|
|
75854
|
+
0,
|
|
75855
|
+
0,
|
|
75856
|
+
0,
|
|
75857
|
+
0,
|
|
75858
|
+
0,
|
|
75859
|
+
0,
|
|
75860
|
+
0,
|
|
75861
|
+
0,
|
|
75862
|
+
0,
|
|
75863
|
+
0,
|
|
75864
|
+
0,
|
|
75865
|
+
0,
|
|
75866
|
+
0,
|
|
75867
|
+
0,
|
|
75868
|
+
0,
|
|
75869
|
+
0,
|
|
75870
|
+
0,
|
|
75871
|
+
0,
|
|
75872
|
+
0,
|
|
75873
|
+
0,
|
|
75874
|
+
0,
|
|
75875
|
+
0,
|
|
75876
|
+
0,
|
|
75877
|
+
0,
|
|
75878
|
+
0,
|
|
75879
|
+
0,
|
|
75880
|
+
0,
|
|
75881
|
+
0,
|
|
75882
|
+
0,
|
|
75883
|
+
0,
|
|
75884
|
+
0,
|
|
75885
|
+
0,
|
|
75886
|
+
0,
|
|
75887
|
+
0,
|
|
75888
|
+
0,
|
|
75889
|
+
0,
|
|
75890
|
+
0,
|
|
75891
|
+
0,
|
|
75892
|
+
1,
|
|
75893
|
+
1,
|
|
75894
|
+
1,
|
|
75895
|
+
1,
|
|
75896
|
+
1,
|
|
75897
|
+
1,
|
|
75898
|
+
1,
|
|
75899
|
+
1,
|
|
75900
|
+
1,
|
|
75901
|
+
1,
|
|
75902
|
+
0,
|
|
75903
|
+
0,
|
|
75904
|
+
0,
|
|
75905
|
+
0,
|
|
75906
|
+
0,
|
|
75907
|
+
0,
|
|
75908
|
+
0,
|
|
75909
|
+
1,
|
|
75910
|
+
1,
|
|
75911
|
+
1,
|
|
75912
|
+
1,
|
|
75913
|
+
1,
|
|
75914
|
+
1,
|
|
75915
|
+
0,
|
|
75916
|
+
0,
|
|
75917
|
+
0,
|
|
75918
|
+
0,
|
|
75919
|
+
0,
|
|
75920
|
+
0,
|
|
75921
|
+
0,
|
|
75922
|
+
0,
|
|
75923
|
+
0,
|
|
75924
|
+
0,
|
|
75925
|
+
0,
|
|
75926
|
+
0,
|
|
75927
|
+
0,
|
|
75928
|
+
0,
|
|
75929
|
+
0,
|
|
75930
|
+
0,
|
|
75931
|
+
0,
|
|
75932
|
+
0,
|
|
75933
|
+
0,
|
|
75934
|
+
0,
|
|
75935
|
+
0,
|
|
75936
|
+
0,
|
|
75937
|
+
0,
|
|
75938
|
+
0,
|
|
75939
|
+
0,
|
|
75940
|
+
0,
|
|
75941
|
+
1,
|
|
75942
|
+
1,
|
|
75943
|
+
1,
|
|
75944
|
+
1,
|
|
75945
|
+
1,
|
|
75946
|
+
1
|
|
75947
|
+
]);
|
|
75948
|
+
function isValidHex2(id, length) {
|
|
75949
|
+
if (typeof id !== "string" || id.length !== length) return false;
|
|
75950
|
+
let r = 0;
|
|
75951
|
+
for (let i = 0; i < id.length; i += 4) {
|
|
75952
|
+
r += (isHex2[id.charCodeAt(i)] | 0) + (isHex2[id.charCodeAt(i + 1)] | 0) + (isHex2[id.charCodeAt(i + 2)] | 0) + (isHex2[id.charCodeAt(i + 3)] | 0);
|
|
75953
|
+
}
|
|
75954
|
+
return r === length;
|
|
75955
|
+
}
|
|
75956
|
+
__name(isValidHex2, "isValidHex");
|
|
75957
|
+
__name2(isValidHex2, "isValidHex");
|
|
75795
75958
|
function isValidTraceId2(traceId) {
|
|
75796
|
-
return
|
|
75959
|
+
return isValidHex2(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
|
|
75797
75960
|
}
|
|
75798
75961
|
__name(isValidTraceId2, "isValidTraceId");
|
|
75799
75962
|
__name2(isValidTraceId2, "isValidTraceId");
|
|
75800
75963
|
exports.isValidTraceId = isValidTraceId2;
|
|
75801
75964
|
function isValidSpanId2(spanId) {
|
|
75802
|
-
return
|
|
75965
|
+
return isValidHex2(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
|
|
75803
75966
|
}
|
|
75804
75967
|
__name(isValidSpanId2, "isValidSpanId");
|
|
75805
75968
|
__name2(isValidSpanId2, "isValidSpanId");
|
|
@@ -75819,7 +75982,7 @@ var require_spancontext_utils = __commonJS2({
|
|
|
75819
75982
|
}
|
|
75820
75983
|
});
|
|
75821
75984
|
var require_NoopTracer = __commonJS2({
|
|
75822
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
75985
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js"(exports) {
|
|
75823
75986
|
"use strict";
|
|
75824
75987
|
Object.defineProperty(exports, "__esModule", {
|
|
75825
75988
|
value: true
|
|
@@ -75874,14 +76037,14 @@ var require_NoopTracer = __commonJS2({
|
|
|
75874
76037
|
};
|
|
75875
76038
|
exports.NoopTracer = NoopTracer2;
|
|
75876
76039
|
function isSpanContext2(spanContext) {
|
|
75877
|
-
return typeof spanContext === "object" && typeof spanContext["spanId"] === "string" && typeof spanContext["traceId"] === "string" && typeof spanContext["traceFlags"] === "number";
|
|
76040
|
+
return spanContext !== null && typeof spanContext === "object" && "spanId" in spanContext && typeof spanContext["spanId"] === "string" && "traceId" in spanContext && typeof spanContext["traceId"] === "string" && "traceFlags" in spanContext && typeof spanContext["traceFlags"] === "number";
|
|
75878
76041
|
}
|
|
75879
76042
|
__name(isSpanContext2, "isSpanContext");
|
|
75880
76043
|
__name2(isSpanContext2, "isSpanContext");
|
|
75881
76044
|
}
|
|
75882
76045
|
});
|
|
75883
76046
|
var require_ProxyTracer = __commonJS2({
|
|
75884
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76047
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js"(exports) {
|
|
75885
76048
|
"use strict";
|
|
75886
76049
|
Object.defineProperty(exports, "__esModule", {
|
|
75887
76050
|
value: true
|
|
@@ -75896,8 +76059,8 @@ var require_ProxyTracer = __commonJS2({
|
|
|
75896
76059
|
static {
|
|
75897
76060
|
__name2(this, "ProxyTracer");
|
|
75898
76061
|
}
|
|
75899
|
-
constructor(
|
|
75900
|
-
this._provider =
|
|
76062
|
+
constructor(provider, name, version32, options) {
|
|
76063
|
+
this._provider = provider;
|
|
75901
76064
|
this.name = name;
|
|
75902
76065
|
this.version = version32;
|
|
75903
76066
|
this.options = options;
|
|
@@ -75929,7 +76092,7 @@ var require_ProxyTracer = __commonJS2({
|
|
|
75929
76092
|
}
|
|
75930
76093
|
});
|
|
75931
76094
|
var require_NoopTracerProvider = __commonJS2({
|
|
75932
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76095
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js"(exports) {
|
|
75933
76096
|
"use strict";
|
|
75934
76097
|
Object.defineProperty(exports, "__esModule", {
|
|
75935
76098
|
value: true
|
|
@@ -75951,7 +76114,7 @@ var require_NoopTracerProvider = __commonJS2({
|
|
|
75951
76114
|
}
|
|
75952
76115
|
});
|
|
75953
76116
|
var require_ProxyTracerProvider = __commonJS2({
|
|
75954
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76117
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js"(exports) {
|
|
75955
76118
|
"use strict";
|
|
75956
76119
|
Object.defineProperty(exports, "__esModule", {
|
|
75957
76120
|
value: true
|
|
@@ -75993,7 +76156,7 @@ var require_ProxyTracerProvider = __commonJS2({
|
|
|
75993
76156
|
}
|
|
75994
76157
|
});
|
|
75995
76158
|
var require_SamplingResult = __commonJS2({
|
|
75996
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76159
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js"(exports) {
|
|
75997
76160
|
"use strict";
|
|
75998
76161
|
Object.defineProperty(exports, "__esModule", {
|
|
75999
76162
|
value: true
|
|
@@ -76008,7 +76171,7 @@ var require_SamplingResult = __commonJS2({
|
|
|
76008
76171
|
}
|
|
76009
76172
|
});
|
|
76010
76173
|
var require_span_kind = __commonJS2({
|
|
76011
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76174
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/span_kind.js"(exports) {
|
|
76012
76175
|
"use strict";
|
|
76013
76176
|
Object.defineProperty(exports, "__esModule", {
|
|
76014
76177
|
value: true
|
|
@@ -76025,7 +76188,7 @@ var require_span_kind = __commonJS2({
|
|
|
76025
76188
|
}
|
|
76026
76189
|
});
|
|
76027
76190
|
var require_status = __commonJS2({
|
|
76028
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76191
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/status.js"(exports) {
|
|
76029
76192
|
"use strict";
|
|
76030
76193
|
Object.defineProperty(exports, "__esModule", {
|
|
76031
76194
|
value: true
|
|
@@ -76040,7 +76203,7 @@ var require_status = __commonJS2({
|
|
|
76040
76203
|
}
|
|
76041
76204
|
});
|
|
76042
76205
|
var require_tracestate_validators = __commonJS2({
|
|
76043
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76206
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js"(exports) {
|
|
76044
76207
|
"use strict";
|
|
76045
76208
|
Object.defineProperty(exports, "__esModule", {
|
|
76046
76209
|
value: true
|
|
@@ -76067,7 +76230,7 @@ var require_tracestate_validators = __commonJS2({
|
|
|
76067
76230
|
}
|
|
76068
76231
|
});
|
|
76069
76232
|
var require_tracestate_impl = __commonJS2({
|
|
76070
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76233
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js"(exports) {
|
|
76071
76234
|
"use strict";
|
|
76072
76235
|
Object.defineProperty(exports, "__esModule", {
|
|
76073
76236
|
value: true
|
|
@@ -76106,14 +76269,14 @@ var require_tracestate_impl = __commonJS2({
|
|
|
76106
76269
|
return this._internalState.get(key);
|
|
76107
76270
|
}
|
|
76108
76271
|
serialize() {
|
|
76109
|
-
return this.
|
|
76272
|
+
return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
|
|
76110
76273
|
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER2 + this.get(key));
|
|
76111
76274
|
return agg;
|
|
76112
76275
|
}, []).join(LIST_MEMBERS_SEPARATOR2);
|
|
76113
76276
|
}
|
|
76114
76277
|
_parse(rawTraceState) {
|
|
76115
76278
|
if (rawTraceState.length > MAX_TRACE_STATE_LEN2) return;
|
|
76116
|
-
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR2).
|
|
76279
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR2).reduceRight((agg, part) => {
|
|
76117
76280
|
const listMember = part.trim();
|
|
76118
76281
|
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER2);
|
|
76119
76282
|
if (i !== -1) {
|
|
@@ -76130,6 +76293,7 @@ var require_tracestate_impl = __commonJS2({
|
|
|
76130
76293
|
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS2));
|
|
76131
76294
|
}
|
|
76132
76295
|
}
|
|
76296
|
+
// @ts-expect-error TS6133 Accessed in tests only.
|
|
76133
76297
|
_keys() {
|
|
76134
76298
|
return Array.from(this._internalState.keys()).reverse();
|
|
76135
76299
|
}
|
|
@@ -76143,7 +76307,7 @@ var require_tracestate_impl = __commonJS2({
|
|
|
76143
76307
|
}
|
|
76144
76308
|
});
|
|
76145
76309
|
var require_utils2 = __commonJS2({
|
|
76146
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76310
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace/internal/utils.js"(exports) {
|
|
76147
76311
|
"use strict";
|
|
76148
76312
|
Object.defineProperty(exports, "__esModule", {
|
|
76149
76313
|
value: true
|
|
@@ -76159,7 +76323,7 @@ var require_utils2 = __commonJS2({
|
|
|
76159
76323
|
}
|
|
76160
76324
|
});
|
|
76161
76325
|
var require_context_api = __commonJS2({
|
|
76162
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76326
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/context-api.js"(exports) {
|
|
76163
76327
|
"use strict";
|
|
76164
76328
|
Object.defineProperty(exports, "__esModule", {
|
|
76165
76329
|
value: true
|
|
@@ -76170,7 +76334,7 @@ var require_context_api = __commonJS2({
|
|
|
76170
76334
|
}
|
|
76171
76335
|
});
|
|
76172
76336
|
var require_diag_api = __commonJS2({
|
|
76173
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76337
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/diag-api.js"(exports) {
|
|
76174
76338
|
"use strict";
|
|
76175
76339
|
Object.defineProperty(exports, "__esModule", {
|
|
76176
76340
|
value: true
|
|
@@ -76181,7 +76345,7 @@ var require_diag_api = __commonJS2({
|
|
|
76181
76345
|
}
|
|
76182
76346
|
});
|
|
76183
76347
|
var require_NoopMeterProvider = __commonJS2({
|
|
76184
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76348
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js"(exports) {
|
|
76185
76349
|
"use strict";
|
|
76186
76350
|
Object.defineProperty(exports, "__esModule", {
|
|
76187
76351
|
value: true
|
|
@@ -76204,7 +76368,7 @@ var require_NoopMeterProvider = __commonJS2({
|
|
|
76204
76368
|
}
|
|
76205
76369
|
});
|
|
76206
76370
|
var require_metrics = __commonJS2({
|
|
76207
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76371
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/api/metrics.js"(exports) {
|
|
76208
76372
|
"use strict";
|
|
76209
76373
|
Object.defineProperty(exports, "__esModule", {
|
|
76210
76374
|
value: true
|
|
@@ -76259,7 +76423,7 @@ var require_metrics = __commonJS2({
|
|
|
76259
76423
|
}
|
|
76260
76424
|
});
|
|
76261
76425
|
var require_metrics_api = __commonJS2({
|
|
76262
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76426
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/metrics-api.js"(exports) {
|
|
76263
76427
|
"use strict";
|
|
76264
76428
|
Object.defineProperty(exports, "__esModule", {
|
|
76265
76429
|
value: true
|
|
@@ -76270,7 +76434,7 @@ var require_metrics_api = __commonJS2({
|
|
|
76270
76434
|
}
|
|
76271
76435
|
});
|
|
76272
76436
|
var require_NoopTextMapPropagator = __commonJS2({
|
|
76273
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76437
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js"(exports) {
|
|
76274
76438
|
"use strict";
|
|
76275
76439
|
Object.defineProperty(exports, "__esModule", {
|
|
76276
76440
|
value: true
|
|
@@ -76298,7 +76462,7 @@ var require_NoopTextMapPropagator = __commonJS2({
|
|
|
76298
76462
|
}
|
|
76299
76463
|
});
|
|
76300
76464
|
var require_context_helpers = __commonJS2({
|
|
76301
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76465
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js"(exports) {
|
|
76302
76466
|
"use strict";
|
|
76303
76467
|
Object.defineProperty(exports, "__esModule", {
|
|
76304
76468
|
value: true
|
|
@@ -76334,7 +76498,7 @@ var require_context_helpers = __commonJS2({
|
|
|
76334
76498
|
}
|
|
76335
76499
|
});
|
|
76336
76500
|
var require_propagation = __commonJS2({
|
|
76337
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76501
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/api/propagation.js"(exports) {
|
|
76338
76502
|
"use strict";
|
|
76339
76503
|
Object.defineProperty(exports, "__esModule", {
|
|
76340
76504
|
value: true
|
|
@@ -76416,7 +76580,7 @@ var require_propagation = __commonJS2({
|
|
|
76416
76580
|
}
|
|
76417
76581
|
});
|
|
76418
76582
|
var require_propagation_api = __commonJS2({
|
|
76419
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76583
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/propagation-api.js"(exports) {
|
|
76420
76584
|
"use strict";
|
|
76421
76585
|
Object.defineProperty(exports, "__esModule", {
|
|
76422
76586
|
value: true
|
|
@@ -76427,7 +76591,7 @@ var require_propagation_api = __commonJS2({
|
|
|
76427
76591
|
}
|
|
76428
76592
|
});
|
|
76429
76593
|
var require_trace = __commonJS2({
|
|
76430
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76594
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/api/trace.js"(exports) {
|
|
76431
76595
|
"use strict";
|
|
76432
76596
|
Object.defineProperty(exports, "__esModule", {
|
|
76433
76597
|
value: true
|
|
@@ -76499,7 +76663,7 @@ var require_trace = __commonJS2({
|
|
|
76499
76663
|
}
|
|
76500
76664
|
});
|
|
76501
76665
|
var require_trace_api = __commonJS2({
|
|
76502
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76666
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/trace-api.js"(exports) {
|
|
76503
76667
|
"use strict";
|
|
76504
76668
|
Object.defineProperty(exports, "__esModule", {
|
|
76505
76669
|
value: true
|
|
@@ -76510,7 +76674,7 @@ var require_trace_api = __commonJS2({
|
|
|
76510
76674
|
}
|
|
76511
76675
|
});
|
|
76512
76676
|
var require_src = __commonJS2({
|
|
76513
|
-
"../../node_modules/.pnpm/@opentelemetry+api@1.9.
|
|
76677
|
+
"../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/src/index.js"(exports) {
|
|
76514
76678
|
"use strict";
|
|
76515
76679
|
Object.defineProperty(exports, "__esModule", {
|
|
76516
76680
|
value: true
|
|
@@ -76722,6 +76886,29 @@ async function deserializeTraceCarrier(traceCarrier) {
|
|
|
76722
76886
|
return otel.propagation.extract(otel.context.active(), traceCarrier);
|
|
76723
76887
|
}
|
|
76724
76888
|
__name(deserializeTraceCarrier, "deserializeTraceCarrier");
|
|
76889
|
+
function logOtelDiagnosticOnce(otel, tracer) {
|
|
76890
|
+
const debugEnabled = typeof process !== "undefined" && typeof process.env.DEBUG === "string" && (process.env.DEBUG.includes("workflow:") || process.env.DEBUG === "*");
|
|
76891
|
+
if (otelDiagLogged || !debugEnabled) return;
|
|
76892
|
+
otelDiagLogged = true;
|
|
76893
|
+
try {
|
|
76894
|
+
const g = globalThis[/* @__PURE__ */ Symbol.for("opentelemetry.js.api.1")];
|
|
76895
|
+
const provider = otel.trace.getTracerProvider();
|
|
76896
|
+
const delegate = provider.getDelegate?.() ?? provider;
|
|
76897
|
+
const probe = tracer.startSpan("workflow.otel.probe.core");
|
|
76898
|
+
console.warn("[workflow:otel-diag] core", JSON.stringify({
|
|
76899
|
+
globalRegistrationVersion: g?.version ?? null,
|
|
76900
|
+
providerCtor: provider?.constructor?.name ?? null,
|
|
76901
|
+
delegateCtor: delegate?.constructor?.name ?? null,
|
|
76902
|
+
tracerCtor: tracer?.constructor?.name ?? null,
|
|
76903
|
+
probeCtor: probe?.constructor?.name ?? null,
|
|
76904
|
+
probeRecording: probe.isRecording()
|
|
76905
|
+
}));
|
|
76906
|
+
probe.end();
|
|
76907
|
+
} catch (error482) {
|
|
76908
|
+
console.warn("[workflow:otel-diag] core failed:", error482 instanceof Error ? error482.message : error482);
|
|
76909
|
+
}
|
|
76910
|
+
}
|
|
76911
|
+
__name(logOtelDiagnosticOnce, "logOtelDiagnosticOnce");
|
|
76725
76912
|
async function trace(spanName, ...args) {
|
|
76726
76913
|
const [tracer, otel] = await Promise.all([
|
|
76727
76914
|
Tracer.value,
|
|
@@ -76820,6 +77007,7 @@ async function linkToTraceCarrier(carrier) {
|
|
|
76820
77007
|
__name(linkToTraceCarrier, "linkToTraceCarrier");
|
|
76821
77008
|
var OtelApi;
|
|
76822
77009
|
var Tracer;
|
|
77010
|
+
var otelDiagLogged;
|
|
76823
77011
|
var init_telemetry = __esm2({
|
|
76824
77012
|
"../core/dist/telemetry.js"() {
|
|
76825
77013
|
"use strict";
|
|
@@ -76840,8 +77028,12 @@ var init_telemetry = __esm2({
|
|
|
76840
77028
|
Tracer = once(async () => {
|
|
76841
77029
|
const api = await OtelApi.value;
|
|
76842
77030
|
if (!api) return null;
|
|
76843
|
-
|
|
77031
|
+
const tracer = api.trace.getTracer("workflow");
|
|
77032
|
+
logOtelDiagnosticOnce(api, tracer);
|
|
77033
|
+
return tracer;
|
|
76844
77034
|
});
|
|
77035
|
+
otelDiagLogged = false;
|
|
77036
|
+
__name2(logOtelDiagnosticOnce, "logOtelDiagnosticOnce");
|
|
76845
77037
|
__name2(trace, "trace");
|
|
76846
77038
|
__name2(recordElapsedSpan, "recordElapsedSpan");
|
|
76847
77039
|
__name2(applyWorkflowSuspensionToSpan, "applyWorkflowSuspensionToSpan");
|
|
@@ -79155,7 +79347,7 @@ var version2;
|
|
|
79155
79347
|
var init_version = __esm2({
|
|
79156
79348
|
"../core/dist/version.js"() {
|
|
79157
79349
|
"use strict";
|
|
79158
|
-
version2 = "5.0.0-beta.
|
|
79350
|
+
version2 = "5.0.0-beta.34";
|
|
79159
79351
|
}
|
|
79160
79352
|
});
|
|
79161
79353
|
function getWorkflowQueueName(workflowName, namespace) {
|
|
@@ -79249,7 +79441,7 @@ function parseHealthCheckResponse(chunks) {
|
|
|
79249
79441
|
__name(parseHealthCheckResponse, "parseHealthCheckResponse");
|
|
79250
79442
|
async function healthCheck(world, endpoint, options) {
|
|
79251
79443
|
const timeout = options?.timeout ?? DEFAULT_HEALTH_CHECK_TIMEOUT;
|
|
79252
|
-
const correlationId = generateId();
|
|
79444
|
+
const correlationId = world.createRunId?.() ?? generateId();
|
|
79253
79445
|
const streamName = getHealthCheckStreamName(correlationId);
|
|
79254
79446
|
const queueName = `${getQueueTopicPrefix(endpoint, resolveQueueNamespace(options?.namespace))}health_check`;
|
|
79255
79447
|
const startTime = Date.now();
|
|
@@ -80895,7 +81087,7 @@ function getByteUnframingStream() {
|
|
|
80895
81087
|
});
|
|
80896
81088
|
}
|
|
80897
81089
|
__name(getByteUnframingStream, "getByteUnframingStream");
|
|
80898
|
-
function recordReadTimeToFirstChunk(startEpochMs, runId, name, startIndex) {
|
|
81090
|
+
function recordReadTimeToFirstChunk(startEpochMs, runId, name, startIndex, connectMs) {
|
|
80899
81091
|
void (async () => {
|
|
80900
81092
|
await recordElapsedSpan("workflow.stream.read", startEpochMs, {
|
|
80901
81093
|
kind: await getSpanKind("CLIENT"),
|
|
@@ -80904,6 +81096,9 @@ function recordReadTimeToFirstChunk(startEpochMs, runId, name, startIndex) {
|
|
|
80904
81096
|
"workflow.stream.name": name,
|
|
80905
81097
|
"workflow.stream.operation": "read",
|
|
80906
81098
|
"workflow.stream.read.ttfc_ms": Date.now() - startEpochMs,
|
|
81099
|
+
...typeof connectMs === "number" ? {
|
|
81100
|
+
"workflow.stream.read.connect_ms": connectMs
|
|
81101
|
+
} : {},
|
|
80907
81102
|
...typeof startIndex === "number" ? {
|
|
80908
81103
|
"workflow.stream.start_index": startIndex
|
|
80909
81104
|
} : {}
|
|
@@ -80912,6 +81107,25 @@ function recordReadTimeToFirstChunk(startEpochMs, runId, name, startIndex) {
|
|
|
80912
81107
|
})();
|
|
80913
81108
|
}
|
|
80914
81109
|
__name(recordReadTimeToFirstChunk, "recordReadTimeToFirstChunk");
|
|
81110
|
+
function recordStreamReadComplete(startEpochMs, runId, name, chunkCount, byteCount, reconnects) {
|
|
81111
|
+
void (async () => {
|
|
81112
|
+
await recordElapsedSpan("workflow.stream.read.complete", startEpochMs, {
|
|
81113
|
+
kind: await getSpanKind("CLIENT"),
|
|
81114
|
+
attributes: {
|
|
81115
|
+
"workflow.run.id": runId,
|
|
81116
|
+
"workflow.stream.name": name,
|
|
81117
|
+
"workflow.stream.operation": "read_complete",
|
|
81118
|
+
"workflow.stream.read.total_ms": Date.now() - startEpochMs,
|
|
81119
|
+
"workflow.stream.read.chunks": chunkCount,
|
|
81120
|
+
"workflow.stream.read.bytes": byteCount,
|
|
81121
|
+
...typeof reconnects === "number" ? {
|
|
81122
|
+
"workflow.stream.read.reconnects": reconnects
|
|
81123
|
+
} : {}
|
|
81124
|
+
}
|
|
81125
|
+
});
|
|
81126
|
+
})();
|
|
81127
|
+
}
|
|
81128
|
+
__name(recordStreamReadComplete, "recordStreamReadComplete");
|
|
80915
81129
|
function createReconnectingFramedStream(runId, name, startIndex) {
|
|
80916
81130
|
const reconnectSupported = startIndex === void 0 || startIndex >= 0;
|
|
80917
81131
|
let currentStartIndex = startIndex ?? 0;
|
|
@@ -80920,10 +81134,17 @@ function createReconnectingFramedStream(runId, name, startIndex) {
|
|
|
80920
81134
|
let totalReconnectCount = 0;
|
|
80921
81135
|
let reader;
|
|
80922
81136
|
let buffer22 = new Uint8Array(0);
|
|
81137
|
+
let readStart;
|
|
81138
|
+
let connectMs;
|
|
81139
|
+
let firstChunkReported = false;
|
|
81140
|
+
let chunksDelivered = 0;
|
|
81141
|
+
let bytesDelivered = 0;
|
|
80923
81142
|
async function connect() {
|
|
80924
81143
|
const world = await getWorldLazy();
|
|
80925
81144
|
const effectiveStartIndex = reconnectSupported ? currentStartIndex + consumedFrames : startIndex;
|
|
81145
|
+
const connectStart = Date.now();
|
|
80926
81146
|
const stream = await world.streams.get(runId, name, effectiveStartIndex);
|
|
81147
|
+
if (connectMs === void 0) connectMs = Date.now() - connectStart;
|
|
80927
81148
|
reader = stream.getReader();
|
|
80928
81149
|
}
|
|
80929
81150
|
__name(connect, "connect");
|
|
@@ -80959,6 +81180,7 @@ function createReconnectingFramedStream(runId, name, startIndex) {
|
|
|
80959
81180
|
__name2(reconnect, "reconnect");
|
|
80960
81181
|
return new ReadableStream({
|
|
80961
81182
|
pull: /* @__PURE__ */ __name2(async (controller) => {
|
|
81183
|
+
if (readStart === void 0) readStart = Date.now();
|
|
80962
81184
|
for (; ; ) {
|
|
80963
81185
|
if (!reader) {
|
|
80964
81186
|
try {
|
|
@@ -80986,6 +81208,9 @@ function createReconnectingFramedStream(runId, name, startIndex) {
|
|
|
80986
81208
|
}
|
|
80987
81209
|
if (result.done || !result.value) {
|
|
80988
81210
|
reader = void 0;
|
|
81211
|
+
if (readStart !== void 0) {
|
|
81212
|
+
recordStreamReadComplete(readStart, runId, name, chunksDelivered, bytesDelivered, totalReconnectCount);
|
|
81213
|
+
}
|
|
80989
81214
|
controller.close();
|
|
80990
81215
|
return;
|
|
80991
81216
|
}
|
|
@@ -81004,6 +81229,12 @@ function createReconnectingFramedStream(runId, name, startIndex) {
|
|
|
81004
81229
|
controller.enqueue(buffer22.slice(0, total));
|
|
81005
81230
|
buffer22 = buffer22.slice(total);
|
|
81006
81231
|
consumedFrames++;
|
|
81232
|
+
chunksDelivered++;
|
|
81233
|
+
bytesDelivered += total;
|
|
81234
|
+
if (!firstChunkReported && readStart !== void 0) {
|
|
81235
|
+
firstChunkReported = true;
|
|
81236
|
+
recordReadTimeToFirstChunk(readStart, runId, name, startIndex, connectMs);
|
|
81237
|
+
}
|
|
81007
81238
|
emitted = true;
|
|
81008
81239
|
}
|
|
81009
81240
|
if (emitted) {
|
|
@@ -81023,7 +81254,7 @@ function createReconnectingFramedStream(runId, name, startIndex) {
|
|
|
81023
81254
|
});
|
|
81024
81255
|
}
|
|
81025
81256
|
__name(createReconnectingFramedStream, "createReconnectingFramedStream");
|
|
81026
|
-
function recordStreamWriteFlush(startEpochMs, dispatchEpochMs, runId, name, chunkCount, byteCount) {
|
|
81257
|
+
function recordStreamWriteFlush(startEpochMs, dispatchEpochMs, runId, name, chunkCount, byteCount, rpcMs) {
|
|
81027
81258
|
void (async () => {
|
|
81028
81259
|
await recordElapsedSpan("workflow.stream.flush", startEpochMs, {
|
|
81029
81260
|
kind: await getSpanKind("CLIENT"),
|
|
@@ -81033,12 +81264,30 @@ function recordStreamWriteFlush(startEpochMs, dispatchEpochMs, runId, name, chun
|
|
|
81033
81264
|
"workflow.stream.operation": "flush",
|
|
81034
81265
|
"workflow.stream.flush.buffer_dwell_ms": dispatchEpochMs - startEpochMs,
|
|
81035
81266
|
"workflow.stream.flush.chunks": chunkCount,
|
|
81036
|
-
"workflow.stream.flush.bytes": byteCount
|
|
81267
|
+
"workflow.stream.flush.bytes": byteCount,
|
|
81268
|
+
// Client-observed World write RPC duration (network hop included).
|
|
81269
|
+
// Same key as world-vercel's per-request span attribute so queries
|
|
81270
|
+
// work regardless of which layer emitted it.
|
|
81271
|
+
"workflow.stream.write.chunk_rtt": rpcMs
|
|
81037
81272
|
}
|
|
81038
81273
|
});
|
|
81039
81274
|
})();
|
|
81040
81275
|
}
|
|
81041
81276
|
__name(recordStreamWriteFlush, "recordStreamWriteFlush");
|
|
81277
|
+
function recordStreamClose(startEpochMs, runId, name) {
|
|
81278
|
+
void (async () => {
|
|
81279
|
+
await recordElapsedSpan("workflow.stream.close", startEpochMs, {
|
|
81280
|
+
kind: await getSpanKind("CLIENT"),
|
|
81281
|
+
attributes: {
|
|
81282
|
+
"workflow.run.id": runId,
|
|
81283
|
+
"workflow.stream.name": name,
|
|
81284
|
+
"workflow.stream.operation": "close",
|
|
81285
|
+
"workflow.stream.close.rpc_ms": Date.now() - startEpochMs
|
|
81286
|
+
}
|
|
81287
|
+
});
|
|
81288
|
+
})();
|
|
81289
|
+
}
|
|
81290
|
+
__name(recordStreamClose, "recordStreamClose");
|
|
81042
81291
|
function getAllBaseReducers(global2 = globalThis) {
|
|
81043
81292
|
return {
|
|
81044
81293
|
...getClassReducers(),
|
|
@@ -81939,6 +82188,7 @@ var init_serialization2 = __esm2({
|
|
|
81939
82188
|
__name2(getByteFramingStream, "getByteFramingStream");
|
|
81940
82189
|
__name2(getByteUnframingStream, "getByteUnframingStream");
|
|
81941
82190
|
__name2(recordReadTimeToFirstChunk, "recordReadTimeToFirstChunk");
|
|
82191
|
+
__name2(recordStreamReadComplete, "recordStreamReadComplete");
|
|
81942
82192
|
WorkflowServerReadableStream = class extends ReadableStream {
|
|
81943
82193
|
static {
|
|
81944
82194
|
__name(this, "WorkflowServerReadableStream");
|
|
@@ -81953,6 +82203,9 @@ var init_serialization2 = __esm2({
|
|
|
81953
82203
|
}
|
|
81954
82204
|
let readStart;
|
|
81955
82205
|
let firstChunkReported = false;
|
|
82206
|
+
let connectMs;
|
|
82207
|
+
let chunksDelivered = 0;
|
|
82208
|
+
let bytesDelivered = 0;
|
|
81956
82209
|
super({
|
|
81957
82210
|
// @ts-expect-error Not sure why TypeScript is complaining about this
|
|
81958
82211
|
type: "bytes",
|
|
@@ -81961,7 +82214,9 @@ var init_serialization2 = __esm2({
|
|
|
81961
82214
|
if (!reader) {
|
|
81962
82215
|
if (readStart === void 0) readStart = Date.now();
|
|
81963
82216
|
const world = await getWorldLazy();
|
|
82217
|
+
const connectStart = Date.now();
|
|
81964
82218
|
const stream = await world.streams.get(runId, name, startIndex);
|
|
82219
|
+
connectMs = Date.now() - connectStart;
|
|
81965
82220
|
reader = this.#reader = stream.getReader();
|
|
81966
82221
|
}
|
|
81967
82222
|
if (!reader) {
|
|
@@ -81971,12 +82226,17 @@ var init_serialization2 = __esm2({
|
|
|
81971
82226
|
const result = await reader.read();
|
|
81972
82227
|
if (result.done) {
|
|
81973
82228
|
this.#reader = void 0;
|
|
82229
|
+
if (readStart !== void 0) {
|
|
82230
|
+
recordStreamReadComplete(readStart, runId, name, chunksDelivered, bytesDelivered);
|
|
82231
|
+
}
|
|
81974
82232
|
controller.close();
|
|
81975
82233
|
} else {
|
|
81976
82234
|
if (!firstChunkReported && result.value.byteLength > 0 && readStart !== void 0) {
|
|
81977
82235
|
firstChunkReported = true;
|
|
81978
|
-
recordReadTimeToFirstChunk(readStart, runId, name, startIndex);
|
|
82236
|
+
recordReadTimeToFirstChunk(readStart, runId, name, startIndex, connectMs);
|
|
81979
82237
|
}
|
|
82238
|
+
chunksDelivered += 1;
|
|
82239
|
+
bytesDelivered += result.value.byteLength;
|
|
81980
82240
|
controller.enqueue(result.value);
|
|
81981
82241
|
}
|
|
81982
82242
|
}, "pull"),
|
|
@@ -82006,6 +82266,7 @@ var init_serialization2 = __esm2({
|
|
|
82006
82266
|
integer: true
|
|
82007
82267
|
}), "getStreamFlushIntervalMs");
|
|
82008
82268
|
__name2(recordStreamWriteFlush, "recordStreamWriteFlush");
|
|
82269
|
+
__name2(recordStreamClose, "recordStreamClose");
|
|
82009
82270
|
WorkflowServerWritableStream = class extends WritableStream {
|
|
82010
82271
|
static {
|
|
82011
82272
|
__name(this, "WorkflowServerWritableStream");
|
|
@@ -82060,6 +82321,7 @@ var init_serialization2 = __esm2({
|
|
|
82060
82321
|
if (resolvedFlushIntervalMs === void 0) {
|
|
82061
82322
|
resolvedFlushIntervalMs = world.streamFlushIntervalMs ?? getStreamFlushIntervalMs();
|
|
82062
82323
|
}
|
|
82324
|
+
const rpcStartAt = Date.now();
|
|
82063
82325
|
try {
|
|
82064
82326
|
if (typeof world.streams.writeMulti === "function" && chunksToFlush.length > 1) {
|
|
82065
82327
|
await world.streams.writeMulti(runId, name, chunksToFlush);
|
|
@@ -82075,7 +82337,7 @@ var init_serialization2 = __esm2({
|
|
|
82075
82337
|
throw error482;
|
|
82076
82338
|
}
|
|
82077
82339
|
if (batchStart !== void 0) {
|
|
82078
|
-
recordStreamWriteFlush(batchStart, dispatchAt, runId, name, chunksToFlush.length, chunksToFlush.reduce((sum, c) => sum + c.byteLength, 0));
|
|
82340
|
+
recordStreamWriteFlush(batchStart, dispatchAt, runId, name, chunksToFlush.length, chunksToFlush.reduce((sum, c) => sum + c.byteLength, 0), Date.now() - rpcStartAt);
|
|
82079
82341
|
}
|
|
82080
82342
|
buffer22 = [];
|
|
82081
82343
|
}, "flush");
|
|
@@ -82117,7 +82379,9 @@ var init_serialization2 = __esm2({
|
|
|
82117
82379
|
await flush();
|
|
82118
82380
|
await ensureRunReady();
|
|
82119
82381
|
const world = await worldPromise;
|
|
82382
|
+
const closeStart = Date.now();
|
|
82120
82383
|
await world.streams.close(runId, name);
|
|
82384
|
+
recordStreamClose(closeStart, runId, name);
|
|
82121
82385
|
},
|
|
82122
82386
|
abort(reason) {
|
|
82123
82387
|
if (flushTimer) {
|
|
@@ -82415,7 +82679,7 @@ async function start(workflow, argsOrOptions, options) {
|
|
|
82415
82679
|
targetSupportsCompression = capabilities.supportedFormats.has(SerializationFormat.GZIP);
|
|
82416
82680
|
}
|
|
82417
82681
|
const ops = [];
|
|
82418
|
-
const runId = `wrun_${ulid3()}`;
|
|
82682
|
+
const runId = `wrun_${world.createRunId ? world.createRunId(opts) : ulid3()}`;
|
|
82419
82683
|
const traceCarrier = await serializeTraceCarrier();
|
|
82420
82684
|
const specVersion = opts.specVersion ?? world.specVersion;
|
|
82421
82685
|
const v1Compat = isLegacySpecVersion(specVersion);
|
|
@@ -82493,7 +82757,14 @@ async function start(workflow, argsOrOptions, options) {
|
|
|
82493
82757
|
} : {}
|
|
82494
82758
|
}, {
|
|
82495
82759
|
deploymentId,
|
|
82496
|
-
specVersion
|
|
82760
|
+
specVersion,
|
|
82761
|
+
// Forward any caller-supplied region hint so worlds with
|
|
82762
|
+
// per-region queue routing (e.g. world-vercel) can target the
|
|
82763
|
+
// matching queue. Worlds without a regional dimension ignore
|
|
82764
|
+
// this field.
|
|
82765
|
+
...opts.region !== void 0 ? {
|
|
82766
|
+
region: opts.region
|
|
82767
|
+
} : {}
|
|
82497
82768
|
})
|
|
82498
82769
|
]);
|
|
82499
82770
|
if (queueResult.status === "rejected") {
|
|
@@ -82548,7 +82819,7 @@ __name2(start, "start");
|
|
|
82548
82819
|
value: "start",
|
|
82549
82820
|
configurable: true
|
|
82550
82821
|
});
|
|
82551
|
-
})(start, "step//@workflow/core/runtime/start@5.0.0-beta.
|
|
82822
|
+
})(start, "step//@workflow/core/runtime/start@5.0.0-beta.34//start");
|
|
82552
82823
|
async function wakeUpRun(world, runId, options) {
|
|
82553
82824
|
try {
|
|
82554
82825
|
const run22 = await world.runs.get(runId, {
|
|
@@ -82884,7 +83155,7 @@ var Run = class _Run {
|
|
|
82884
83155
|
value: "wakeUp",
|
|
82885
83156
|
configurable: true
|
|
82886
83157
|
});
|
|
82887
|
-
})(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83158
|
+
})(Run.prototype["wakeUp"], "step//@workflow/core/runtime/run@5.0.0-beta.34//Run#wakeUp");
|
|
82888
83159
|
(function(__wf_fn, __wf_id) {
|
|
82889
83160
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
82890
83161
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -82893,7 +83164,7 @@ var Run = class _Run {
|
|
|
82893
83164
|
value: "cancel",
|
|
82894
83165
|
configurable: true
|
|
82895
83166
|
});
|
|
82896
|
-
})(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83167
|
+
})(Run.prototype["cancel"], "step//@workflow/core/runtime/run@5.0.0-beta.34//Run#cancel");
|
|
82897
83168
|
(function(__wf_fn, __wf_id) {
|
|
82898
83169
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
82899
83170
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -82902,7 +83173,7 @@ var Run = class _Run {
|
|
|
82902
83173
|
value: "getReadable",
|
|
82903
83174
|
configurable: true
|
|
82904
83175
|
});
|
|
82905
|
-
})(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83176
|
+
})(Run.prototype["getReadable"], "step//@workflow/core/runtime/run@5.0.0-beta.34//Run#getReadable");
|
|
82906
83177
|
(function(__wf_fn, __wf_id) {
|
|
82907
83178
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
82908
83179
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -82911,7 +83182,7 @@ var Run = class _Run {
|
|
|
82911
83182
|
value: "exists",
|
|
82912
83183
|
configurable: true
|
|
82913
83184
|
});
|
|
82914
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83185
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "exists").get, "step//@workflow/core/runtime/run@5.0.0-beta.34//Run#exists");
|
|
82915
83186
|
(function(__wf_fn, __wf_id) {
|
|
82916
83187
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
82917
83188
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -82920,7 +83191,7 @@ var Run = class _Run {
|
|
|
82920
83191
|
value: "status",
|
|
82921
83192
|
configurable: true
|
|
82922
83193
|
});
|
|
82923
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83194
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "status").get, "step//@workflow/core/runtime/run@5.0.0-beta.34//Run#status");
|
|
82924
83195
|
(function(__wf_fn, __wf_id) {
|
|
82925
83196
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
82926
83197
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -82929,7 +83200,7 @@ var Run = class _Run {
|
|
|
82929
83200
|
value: "returnValue",
|
|
82930
83201
|
configurable: true
|
|
82931
83202
|
});
|
|
82932
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83203
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "returnValue").get, "step//@workflow/core/runtime/run@5.0.0-beta.34//Run#returnValue");
|
|
82933
83204
|
(function(__wf_fn, __wf_id) {
|
|
82934
83205
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
82935
83206
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -82938,7 +83209,7 @@ var Run = class _Run {
|
|
|
82938
83209
|
value: "workflowName",
|
|
82939
83210
|
configurable: true
|
|
82940
83211
|
});
|
|
82941
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83212
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "workflowName").get, "step//@workflow/core/runtime/run@5.0.0-beta.34//Run#workflowName");
|
|
82942
83213
|
(function(__wf_fn, __wf_id) {
|
|
82943
83214
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
82944
83215
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -82947,7 +83218,7 @@ var Run = class _Run {
|
|
|
82947
83218
|
value: "createdAt",
|
|
82948
83219
|
configurable: true
|
|
82949
83220
|
});
|
|
82950
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83221
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "createdAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.34//Run#createdAt");
|
|
82951
83222
|
(function(__wf_fn, __wf_id) {
|
|
82952
83223
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
82953
83224
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -82956,7 +83227,7 @@ var Run = class _Run {
|
|
|
82956
83227
|
value: "startedAt",
|
|
82957
83228
|
configurable: true
|
|
82958
83229
|
});
|
|
82959
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83230
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "startedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.34//Run#startedAt");
|
|
82960
83231
|
(function(__wf_fn, __wf_id) {
|
|
82961
83232
|
var __wf_sym = /* @__PURE__ */ Symbol.for("@workflow/core//registeredSteps"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
82962
83233
|
__wf_reg.set(__wf_id, __wf_fn);
|
|
@@ -82965,7 +83236,7 @@ var Run = class _Run {
|
|
|
82965
83236
|
value: "completedAt",
|
|
82966
83237
|
configurable: true
|
|
82967
83238
|
});
|
|
82968
|
-
})(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.
|
|
83239
|
+
})(Object.getOwnPropertyDescriptor(Run.prototype, "completedAt").get, "step//@workflow/core/runtime/run@5.0.0-beta.34//Run#completedAt");
|
|
82969
83240
|
(function(__wf_cls, __wf_id) {
|
|
82970
83241
|
var __wf_sym = /* @__PURE__ */ Symbol.for("workflow-class-registry"), __wf_reg = globalThis[__wf_sym] || (globalThis[__wf_sym] = /* @__PURE__ */ new Map());
|
|
82971
83242
|
__wf_reg.set(__wf_id, __wf_cls);
|
|
@@ -82975,7 +83246,7 @@ var Run = class _Run {
|
|
|
82975
83246
|
enumerable: false,
|
|
82976
83247
|
configurable: false
|
|
82977
83248
|
});
|
|
82978
|
-
})(Run, "class//@workflow/core/runtime/run@5.0.0-beta.
|
|
83249
|
+
})(Run, "class//@workflow/core/runtime/run@5.0.0-beta.34//Run");
|
|
82979
83250
|
async function fetch2(...args) {
|
|
82980
83251
|
return globalThis.fetch(...args);
|
|
82981
83252
|
}
|
|
@@ -93390,10 +93661,10 @@ var Run = class _Run {
|
|
|
93390
93661
|
return this.getReadable();
|
|
93391
93662
|
}
|
|
93392
93663
|
};
|
|
93393
|
-
Run.prototype["wakeUp"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
93394
|
-
Run.prototype["cancel"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
93395
|
-
Run.prototype["getReadable"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
93396
|
-
var __step_Run$exists = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
93664
|
+
Run.prototype["wakeUp"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.34//Run#wakeUp");
|
|
93665
|
+
Run.prototype["cancel"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.34//Run#cancel");
|
|
93666
|
+
Run.prototype["getReadable"] = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.34//Run#getReadable");
|
|
93667
|
+
var __step_Run$exists = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.34//Run#exists");
|
|
93397
93668
|
Object.defineProperty(Run.prototype, "exists", {
|
|
93398
93669
|
get() {
|
|
93399
93670
|
return __step_Run$exists.call(this);
|
|
@@ -93401,7 +93672,7 @@ Object.defineProperty(Run.prototype, "exists", {
|
|
|
93401
93672
|
configurable: true,
|
|
93402
93673
|
enumerable: false
|
|
93403
93674
|
});
|
|
93404
|
-
var __step_Run$status = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
93675
|
+
var __step_Run$status = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.34//Run#status");
|
|
93405
93676
|
Object.defineProperty(Run.prototype, "status", {
|
|
93406
93677
|
get() {
|
|
93407
93678
|
return __step_Run$status.call(this);
|
|
@@ -93409,7 +93680,7 @@ Object.defineProperty(Run.prototype, "status", {
|
|
|
93409
93680
|
configurable: true,
|
|
93410
93681
|
enumerable: false
|
|
93411
93682
|
});
|
|
93412
|
-
var __step_Run$returnValue = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
93683
|
+
var __step_Run$returnValue = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.34//Run#returnValue");
|
|
93413
93684
|
Object.defineProperty(Run.prototype, "returnValue", {
|
|
93414
93685
|
get() {
|
|
93415
93686
|
return __step_Run$returnValue.call(this);
|
|
@@ -93417,7 +93688,7 @@ Object.defineProperty(Run.prototype, "returnValue", {
|
|
|
93417
93688
|
configurable: true,
|
|
93418
93689
|
enumerable: false
|
|
93419
93690
|
});
|
|
93420
|
-
var __step_Run$workflowName = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
93691
|
+
var __step_Run$workflowName = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.34//Run#workflowName");
|
|
93421
93692
|
Object.defineProperty(Run.prototype, "workflowName", {
|
|
93422
93693
|
get() {
|
|
93423
93694
|
return __step_Run$workflowName.call(this);
|
|
@@ -93425,7 +93696,7 @@ Object.defineProperty(Run.prototype, "workflowName", {
|
|
|
93425
93696
|
configurable: true,
|
|
93426
93697
|
enumerable: false
|
|
93427
93698
|
});
|
|
93428
|
-
var __step_Run$createdAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
93699
|
+
var __step_Run$createdAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.34//Run#createdAt");
|
|
93429
93700
|
Object.defineProperty(Run.prototype, "createdAt", {
|
|
93430
93701
|
get() {
|
|
93431
93702
|
return __step_Run$createdAt.call(this);
|
|
@@ -93433,7 +93704,7 @@ Object.defineProperty(Run.prototype, "createdAt", {
|
|
|
93433
93704
|
configurable: true,
|
|
93434
93705
|
enumerable: false
|
|
93435
93706
|
});
|
|
93436
|
-
var __step_Run$startedAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
93707
|
+
var __step_Run$startedAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.34//Run#startedAt");
|
|
93437
93708
|
Object.defineProperty(Run.prototype, "startedAt", {
|
|
93438
93709
|
get() {
|
|
93439
93710
|
return __step_Run$startedAt.call(this);
|
|
@@ -93441,7 +93712,7 @@ Object.defineProperty(Run.prototype, "startedAt", {
|
|
|
93441
93712
|
configurable: true,
|
|
93442
93713
|
enumerable: false
|
|
93443
93714
|
});
|
|
93444
|
-
var __step_Run$completedAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.
|
|
93715
|
+
var __step_Run$completedAt = globalThis[/* @__PURE__ */ Symbol.for("WORKFLOW_USE_STEP")]("step//@workflow/core/runtime/run@5.0.0-beta.34//Run#completedAt");
|
|
93445
93716
|
Object.defineProperty(Run.prototype, "completedAt", {
|
|
93446
93717
|
get() {
|
|
93447
93718
|
return __step_Run$completedAt.call(this);
|
|
@@ -93458,7 +93729,7 @@ Object.defineProperty(Run.prototype, "completedAt", {
|
|
|
93458
93729
|
enumerable: false,
|
|
93459
93730
|
configurable: false
|
|
93460
93731
|
});
|
|
93461
|
-
})(Run, "class//@workflow/core/runtime/run@5.0.0-beta.
|
|
93732
|
+
})(Run, "class//@workflow/core/runtime/run@5.0.0-beta.34//Run");
|
|
93462
93733
|
|
|
93463
93734
|
// ../core/dist/workflow/create-hook.js
|
|
93464
93735
|
aliasSerializationClass(RUN_CLASS_ID, Run);
|
|
@@ -109062,7 +109333,14 @@ var WaitSchema = external_exports.object({
|
|
|
109062
109333
|
});
|
|
109063
109334
|
|
|
109064
109335
|
// ../world/dist/analytics.js
|
|
109065
|
-
var
|
|
109336
|
+
var NAIVE_DATETIME = /^\\d{4}-\\d{2}-\\d{2}[ T]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?$/;
|
|
109337
|
+
var UTCDateSchema = external_exports.preprocess((value) => {
|
|
109338
|
+
if (typeof value === "string" && NAIVE_DATETIME.test(value)) {
|
|
109339
|
+
return \`\${value.replace(" ", "T")}Z\`;
|
|
109340
|
+
}
|
|
109341
|
+
return value;
|
|
109342
|
+
}, external_exports.coerce.date());
|
|
109343
|
+
var NullableDateSchema = UTCDateSchema.nullable().optional();
|
|
109066
109344
|
var NullableStringSchema = external_exports.string().nullable().optional();
|
|
109067
109345
|
var NullableBooleanSchema = external_exports.boolean().nullable().optional();
|
|
109068
109346
|
var AnalyticsRunSchema = external_exports.object({
|
|
@@ -109072,8 +109350,8 @@ var AnalyticsRunSchema = external_exports.object({
|
|
|
109072
109350
|
workflowName: external_exports.string(),
|
|
109073
109351
|
specVersion: external_exports.coerce.number().optional(),
|
|
109074
109352
|
attributes: external_exports.record(external_exports.string(), external_exports.string()).default({}),
|
|
109075
|
-
createdAt:
|
|
109076
|
-
updatedAt:
|
|
109353
|
+
createdAt: UTCDateSchema,
|
|
109354
|
+
updatedAt: UTCDateSchema,
|
|
109077
109355
|
startedAt: NullableDateSchema,
|
|
109078
109356
|
completedAt: NullableDateSchema,
|
|
109079
109357
|
errorCode: NullableStringSchema,
|
|
@@ -109086,8 +109364,8 @@ var AnalyticsStepSchema = external_exports.object({
|
|
|
109086
109364
|
stepName: NullableStringSchema,
|
|
109087
109365
|
status: StepStatusSchema,
|
|
109088
109366
|
attempt: external_exports.number().optional(),
|
|
109089
|
-
createdAt:
|
|
109090
|
-
updatedAt:
|
|
109367
|
+
createdAt: UTCDateSchema,
|
|
109368
|
+
updatedAt: UTCDateSchema,
|
|
109091
109369
|
startedAt: NullableDateSchema,
|
|
109092
109370
|
completedAt: NullableDateSchema,
|
|
109093
109371
|
retryAfter: NullableDateSchema,
|
|
@@ -109105,8 +109383,8 @@ var AnalyticsEventSchema = external_exports.object({
|
|
|
109105
109383
|
workflowName: external_exports.string(),
|
|
109106
109384
|
deploymentId: external_exports.string(),
|
|
109107
109385
|
specVersion: external_exports.coerce.number().optional(),
|
|
109108
|
-
runCreatedAt:
|
|
109109
|
-
createdAt:
|
|
109386
|
+
runCreatedAt: UTCDateSchema,
|
|
109387
|
+
createdAt: UTCDateSchema,
|
|
109110
109388
|
region: NullableStringSchema,
|
|
109111
109389
|
vercelId: NullableStringSchema,
|
|
109112
109390
|
requestId: NullableStringSchema,
|
|
@@ -109127,8 +109405,8 @@ var AnalyticsHookSchema = external_exports.object({
|
|
|
109127
109405
|
"disposed",
|
|
109128
109406
|
"conflict"
|
|
109129
109407
|
]),
|
|
109130
|
-
createdAt:
|
|
109131
|
-
updatedAt:
|
|
109408
|
+
createdAt: UTCDateSchema,
|
|
109409
|
+
updatedAt: UTCDateSchema,
|
|
109132
109410
|
receivedAt: NullableDateSchema,
|
|
109133
109411
|
disposedAt: NullableDateSchema,
|
|
109134
109412
|
isWebhook: NullableBooleanSchema,
|
|
@@ -109141,12 +109419,18 @@ var AnalyticsWaitSchema = external_exports.object({
|
|
|
109141
109419
|
waitId: external_exports.string(),
|
|
109142
109420
|
status: WaitStatusSchema,
|
|
109143
109421
|
resumeAt: NullableDateSchema,
|
|
109144
|
-
createdAt:
|
|
109145
|
-
updatedAt:
|
|
109422
|
+
createdAt: UTCDateSchema,
|
|
109423
|
+
updatedAt: UTCDateSchema,
|
|
109146
109424
|
completedAt: NullableDateSchema,
|
|
109147
109425
|
workflowCoreVersion: NullableStringSchema,
|
|
109148
109426
|
workflowEncryptionEnabled: NullableBooleanSchema
|
|
109149
109427
|
});
|
|
109428
|
+
var AnalyticsAttributeKeySchema = external_exports.object({
|
|
109429
|
+
key: external_exports.string(),
|
|
109430
|
+
runCount: external_exports.coerce.number(),
|
|
109431
|
+
firstSeenAt: external_exports.coerce.date(),
|
|
109432
|
+
lastSeenAt: external_exports.coerce.date()
|
|
109433
|
+
});
|
|
109150
109434
|
|
|
109151
109435
|
// ../world/dist/hooks.js
|
|
109152
109436
|
var HookSchema = external_exports.object({
|