@netlify/plugin-nextjs 5.0.0-rc.6 → 5.0.0-rc.8

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.
@@ -4,6 +4,10 @@
4
4
  return createRequire(import.meta.url);
5
5
  })();
6
6
 
7
+ import {
8
+ esm_exports,
9
+ init_esm
10
+ } from "../../esm-chunks/chunk-Y3K5Q6FP.js";
7
11
  import {
8
12
  require_semver
9
13
  } from "../../esm-chunks/chunk-PJG75HGC.js";
@@ -16,1647 +20,6 @@ import {
16
20
  __toESM
17
21
  } from "../../esm-chunks/chunk-5JVNISGM.js";
18
22
 
19
- // node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.js
20
- var _globalThis;
21
- var init_globalThis = __esm({
22
- "node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.js"() {
23
- _globalThis = typeof globalThis === "object" ? globalThis : global;
24
- }
25
- });
26
-
27
- // node_modules/@opentelemetry/api/build/esm/platform/node/index.js
28
- var init_node = __esm({
29
- "node_modules/@opentelemetry/api/build/esm/platform/node/index.js"() {
30
- init_globalThis();
31
- }
32
- });
33
-
34
- // node_modules/@opentelemetry/api/build/esm/platform/index.js
35
- var init_platform = __esm({
36
- "node_modules/@opentelemetry/api/build/esm/platform/index.js"() {
37
- init_node();
38
- }
39
- });
40
-
41
- // node_modules/@opentelemetry/api/build/esm/version.js
42
- var VERSION;
43
- var init_version = __esm({
44
- "node_modules/@opentelemetry/api/build/esm/version.js"() {
45
- VERSION = "1.8.0";
46
- }
47
- });
48
-
49
- // node_modules/@opentelemetry/api/build/esm/internal/semver.js
50
- function _makeCompatibilityCheck(ownVersion) {
51
- var acceptedVersions = /* @__PURE__ */ new Set([ownVersion]);
52
- var rejectedVersions = /* @__PURE__ */ new Set();
53
- var myVersionMatch = ownVersion.match(re);
54
- if (!myVersionMatch) {
55
- return function() {
56
- return false;
57
- };
58
- }
59
- var ownVersionParsed = {
60
- major: +myVersionMatch[1],
61
- minor: +myVersionMatch[2],
62
- patch: +myVersionMatch[3],
63
- prerelease: myVersionMatch[4]
64
- };
65
- if (ownVersionParsed.prerelease != null) {
66
- return function isExactmatch(globalVersion) {
67
- return globalVersion === ownVersion;
68
- };
69
- }
70
- function _reject(v) {
71
- rejectedVersions.add(v);
72
- return false;
73
- }
74
- function _accept(v) {
75
- acceptedVersions.add(v);
76
- return true;
77
- }
78
- return function isCompatible2(globalVersion) {
79
- if (acceptedVersions.has(globalVersion)) {
80
- return true;
81
- }
82
- if (rejectedVersions.has(globalVersion)) {
83
- return false;
84
- }
85
- var globalVersionMatch = globalVersion.match(re);
86
- if (!globalVersionMatch) {
87
- return _reject(globalVersion);
88
- }
89
- var globalVersionParsed = {
90
- major: +globalVersionMatch[1],
91
- minor: +globalVersionMatch[2],
92
- patch: +globalVersionMatch[3],
93
- prerelease: globalVersionMatch[4]
94
- };
95
- if (globalVersionParsed.prerelease != null) {
96
- return _reject(globalVersion);
97
- }
98
- if (ownVersionParsed.major !== globalVersionParsed.major) {
99
- return _reject(globalVersion);
100
- }
101
- if (ownVersionParsed.major === 0) {
102
- if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
103
- return _accept(globalVersion);
104
- }
105
- return _reject(globalVersion);
106
- }
107
- if (ownVersionParsed.minor <= globalVersionParsed.minor) {
108
- return _accept(globalVersion);
109
- }
110
- return _reject(globalVersion);
111
- };
112
- }
113
- var re, isCompatible;
114
- var init_semver = __esm({
115
- "node_modules/@opentelemetry/api/build/esm/internal/semver.js"() {
116
- init_version();
117
- re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
118
- isCompatible = _makeCompatibilityCheck(VERSION);
119
- }
120
- });
121
-
122
- // node_modules/@opentelemetry/api/build/esm/internal/global-utils.js
123
- function registerGlobal(type, instance, diag3, allowOverride) {
124
- var _a;
125
- if (allowOverride === void 0) {
126
- allowOverride = false;
127
- }
128
- var api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {
129
- version: VERSION
130
- };
131
- if (!allowOverride && api[type]) {
132
- var err = new Error("@opentelemetry/api: Attempted duplicate registration of API: " + type);
133
- diag3.error(err.stack || err.message);
134
- return false;
135
- }
136
- if (api.version !== VERSION) {
137
- var err = new Error("@opentelemetry/api: Registration of version v" + api.version + " for " + type + " does not match previously registered API v" + VERSION);
138
- diag3.error(err.stack || err.message);
139
- return false;
140
- }
141
- api[type] = instance;
142
- diag3.debug("@opentelemetry/api: Registered a global for " + type + " v" + VERSION + ".");
143
- return true;
144
- }
145
- function getGlobal(type) {
146
- var _a, _b;
147
- var globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;
148
- if (!globalVersion || !isCompatible(globalVersion)) {
149
- return;
150
- }
151
- return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
152
- }
153
- function unregisterGlobal(type, diag3) {
154
- diag3.debug("@opentelemetry/api: Unregistering a global for " + type + " v" + VERSION + ".");
155
- var api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
156
- if (api) {
157
- delete api[type];
158
- }
159
- }
160
- var major, GLOBAL_OPENTELEMETRY_API_KEY, _global;
161
- var init_global_utils = __esm({
162
- "node_modules/@opentelemetry/api/build/esm/internal/global-utils.js"() {
163
- init_platform();
164
- init_version();
165
- init_semver();
166
- major = VERSION.split(".")[0];
167
- GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api." + major);
168
- _global = _globalThis;
169
- }
170
- });
171
-
172
- // node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js
173
- function logProxy(funcName, namespace, args) {
174
- var logger = getGlobal("diag");
175
- if (!logger) {
176
- return;
177
- }
178
- args.unshift(namespace);
179
- return logger[funcName].apply(logger, __spreadArray([], __read(args), false));
180
- }
181
- var __read, __spreadArray, DiagComponentLogger;
182
- var init_ComponentLogger = __esm({
183
- "node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js"() {
184
- init_global_utils();
185
- __read = function(o, n) {
186
- var m = typeof Symbol === "function" && o[Symbol.iterator];
187
- if (!m)
188
- return o;
189
- var i = m.call(o), r, ar = [], e;
190
- try {
191
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
192
- ar.push(r.value);
193
- } catch (error) {
194
- e = { error };
195
- } finally {
196
- try {
197
- if (r && !r.done && (m = i["return"]))
198
- m.call(i);
199
- } finally {
200
- if (e)
201
- throw e.error;
202
- }
203
- }
204
- return ar;
205
- };
206
- __spreadArray = function(to, from, pack) {
207
- if (pack || arguments.length === 2)
208
- for (var i = 0, l = from.length, ar; i < l; i++) {
209
- if (ar || !(i in from)) {
210
- if (!ar)
211
- ar = Array.prototype.slice.call(from, 0, i);
212
- ar[i] = from[i];
213
- }
214
- }
215
- return to.concat(ar || Array.prototype.slice.call(from));
216
- };
217
- DiagComponentLogger = /** @class */
218
- function() {
219
- function DiagComponentLogger2(props) {
220
- this._namespace = props.namespace || "DiagComponentLogger";
221
- }
222
- DiagComponentLogger2.prototype.debug = function() {
223
- var args = [];
224
- for (var _i = 0; _i < arguments.length; _i++) {
225
- args[_i] = arguments[_i];
226
- }
227
- return logProxy("debug", this._namespace, args);
228
- };
229
- DiagComponentLogger2.prototype.error = function() {
230
- var args = [];
231
- for (var _i = 0; _i < arguments.length; _i++) {
232
- args[_i] = arguments[_i];
233
- }
234
- return logProxy("error", this._namespace, args);
235
- };
236
- DiagComponentLogger2.prototype.info = function() {
237
- var args = [];
238
- for (var _i = 0; _i < arguments.length; _i++) {
239
- args[_i] = arguments[_i];
240
- }
241
- return logProxy("info", this._namespace, args);
242
- };
243
- DiagComponentLogger2.prototype.warn = function() {
244
- var args = [];
245
- for (var _i = 0; _i < arguments.length; _i++) {
246
- args[_i] = arguments[_i];
247
- }
248
- return logProxy("warn", this._namespace, args);
249
- };
250
- DiagComponentLogger2.prototype.verbose = function() {
251
- var args = [];
252
- for (var _i = 0; _i < arguments.length; _i++) {
253
- args[_i] = arguments[_i];
254
- }
255
- return logProxy("verbose", this._namespace, args);
256
- };
257
- return DiagComponentLogger2;
258
- }();
259
- }
260
- });
261
-
262
- // node_modules/@opentelemetry/api/build/esm/diag/types.js
263
- var DiagLogLevel;
264
- var init_types = __esm({
265
- "node_modules/@opentelemetry/api/build/esm/diag/types.js"() {
266
- (function(DiagLogLevel2) {
267
- DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
268
- DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
269
- DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
270
- DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
271
- DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
272
- DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
273
- DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
274
- })(DiagLogLevel || (DiagLogLevel = {}));
275
- }
276
- });
277
-
278
- // node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js
279
- function createLogLevelDiagLogger(maxLevel, logger) {
280
- if (maxLevel < DiagLogLevel.NONE) {
281
- maxLevel = DiagLogLevel.NONE;
282
- } else if (maxLevel > DiagLogLevel.ALL) {
283
- maxLevel = DiagLogLevel.ALL;
284
- }
285
- logger = logger || {};
286
- function _filterFunc(funcName, theLevel) {
287
- var theFunc = logger[funcName];
288
- if (typeof theFunc === "function" && maxLevel >= theLevel) {
289
- return theFunc.bind(logger);
290
- }
291
- return function() {
292
- };
293
- }
294
- return {
295
- error: _filterFunc("error", DiagLogLevel.ERROR),
296
- warn: _filterFunc("warn", DiagLogLevel.WARN),
297
- info: _filterFunc("info", DiagLogLevel.INFO),
298
- debug: _filterFunc("debug", DiagLogLevel.DEBUG),
299
- verbose: _filterFunc("verbose", DiagLogLevel.VERBOSE)
300
- };
301
- }
302
- var init_logLevelLogger = __esm({
303
- "node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js"() {
304
- init_types();
305
- }
306
- });
307
-
308
- // node_modules/@opentelemetry/api/build/esm/api/diag.js
309
- var __read2, __spreadArray2, API_NAME, DiagAPI;
310
- var init_diag = __esm({
311
- "node_modules/@opentelemetry/api/build/esm/api/diag.js"() {
312
- init_ComponentLogger();
313
- init_logLevelLogger();
314
- init_types();
315
- init_global_utils();
316
- __read2 = function(o, n) {
317
- var m = typeof Symbol === "function" && o[Symbol.iterator];
318
- if (!m)
319
- return o;
320
- var i = m.call(o), r, ar = [], e;
321
- try {
322
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
323
- ar.push(r.value);
324
- } catch (error) {
325
- e = { error };
326
- } finally {
327
- try {
328
- if (r && !r.done && (m = i["return"]))
329
- m.call(i);
330
- } finally {
331
- if (e)
332
- throw e.error;
333
- }
334
- }
335
- return ar;
336
- };
337
- __spreadArray2 = function(to, from, pack) {
338
- if (pack || arguments.length === 2)
339
- for (var i = 0, l = from.length, ar; i < l; i++) {
340
- if (ar || !(i in from)) {
341
- if (!ar)
342
- ar = Array.prototype.slice.call(from, 0, i);
343
- ar[i] = from[i];
344
- }
345
- }
346
- return to.concat(ar || Array.prototype.slice.call(from));
347
- };
348
- API_NAME = "diag";
349
- DiagAPI = /** @class */
350
- function() {
351
- function DiagAPI2() {
352
- function _logProxy(funcName) {
353
- return function() {
354
- var args = [];
355
- for (var _i = 0; _i < arguments.length; _i++) {
356
- args[_i] = arguments[_i];
357
- }
358
- var logger = getGlobal("diag");
359
- if (!logger)
360
- return;
361
- return logger[funcName].apply(logger, __spreadArray2([], __read2(args), false));
362
- };
363
- }
364
- var self2 = this;
365
- var setLogger = function(logger, optionsOrLogLevel) {
366
- var _a, _b, _c;
367
- if (optionsOrLogLevel === void 0) {
368
- optionsOrLogLevel = { logLevel: DiagLogLevel.INFO };
369
- }
370
- if (logger === self2) {
371
- var err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
372
- self2.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
373
- return false;
374
- }
375
- if (typeof optionsOrLogLevel === "number") {
376
- optionsOrLogLevel = {
377
- logLevel: optionsOrLogLevel
378
- };
379
- }
380
- var oldLogger = getGlobal("diag");
381
- var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);
382
- if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
383
- var stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : "<failed to generate stacktrace>";
384
- oldLogger.warn("Current logger will be overwritten from " + stack);
385
- newLogger.warn("Current logger will overwrite one already registered from " + stack);
386
- }
387
- return registerGlobal("diag", newLogger, self2, true);
388
- };
389
- self2.setLogger = setLogger;
390
- self2.disable = function() {
391
- unregisterGlobal(API_NAME, self2);
392
- };
393
- self2.createComponentLogger = function(options) {
394
- return new DiagComponentLogger(options);
395
- };
396
- self2.verbose = _logProxy("verbose");
397
- self2.debug = _logProxy("debug");
398
- self2.info = _logProxy("info");
399
- self2.warn = _logProxy("warn");
400
- self2.error = _logProxy("error");
401
- }
402
- DiagAPI2.instance = function() {
403
- if (!this._instance) {
404
- this._instance = new DiagAPI2();
405
- }
406
- return this._instance;
407
- };
408
- return DiagAPI2;
409
- }();
410
- }
411
- });
412
-
413
- // node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js
414
- var __read3, __values, BaggageImpl;
415
- var init_baggage_impl = __esm({
416
- "node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js"() {
417
- __read3 = function(o, n) {
418
- var m = typeof Symbol === "function" && o[Symbol.iterator];
419
- if (!m)
420
- return o;
421
- var i = m.call(o), r, ar = [], e;
422
- try {
423
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
424
- ar.push(r.value);
425
- } catch (error) {
426
- e = { error };
427
- } finally {
428
- try {
429
- if (r && !r.done && (m = i["return"]))
430
- m.call(i);
431
- } finally {
432
- if (e)
433
- throw e.error;
434
- }
435
- }
436
- return ar;
437
- };
438
- __values = function(o) {
439
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
440
- if (m)
441
- return m.call(o);
442
- if (o && typeof o.length === "number")
443
- return {
444
- next: function() {
445
- if (o && i >= o.length)
446
- o = void 0;
447
- return { value: o && o[i++], done: !o };
448
- }
449
- };
450
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
451
- };
452
- BaggageImpl = /** @class */
453
- function() {
454
- function BaggageImpl2(entries) {
455
- this._entries = entries ? new Map(entries) : /* @__PURE__ */ new Map();
456
- }
457
- BaggageImpl2.prototype.getEntry = function(key) {
458
- var entry = this._entries.get(key);
459
- if (!entry) {
460
- return void 0;
461
- }
462
- return Object.assign({}, entry);
463
- };
464
- BaggageImpl2.prototype.getAllEntries = function() {
465
- return Array.from(this._entries.entries()).map(function(_a) {
466
- var _b = __read3(_a, 2), k = _b[0], v = _b[1];
467
- return [k, v];
468
- });
469
- };
470
- BaggageImpl2.prototype.setEntry = function(key, entry) {
471
- var newBaggage = new BaggageImpl2(this._entries);
472
- newBaggage._entries.set(key, entry);
473
- return newBaggage;
474
- };
475
- BaggageImpl2.prototype.removeEntry = function(key) {
476
- var newBaggage = new BaggageImpl2(this._entries);
477
- newBaggage._entries.delete(key);
478
- return newBaggage;
479
- };
480
- BaggageImpl2.prototype.removeEntries = function() {
481
- var e_1, _a;
482
- var keys = [];
483
- for (var _i = 0; _i < arguments.length; _i++) {
484
- keys[_i] = arguments[_i];
485
- }
486
- var newBaggage = new BaggageImpl2(this._entries);
487
- try {
488
- for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {
489
- var key = keys_1_1.value;
490
- newBaggage._entries.delete(key);
491
- }
492
- } catch (e_1_1) {
493
- e_1 = { error: e_1_1 };
494
- } finally {
495
- try {
496
- if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return))
497
- _a.call(keys_1);
498
- } finally {
499
- if (e_1)
500
- throw e_1.error;
501
- }
502
- }
503
- return newBaggage;
504
- };
505
- BaggageImpl2.prototype.clear = function() {
506
- return new BaggageImpl2();
507
- };
508
- return BaggageImpl2;
509
- }();
510
- }
511
- });
512
-
513
- // node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js
514
- var baggageEntryMetadataSymbol;
515
- var init_symbol = __esm({
516
- "node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js"() {
517
- baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
518
- }
519
- });
520
-
521
- // node_modules/@opentelemetry/api/build/esm/baggage/utils.js
522
- function createBaggage(entries) {
523
- if (entries === void 0) {
524
- entries = {};
525
- }
526
- return new BaggageImpl(new Map(Object.entries(entries)));
527
- }
528
- function baggageEntryMetadataFromString(str) {
529
- if (typeof str !== "string") {
530
- diag.error("Cannot create baggage metadata from unknown type: " + typeof str);
531
- str = "";
532
- }
533
- return {
534
- __TYPE__: baggageEntryMetadataSymbol,
535
- toString: function() {
536
- return str;
537
- }
538
- };
539
- }
540
- var diag;
541
- var init_utils = __esm({
542
- "node_modules/@opentelemetry/api/build/esm/baggage/utils.js"() {
543
- init_diag();
544
- init_baggage_impl();
545
- init_symbol();
546
- diag = DiagAPI.instance();
547
- }
548
- });
549
-
550
- // node_modules/@opentelemetry/api/build/esm/context/context.js
551
- function createContextKey(description) {
552
- return Symbol.for(description);
553
- }
554
- var BaseContext, ROOT_CONTEXT;
555
- var init_context = __esm({
556
- "node_modules/@opentelemetry/api/build/esm/context/context.js"() {
557
- BaseContext = /** @class */
558
- /* @__PURE__ */ function() {
559
- function BaseContext2(parentContext) {
560
- var self2 = this;
561
- self2._currentContext = parentContext ? new Map(parentContext) : /* @__PURE__ */ new Map();
562
- self2.getValue = function(key) {
563
- return self2._currentContext.get(key);
564
- };
565
- self2.setValue = function(key, value) {
566
- var context2 = new BaseContext2(self2._currentContext);
567
- context2._currentContext.set(key, value);
568
- return context2;
569
- };
570
- self2.deleteValue = function(key) {
571
- var context2 = new BaseContext2(self2._currentContext);
572
- context2._currentContext.delete(key);
573
- return context2;
574
- };
575
- }
576
- return BaseContext2;
577
- }();
578
- ROOT_CONTEXT = new BaseContext();
579
- }
580
- });
581
-
582
- // node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.js
583
- var consoleMap, DiagConsoleLogger;
584
- var init_consoleLogger = __esm({
585
- "node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.js"() {
586
- consoleMap = [
587
- { n: "error", c: "error" },
588
- { n: "warn", c: "warn" },
589
- { n: "info", c: "info" },
590
- { n: "debug", c: "debug" },
591
- { n: "verbose", c: "trace" }
592
- ];
593
- DiagConsoleLogger = /** @class */
594
- /* @__PURE__ */ function() {
595
- function DiagConsoleLogger2() {
596
- function _consoleFunc(funcName) {
597
- return function() {
598
- var args = [];
599
- for (var _i = 0; _i < arguments.length; _i++) {
600
- args[_i] = arguments[_i];
601
- }
602
- if (console) {
603
- var theFunc = console[funcName];
604
- if (typeof theFunc !== "function") {
605
- theFunc = console.log;
606
- }
607
- if (typeof theFunc === "function") {
608
- return theFunc.apply(console, args);
609
- }
610
- }
611
- };
612
- }
613
- for (var i = 0; i < consoleMap.length; i++) {
614
- this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
615
- }
616
- }
617
- return DiagConsoleLogger2;
618
- }();
619
- }
620
- });
621
-
622
- // node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js
623
- function createNoopMeter() {
624
- return NOOP_METER;
625
- }
626
- var __extends, NoopMeter, NoopMetric, NoopCounterMetric, NoopUpDownCounterMetric, NoopHistogramMetric, NoopObservableMetric, NoopObservableCounterMetric, NoopObservableGaugeMetric, NoopObservableUpDownCounterMetric, NOOP_METER, NOOP_COUNTER_METRIC, NOOP_HISTOGRAM_METRIC, NOOP_UP_DOWN_COUNTER_METRIC, NOOP_OBSERVABLE_COUNTER_METRIC, NOOP_OBSERVABLE_GAUGE_METRIC, NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
627
- var init_NoopMeter = __esm({
628
- "node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js"() {
629
- __extends = /* @__PURE__ */ function() {
630
- var extendStatics = function(d, b) {
631
- extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
632
- d2.__proto__ = b2;
633
- } || function(d2, b2) {
634
- for (var p in b2)
635
- if (Object.prototype.hasOwnProperty.call(b2, p))
636
- d2[p] = b2[p];
637
- };
638
- return extendStatics(d, b);
639
- };
640
- return function(d, b) {
641
- if (typeof b !== "function" && b !== null)
642
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
643
- extendStatics(d, b);
644
- function __() {
645
- this.constructor = d;
646
- }
647
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
648
- };
649
- }();
650
- NoopMeter = /** @class */
651
- function() {
652
- function NoopMeter2() {
653
- }
654
- NoopMeter2.prototype.createHistogram = function(_name, _options) {
655
- return NOOP_HISTOGRAM_METRIC;
656
- };
657
- NoopMeter2.prototype.createCounter = function(_name, _options) {
658
- return NOOP_COUNTER_METRIC;
659
- };
660
- NoopMeter2.prototype.createUpDownCounter = function(_name, _options) {
661
- return NOOP_UP_DOWN_COUNTER_METRIC;
662
- };
663
- NoopMeter2.prototype.createObservableGauge = function(_name, _options) {
664
- return NOOP_OBSERVABLE_GAUGE_METRIC;
665
- };
666
- NoopMeter2.prototype.createObservableCounter = function(_name, _options) {
667
- return NOOP_OBSERVABLE_COUNTER_METRIC;
668
- };
669
- NoopMeter2.prototype.createObservableUpDownCounter = function(_name, _options) {
670
- return NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
671
- };
672
- NoopMeter2.prototype.addBatchObservableCallback = function(_callback, _observables) {
673
- };
674
- NoopMeter2.prototype.removeBatchObservableCallback = function(_callback) {
675
- };
676
- return NoopMeter2;
677
- }();
678
- NoopMetric = /** @class */
679
- /* @__PURE__ */ function() {
680
- function NoopMetric2() {
681
- }
682
- return NoopMetric2;
683
- }();
684
- NoopCounterMetric = /** @class */
685
- function(_super) {
686
- __extends(NoopCounterMetric2, _super);
687
- function NoopCounterMetric2() {
688
- return _super !== null && _super.apply(this, arguments) || this;
689
- }
690
- NoopCounterMetric2.prototype.add = function(_value, _attributes) {
691
- };
692
- return NoopCounterMetric2;
693
- }(NoopMetric);
694
- NoopUpDownCounterMetric = /** @class */
695
- function(_super) {
696
- __extends(NoopUpDownCounterMetric2, _super);
697
- function NoopUpDownCounterMetric2() {
698
- return _super !== null && _super.apply(this, arguments) || this;
699
- }
700
- NoopUpDownCounterMetric2.prototype.add = function(_value, _attributes) {
701
- };
702
- return NoopUpDownCounterMetric2;
703
- }(NoopMetric);
704
- NoopHistogramMetric = /** @class */
705
- function(_super) {
706
- __extends(NoopHistogramMetric2, _super);
707
- function NoopHistogramMetric2() {
708
- return _super !== null && _super.apply(this, arguments) || this;
709
- }
710
- NoopHistogramMetric2.prototype.record = function(_value, _attributes) {
711
- };
712
- return NoopHistogramMetric2;
713
- }(NoopMetric);
714
- NoopObservableMetric = /** @class */
715
- function() {
716
- function NoopObservableMetric2() {
717
- }
718
- NoopObservableMetric2.prototype.addCallback = function(_callback) {
719
- };
720
- NoopObservableMetric2.prototype.removeCallback = function(_callback) {
721
- };
722
- return NoopObservableMetric2;
723
- }();
724
- NoopObservableCounterMetric = /** @class */
725
- function(_super) {
726
- __extends(NoopObservableCounterMetric2, _super);
727
- function NoopObservableCounterMetric2() {
728
- return _super !== null && _super.apply(this, arguments) || this;
729
- }
730
- return NoopObservableCounterMetric2;
731
- }(NoopObservableMetric);
732
- NoopObservableGaugeMetric = /** @class */
733
- function(_super) {
734
- __extends(NoopObservableGaugeMetric2, _super);
735
- function NoopObservableGaugeMetric2() {
736
- return _super !== null && _super.apply(this, arguments) || this;
737
- }
738
- return NoopObservableGaugeMetric2;
739
- }(NoopObservableMetric);
740
- NoopObservableUpDownCounterMetric = /** @class */
741
- function(_super) {
742
- __extends(NoopObservableUpDownCounterMetric2, _super);
743
- function NoopObservableUpDownCounterMetric2() {
744
- return _super !== null && _super.apply(this, arguments) || this;
745
- }
746
- return NoopObservableUpDownCounterMetric2;
747
- }(NoopObservableMetric);
748
- NOOP_METER = new NoopMeter();
749
- NOOP_COUNTER_METRIC = new NoopCounterMetric();
750
- NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();
751
- NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();
752
- NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric();
753
- NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric();
754
- NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric();
755
- }
756
- });
757
-
758
- // node_modules/@opentelemetry/api/build/esm/metrics/Metric.js
759
- var ValueType;
760
- var init_Metric = __esm({
761
- "node_modules/@opentelemetry/api/build/esm/metrics/Metric.js"() {
762
- (function(ValueType2) {
763
- ValueType2[ValueType2["INT"] = 0] = "INT";
764
- ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
765
- })(ValueType || (ValueType = {}));
766
- }
767
- });
768
-
769
- // node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js
770
- var defaultTextMapGetter, defaultTextMapSetter;
771
- var init_TextMapPropagator = __esm({
772
- "node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js"() {
773
- defaultTextMapGetter = {
774
- get: function(carrier, key) {
775
- if (carrier == null) {
776
- return void 0;
777
- }
778
- return carrier[key];
779
- },
780
- keys: function(carrier) {
781
- if (carrier == null) {
782
- return [];
783
- }
784
- return Object.keys(carrier);
785
- }
786
- };
787
- defaultTextMapSetter = {
788
- set: function(carrier, key, value) {
789
- if (carrier == null) {
790
- return;
791
- }
792
- carrier[key] = value;
793
- }
794
- };
795
- }
796
- });
797
-
798
- // node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js
799
- var __read4, __spreadArray3, NoopContextManager;
800
- var init_NoopContextManager = __esm({
801
- "node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js"() {
802
- init_context();
803
- __read4 = function(o, n) {
804
- var m = typeof Symbol === "function" && o[Symbol.iterator];
805
- if (!m)
806
- return o;
807
- var i = m.call(o), r, ar = [], e;
808
- try {
809
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
810
- ar.push(r.value);
811
- } catch (error) {
812
- e = { error };
813
- } finally {
814
- try {
815
- if (r && !r.done && (m = i["return"]))
816
- m.call(i);
817
- } finally {
818
- if (e)
819
- throw e.error;
820
- }
821
- }
822
- return ar;
823
- };
824
- __spreadArray3 = function(to, from, pack) {
825
- if (pack || arguments.length === 2)
826
- for (var i = 0, l = from.length, ar; i < l; i++) {
827
- if (ar || !(i in from)) {
828
- if (!ar)
829
- ar = Array.prototype.slice.call(from, 0, i);
830
- ar[i] = from[i];
831
- }
832
- }
833
- return to.concat(ar || Array.prototype.slice.call(from));
834
- };
835
- NoopContextManager = /** @class */
836
- function() {
837
- function NoopContextManager2() {
838
- }
839
- NoopContextManager2.prototype.active = function() {
840
- return ROOT_CONTEXT;
841
- };
842
- NoopContextManager2.prototype.with = function(_context, fn, thisArg) {
843
- var args = [];
844
- for (var _i = 3; _i < arguments.length; _i++) {
845
- args[_i - 3] = arguments[_i];
846
- }
847
- return fn.call.apply(fn, __spreadArray3([thisArg], __read4(args), false));
848
- };
849
- NoopContextManager2.prototype.bind = function(_context, target) {
850
- return target;
851
- };
852
- NoopContextManager2.prototype.enable = function() {
853
- return this;
854
- };
855
- NoopContextManager2.prototype.disable = function() {
856
- return this;
857
- };
858
- return NoopContextManager2;
859
- }();
860
- }
861
- });
862
-
863
- // node_modules/@opentelemetry/api/build/esm/api/context.js
864
- var __read5, __spreadArray4, API_NAME2, NOOP_CONTEXT_MANAGER, ContextAPI;
865
- var init_context2 = __esm({
866
- "node_modules/@opentelemetry/api/build/esm/api/context.js"() {
867
- init_NoopContextManager();
868
- init_global_utils();
869
- init_diag();
870
- __read5 = function(o, n) {
871
- var m = typeof Symbol === "function" && o[Symbol.iterator];
872
- if (!m)
873
- return o;
874
- var i = m.call(o), r, ar = [], e;
875
- try {
876
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
877
- ar.push(r.value);
878
- } catch (error) {
879
- e = { error };
880
- } finally {
881
- try {
882
- if (r && !r.done && (m = i["return"]))
883
- m.call(i);
884
- } finally {
885
- if (e)
886
- throw e.error;
887
- }
888
- }
889
- return ar;
890
- };
891
- __spreadArray4 = function(to, from, pack) {
892
- if (pack || arguments.length === 2)
893
- for (var i = 0, l = from.length, ar; i < l; i++) {
894
- if (ar || !(i in from)) {
895
- if (!ar)
896
- ar = Array.prototype.slice.call(from, 0, i);
897
- ar[i] = from[i];
898
- }
899
- }
900
- return to.concat(ar || Array.prototype.slice.call(from));
901
- };
902
- API_NAME2 = "context";
903
- NOOP_CONTEXT_MANAGER = new NoopContextManager();
904
- ContextAPI = /** @class */
905
- function() {
906
- function ContextAPI2() {
907
- }
908
- ContextAPI2.getInstance = function() {
909
- if (!this._instance) {
910
- this._instance = new ContextAPI2();
911
- }
912
- return this._instance;
913
- };
914
- ContextAPI2.prototype.setGlobalContextManager = function(contextManager) {
915
- return registerGlobal(API_NAME2, contextManager, DiagAPI.instance());
916
- };
917
- ContextAPI2.prototype.active = function() {
918
- return this._getContextManager().active();
919
- };
920
- ContextAPI2.prototype.with = function(context2, fn, thisArg) {
921
- var _a;
922
- var args = [];
923
- for (var _i = 3; _i < arguments.length; _i++) {
924
- args[_i - 3] = arguments[_i];
925
- }
926
- return (_a = this._getContextManager()).with.apply(_a, __spreadArray4([context2, fn, thisArg], __read5(args), false));
927
- };
928
- ContextAPI2.prototype.bind = function(context2, target) {
929
- return this._getContextManager().bind(context2, target);
930
- };
931
- ContextAPI2.prototype._getContextManager = function() {
932
- return getGlobal(API_NAME2) || NOOP_CONTEXT_MANAGER;
933
- };
934
- ContextAPI2.prototype.disable = function() {
935
- this._getContextManager().disable();
936
- unregisterGlobal(API_NAME2, DiagAPI.instance());
937
- };
938
- return ContextAPI2;
939
- }();
940
- }
941
- });
942
-
943
- // node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js
944
- var TraceFlags;
945
- var init_trace_flags = __esm({
946
- "node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js"() {
947
- (function(TraceFlags2) {
948
- TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
949
- TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
950
- })(TraceFlags || (TraceFlags = {}));
951
- }
952
- });
953
-
954
- // node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js
955
- var INVALID_SPANID, INVALID_TRACEID, INVALID_SPAN_CONTEXT;
956
- var init_invalid_span_constants = __esm({
957
- "node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js"() {
958
- init_trace_flags();
959
- INVALID_SPANID = "0000000000000000";
960
- INVALID_TRACEID = "00000000000000000000000000000000";
961
- INVALID_SPAN_CONTEXT = {
962
- traceId: INVALID_TRACEID,
963
- spanId: INVALID_SPANID,
964
- traceFlags: TraceFlags.NONE
965
- };
966
- }
967
- });
968
-
969
- // node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js
970
- var NonRecordingSpan;
971
- var init_NonRecordingSpan = __esm({
972
- "node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js"() {
973
- init_invalid_span_constants();
974
- NonRecordingSpan = /** @class */
975
- function() {
976
- function NonRecordingSpan2(_spanContext) {
977
- if (_spanContext === void 0) {
978
- _spanContext = INVALID_SPAN_CONTEXT;
979
- }
980
- this._spanContext = _spanContext;
981
- }
982
- NonRecordingSpan2.prototype.spanContext = function() {
983
- return this._spanContext;
984
- };
985
- NonRecordingSpan2.prototype.setAttribute = function(_key, _value) {
986
- return this;
987
- };
988
- NonRecordingSpan2.prototype.setAttributes = function(_attributes) {
989
- return this;
990
- };
991
- NonRecordingSpan2.prototype.addEvent = function(_name, _attributes) {
992
- return this;
993
- };
994
- NonRecordingSpan2.prototype.setStatus = function(_status) {
995
- return this;
996
- };
997
- NonRecordingSpan2.prototype.updateName = function(_name) {
998
- return this;
999
- };
1000
- NonRecordingSpan2.prototype.end = function(_endTime) {
1001
- };
1002
- NonRecordingSpan2.prototype.isRecording = function() {
1003
- return false;
1004
- };
1005
- NonRecordingSpan2.prototype.recordException = function(_exception, _time) {
1006
- };
1007
- return NonRecordingSpan2;
1008
- }();
1009
- }
1010
- });
1011
-
1012
- // node_modules/@opentelemetry/api/build/esm/trace/context-utils.js
1013
- function getSpan(context2) {
1014
- return context2.getValue(SPAN_KEY) || void 0;
1015
- }
1016
- function getActiveSpan() {
1017
- return getSpan(ContextAPI.getInstance().active());
1018
- }
1019
- function setSpan(context2, span) {
1020
- return context2.setValue(SPAN_KEY, span);
1021
- }
1022
- function deleteSpan(context2) {
1023
- return context2.deleteValue(SPAN_KEY);
1024
- }
1025
- function setSpanContext(context2, spanContext) {
1026
- return setSpan(context2, new NonRecordingSpan(spanContext));
1027
- }
1028
- function getSpanContext(context2) {
1029
- var _a;
1030
- return (_a = getSpan(context2)) === null || _a === void 0 ? void 0 : _a.spanContext();
1031
- }
1032
- var SPAN_KEY;
1033
- var init_context_utils = __esm({
1034
- "node_modules/@opentelemetry/api/build/esm/trace/context-utils.js"() {
1035
- init_context();
1036
- init_NonRecordingSpan();
1037
- init_context2();
1038
- SPAN_KEY = createContextKey("OpenTelemetry Context Key SPAN");
1039
- }
1040
- });
1041
-
1042
- // node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js
1043
- function isValidTraceId(traceId) {
1044
- return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;
1045
- }
1046
- function isValidSpanId(spanId) {
1047
- return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;
1048
- }
1049
- function isSpanContextValid(spanContext) {
1050
- return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
1051
- }
1052
- function wrapSpanContext(spanContext) {
1053
- return new NonRecordingSpan(spanContext);
1054
- }
1055
- var VALID_TRACEID_REGEX, VALID_SPANID_REGEX;
1056
- var init_spancontext_utils = __esm({
1057
- "node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js"() {
1058
- init_invalid_span_constants();
1059
- init_NonRecordingSpan();
1060
- VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;
1061
- VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;
1062
- }
1063
- });
1064
-
1065
- // node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js
1066
- function isSpanContext(spanContext) {
1067
- return typeof spanContext === "object" && typeof spanContext["spanId"] === "string" && typeof spanContext["traceId"] === "string" && typeof spanContext["traceFlags"] === "number";
1068
- }
1069
- var contextApi, NoopTracer;
1070
- var init_NoopTracer = __esm({
1071
- "node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js"() {
1072
- init_context2();
1073
- init_context_utils();
1074
- init_NonRecordingSpan();
1075
- init_spancontext_utils();
1076
- contextApi = ContextAPI.getInstance();
1077
- NoopTracer = /** @class */
1078
- function() {
1079
- function NoopTracer2() {
1080
- }
1081
- NoopTracer2.prototype.startSpan = function(name2, options, context2) {
1082
- if (context2 === void 0) {
1083
- context2 = contextApi.active();
1084
- }
1085
- var root = Boolean(options === null || options === void 0 ? void 0 : options.root);
1086
- if (root) {
1087
- return new NonRecordingSpan();
1088
- }
1089
- var parentFromContext = context2 && getSpanContext(context2);
1090
- if (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext)) {
1091
- return new NonRecordingSpan(parentFromContext);
1092
- } else {
1093
- return new NonRecordingSpan();
1094
- }
1095
- };
1096
- NoopTracer2.prototype.startActiveSpan = function(name2, arg2, arg3, arg4) {
1097
- var opts;
1098
- var ctx;
1099
- var fn;
1100
- if (arguments.length < 2) {
1101
- return;
1102
- } else if (arguments.length === 2) {
1103
- fn = arg2;
1104
- } else if (arguments.length === 3) {
1105
- opts = arg2;
1106
- fn = arg3;
1107
- } else {
1108
- opts = arg2;
1109
- ctx = arg3;
1110
- fn = arg4;
1111
- }
1112
- var parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
1113
- var span = this.startSpan(name2, opts, parentContext);
1114
- var contextWithSpanSet = setSpan(parentContext, span);
1115
- return contextApi.with(contextWithSpanSet, fn, void 0, span);
1116
- };
1117
- return NoopTracer2;
1118
- }();
1119
- }
1120
- });
1121
-
1122
- // node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js
1123
- var NOOP_TRACER, ProxyTracer;
1124
- var init_ProxyTracer = __esm({
1125
- "node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js"() {
1126
- init_NoopTracer();
1127
- NOOP_TRACER = new NoopTracer();
1128
- ProxyTracer = /** @class */
1129
- function() {
1130
- function ProxyTracer2(_provider, name2, version2, options) {
1131
- this._provider = _provider;
1132
- this.name = name2;
1133
- this.version = version2;
1134
- this.options = options;
1135
- }
1136
- ProxyTracer2.prototype.startSpan = function(name2, options, context2) {
1137
- return this._getTracer().startSpan(name2, options, context2);
1138
- };
1139
- ProxyTracer2.prototype.startActiveSpan = function(_name, _options, _context, _fn) {
1140
- var tracer = this._getTracer();
1141
- return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
1142
- };
1143
- ProxyTracer2.prototype._getTracer = function() {
1144
- if (this._delegate) {
1145
- return this._delegate;
1146
- }
1147
- var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
1148
- if (!tracer) {
1149
- return NOOP_TRACER;
1150
- }
1151
- this._delegate = tracer;
1152
- return this._delegate;
1153
- };
1154
- return ProxyTracer2;
1155
- }();
1156
- }
1157
- });
1158
-
1159
- // node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js
1160
- var NoopTracerProvider;
1161
- var init_NoopTracerProvider = __esm({
1162
- "node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js"() {
1163
- init_NoopTracer();
1164
- NoopTracerProvider = /** @class */
1165
- function() {
1166
- function NoopTracerProvider2() {
1167
- }
1168
- NoopTracerProvider2.prototype.getTracer = function(_name, _version, _options) {
1169
- return new NoopTracer();
1170
- };
1171
- return NoopTracerProvider2;
1172
- }();
1173
- }
1174
- });
1175
-
1176
- // node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js
1177
- var NOOP_TRACER_PROVIDER, ProxyTracerProvider;
1178
- var init_ProxyTracerProvider = __esm({
1179
- "node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js"() {
1180
- init_ProxyTracer();
1181
- init_NoopTracerProvider();
1182
- NOOP_TRACER_PROVIDER = new NoopTracerProvider();
1183
- ProxyTracerProvider = /** @class */
1184
- function() {
1185
- function ProxyTracerProvider2() {
1186
- }
1187
- ProxyTracerProvider2.prototype.getTracer = function(name2, version2, options) {
1188
- var _a;
1189
- return (_a = this.getDelegateTracer(name2, version2, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name2, version2, options);
1190
- };
1191
- ProxyTracerProvider2.prototype.getDelegate = function() {
1192
- var _a;
1193
- return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;
1194
- };
1195
- ProxyTracerProvider2.prototype.setDelegate = function(delegate) {
1196
- this._delegate = delegate;
1197
- };
1198
- ProxyTracerProvider2.prototype.getDelegateTracer = function(name2, version2, options) {
1199
- var _a;
1200
- return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name2, version2, options);
1201
- };
1202
- return ProxyTracerProvider2;
1203
- }();
1204
- }
1205
- });
1206
-
1207
- // node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js
1208
- var SamplingDecision;
1209
- var init_SamplingResult = __esm({
1210
- "node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js"() {
1211
- (function(SamplingDecision2) {
1212
- SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
1213
- SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
1214
- SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
1215
- })(SamplingDecision || (SamplingDecision = {}));
1216
- }
1217
- });
1218
-
1219
- // node_modules/@opentelemetry/api/build/esm/trace/span_kind.js
1220
- var SpanKind;
1221
- var init_span_kind = __esm({
1222
- "node_modules/@opentelemetry/api/build/esm/trace/span_kind.js"() {
1223
- (function(SpanKind2) {
1224
- SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
1225
- SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
1226
- SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
1227
- SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
1228
- SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
1229
- })(SpanKind || (SpanKind = {}));
1230
- }
1231
- });
1232
-
1233
- // node_modules/@opentelemetry/api/build/esm/trace/status.js
1234
- var SpanStatusCode;
1235
- var init_status = __esm({
1236
- "node_modules/@opentelemetry/api/build/esm/trace/status.js"() {
1237
- (function(SpanStatusCode2) {
1238
- SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
1239
- SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
1240
- SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
1241
- })(SpanStatusCode || (SpanStatusCode = {}));
1242
- }
1243
- });
1244
-
1245
- // node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.js
1246
- function validateKey(key) {
1247
- return VALID_KEY_REGEX.test(key);
1248
- }
1249
- function validateValue(value) {
1250
- return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
1251
- }
1252
- var VALID_KEY_CHAR_RANGE, VALID_KEY, VALID_VENDOR_KEY, VALID_KEY_REGEX, VALID_VALUE_BASE_REGEX, INVALID_VALUE_COMMA_EQUAL_REGEX;
1253
- var init_tracestate_validators = __esm({
1254
- "node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.js"() {
1255
- VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
1256
- VALID_KEY = "[a-z]" + VALID_KEY_CHAR_RANGE + "{0,255}";
1257
- VALID_VENDOR_KEY = "[a-z0-9]" + VALID_KEY_CHAR_RANGE + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE + "{0,13}";
1258
- VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$");
1259
- VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
1260
- INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
1261
- }
1262
- });
1263
-
1264
- // node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.js
1265
- var MAX_TRACE_STATE_ITEMS, MAX_TRACE_STATE_LEN, LIST_MEMBERS_SEPARATOR, LIST_MEMBER_KEY_VALUE_SPLITTER, TraceStateImpl;
1266
- var init_tracestate_impl = __esm({
1267
- "node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.js"() {
1268
- init_tracestate_validators();
1269
- MAX_TRACE_STATE_ITEMS = 32;
1270
- MAX_TRACE_STATE_LEN = 512;
1271
- LIST_MEMBERS_SEPARATOR = ",";
1272
- LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
1273
- TraceStateImpl = /** @class */
1274
- function() {
1275
- function TraceStateImpl2(rawTraceState) {
1276
- this._internalState = /* @__PURE__ */ new Map();
1277
- if (rawTraceState)
1278
- this._parse(rawTraceState);
1279
- }
1280
- TraceStateImpl2.prototype.set = function(key, value) {
1281
- var traceState = this._clone();
1282
- if (traceState._internalState.has(key)) {
1283
- traceState._internalState.delete(key);
1284
- }
1285
- traceState._internalState.set(key, value);
1286
- return traceState;
1287
- };
1288
- TraceStateImpl2.prototype.unset = function(key) {
1289
- var traceState = this._clone();
1290
- traceState._internalState.delete(key);
1291
- return traceState;
1292
- };
1293
- TraceStateImpl2.prototype.get = function(key) {
1294
- return this._internalState.get(key);
1295
- };
1296
- TraceStateImpl2.prototype.serialize = function() {
1297
- var _this = this;
1298
- return this._keys().reduce(function(agg, key) {
1299
- agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key));
1300
- return agg;
1301
- }, []).join(LIST_MEMBERS_SEPARATOR);
1302
- };
1303
- TraceStateImpl2.prototype._parse = function(rawTraceState) {
1304
- if (rawTraceState.length > MAX_TRACE_STATE_LEN)
1305
- return;
1306
- this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reverse().reduce(function(agg, part) {
1307
- var listMember = part.trim();
1308
- var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
1309
- if (i !== -1) {
1310
- var key = listMember.slice(0, i);
1311
- var value = listMember.slice(i + 1, part.length);
1312
- if (validateKey(key) && validateValue(value)) {
1313
- agg.set(key, value);
1314
- } else {
1315
- }
1316
- }
1317
- return agg;
1318
- }, /* @__PURE__ */ new Map());
1319
- if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
1320
- this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
1321
- }
1322
- };
1323
- TraceStateImpl2.prototype._keys = function() {
1324
- return Array.from(this._internalState.keys()).reverse();
1325
- };
1326
- TraceStateImpl2.prototype._clone = function() {
1327
- var traceState = new TraceStateImpl2();
1328
- traceState._internalState = new Map(this._internalState);
1329
- return traceState;
1330
- };
1331
- return TraceStateImpl2;
1332
- }();
1333
- }
1334
- });
1335
-
1336
- // node_modules/@opentelemetry/api/build/esm/trace/internal/utils.js
1337
- function createTraceState(rawTraceState) {
1338
- return new TraceStateImpl(rawTraceState);
1339
- }
1340
- var init_utils2 = __esm({
1341
- "node_modules/@opentelemetry/api/build/esm/trace/internal/utils.js"() {
1342
- init_tracestate_impl();
1343
- }
1344
- });
1345
-
1346
- // node_modules/@opentelemetry/api/build/esm/context-api.js
1347
- var context;
1348
- var init_context_api = __esm({
1349
- "node_modules/@opentelemetry/api/build/esm/context-api.js"() {
1350
- init_context2();
1351
- context = ContextAPI.getInstance();
1352
- }
1353
- });
1354
-
1355
- // node_modules/@opentelemetry/api/build/esm/diag-api.js
1356
- var diag2;
1357
- var init_diag_api = __esm({
1358
- "node_modules/@opentelemetry/api/build/esm/diag-api.js"() {
1359
- init_diag();
1360
- diag2 = DiagAPI.instance();
1361
- }
1362
- });
1363
-
1364
- // node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.js
1365
- var NoopMeterProvider, NOOP_METER_PROVIDER;
1366
- var init_NoopMeterProvider = __esm({
1367
- "node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.js"() {
1368
- init_NoopMeter();
1369
- NoopMeterProvider = /** @class */
1370
- function() {
1371
- function NoopMeterProvider2() {
1372
- }
1373
- NoopMeterProvider2.prototype.getMeter = function(_name, _version, _options) {
1374
- return NOOP_METER;
1375
- };
1376
- return NoopMeterProvider2;
1377
- }();
1378
- NOOP_METER_PROVIDER = new NoopMeterProvider();
1379
- }
1380
- });
1381
-
1382
- // node_modules/@opentelemetry/api/build/esm/api/metrics.js
1383
- var API_NAME3, MetricsAPI;
1384
- var init_metrics = __esm({
1385
- "node_modules/@opentelemetry/api/build/esm/api/metrics.js"() {
1386
- init_NoopMeterProvider();
1387
- init_global_utils();
1388
- init_diag();
1389
- API_NAME3 = "metrics";
1390
- MetricsAPI = /** @class */
1391
- function() {
1392
- function MetricsAPI2() {
1393
- }
1394
- MetricsAPI2.getInstance = function() {
1395
- if (!this._instance) {
1396
- this._instance = new MetricsAPI2();
1397
- }
1398
- return this._instance;
1399
- };
1400
- MetricsAPI2.prototype.setGlobalMeterProvider = function(provider) {
1401
- return registerGlobal(API_NAME3, provider, DiagAPI.instance());
1402
- };
1403
- MetricsAPI2.prototype.getMeterProvider = function() {
1404
- return getGlobal(API_NAME3) || NOOP_METER_PROVIDER;
1405
- };
1406
- MetricsAPI2.prototype.getMeter = function(name2, version2, options) {
1407
- return this.getMeterProvider().getMeter(name2, version2, options);
1408
- };
1409
- MetricsAPI2.prototype.disable = function() {
1410
- unregisterGlobal(API_NAME3, DiagAPI.instance());
1411
- };
1412
- return MetricsAPI2;
1413
- }();
1414
- }
1415
- });
1416
-
1417
- // node_modules/@opentelemetry/api/build/esm/metrics-api.js
1418
- var metrics;
1419
- var init_metrics_api = __esm({
1420
- "node_modules/@opentelemetry/api/build/esm/metrics-api.js"() {
1421
- init_metrics();
1422
- metrics = MetricsAPI.getInstance();
1423
- }
1424
- });
1425
-
1426
- // node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js
1427
- var NoopTextMapPropagator;
1428
- var init_NoopTextMapPropagator = __esm({
1429
- "node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js"() {
1430
- NoopTextMapPropagator = /** @class */
1431
- function() {
1432
- function NoopTextMapPropagator2() {
1433
- }
1434
- NoopTextMapPropagator2.prototype.inject = function(_context, _carrier) {
1435
- };
1436
- NoopTextMapPropagator2.prototype.extract = function(context2, _carrier) {
1437
- return context2;
1438
- };
1439
- NoopTextMapPropagator2.prototype.fields = function() {
1440
- return [];
1441
- };
1442
- return NoopTextMapPropagator2;
1443
- }();
1444
- }
1445
- });
1446
-
1447
- // node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js
1448
- function getBaggage(context2) {
1449
- return context2.getValue(BAGGAGE_KEY) || void 0;
1450
- }
1451
- function getActiveBaggage() {
1452
- return getBaggage(ContextAPI.getInstance().active());
1453
- }
1454
- function setBaggage(context2, baggage) {
1455
- return context2.setValue(BAGGAGE_KEY, baggage);
1456
- }
1457
- function deleteBaggage(context2) {
1458
- return context2.deleteValue(BAGGAGE_KEY);
1459
- }
1460
- var BAGGAGE_KEY;
1461
- var init_context_helpers = __esm({
1462
- "node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js"() {
1463
- init_context2();
1464
- init_context();
1465
- BAGGAGE_KEY = createContextKey("OpenTelemetry Baggage Key");
1466
- }
1467
- });
1468
-
1469
- // node_modules/@opentelemetry/api/build/esm/api/propagation.js
1470
- var API_NAME4, NOOP_TEXT_MAP_PROPAGATOR, PropagationAPI;
1471
- var init_propagation = __esm({
1472
- "node_modules/@opentelemetry/api/build/esm/api/propagation.js"() {
1473
- init_global_utils();
1474
- init_NoopTextMapPropagator();
1475
- init_TextMapPropagator();
1476
- init_context_helpers();
1477
- init_utils();
1478
- init_diag();
1479
- API_NAME4 = "propagation";
1480
- NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator();
1481
- PropagationAPI = /** @class */
1482
- function() {
1483
- function PropagationAPI2() {
1484
- this.createBaggage = createBaggage;
1485
- this.getBaggage = getBaggage;
1486
- this.getActiveBaggage = getActiveBaggage;
1487
- this.setBaggage = setBaggage;
1488
- this.deleteBaggage = deleteBaggage;
1489
- }
1490
- PropagationAPI2.getInstance = function() {
1491
- if (!this._instance) {
1492
- this._instance = new PropagationAPI2();
1493
- }
1494
- return this._instance;
1495
- };
1496
- PropagationAPI2.prototype.setGlobalPropagator = function(propagator) {
1497
- return registerGlobal(API_NAME4, propagator, DiagAPI.instance());
1498
- };
1499
- PropagationAPI2.prototype.inject = function(context2, carrier, setter) {
1500
- if (setter === void 0) {
1501
- setter = defaultTextMapSetter;
1502
- }
1503
- return this._getGlobalPropagator().inject(context2, carrier, setter);
1504
- };
1505
- PropagationAPI2.prototype.extract = function(context2, carrier, getter) {
1506
- if (getter === void 0) {
1507
- getter = defaultTextMapGetter;
1508
- }
1509
- return this._getGlobalPropagator().extract(context2, carrier, getter);
1510
- };
1511
- PropagationAPI2.prototype.fields = function() {
1512
- return this._getGlobalPropagator().fields();
1513
- };
1514
- PropagationAPI2.prototype.disable = function() {
1515
- unregisterGlobal(API_NAME4, DiagAPI.instance());
1516
- };
1517
- PropagationAPI2.prototype._getGlobalPropagator = function() {
1518
- return getGlobal(API_NAME4) || NOOP_TEXT_MAP_PROPAGATOR;
1519
- };
1520
- return PropagationAPI2;
1521
- }();
1522
- }
1523
- });
1524
-
1525
- // node_modules/@opentelemetry/api/build/esm/propagation-api.js
1526
- var propagation;
1527
- var init_propagation_api = __esm({
1528
- "node_modules/@opentelemetry/api/build/esm/propagation-api.js"() {
1529
- init_propagation();
1530
- propagation = PropagationAPI.getInstance();
1531
- }
1532
- });
1533
-
1534
- // node_modules/@opentelemetry/api/build/esm/api/trace.js
1535
- var API_NAME5, TraceAPI;
1536
- var init_trace = __esm({
1537
- "node_modules/@opentelemetry/api/build/esm/api/trace.js"() {
1538
- init_global_utils();
1539
- init_ProxyTracerProvider();
1540
- init_spancontext_utils();
1541
- init_context_utils();
1542
- init_diag();
1543
- API_NAME5 = "trace";
1544
- TraceAPI = /** @class */
1545
- function() {
1546
- function TraceAPI2() {
1547
- this._proxyTracerProvider = new ProxyTracerProvider();
1548
- this.wrapSpanContext = wrapSpanContext;
1549
- this.isSpanContextValid = isSpanContextValid;
1550
- this.deleteSpan = deleteSpan;
1551
- this.getSpan = getSpan;
1552
- this.getActiveSpan = getActiveSpan;
1553
- this.getSpanContext = getSpanContext;
1554
- this.setSpan = setSpan;
1555
- this.setSpanContext = setSpanContext;
1556
- }
1557
- TraceAPI2.getInstance = function() {
1558
- if (!this._instance) {
1559
- this._instance = new TraceAPI2();
1560
- }
1561
- return this._instance;
1562
- };
1563
- TraceAPI2.prototype.setGlobalTracerProvider = function(provider) {
1564
- var success = registerGlobal(API_NAME5, this._proxyTracerProvider, DiagAPI.instance());
1565
- if (success) {
1566
- this._proxyTracerProvider.setDelegate(provider);
1567
- }
1568
- return success;
1569
- };
1570
- TraceAPI2.prototype.getTracerProvider = function() {
1571
- return getGlobal(API_NAME5) || this._proxyTracerProvider;
1572
- };
1573
- TraceAPI2.prototype.getTracer = function(name2, version2) {
1574
- return this.getTracerProvider().getTracer(name2, version2);
1575
- };
1576
- TraceAPI2.prototype.disable = function() {
1577
- unregisterGlobal(API_NAME5, DiagAPI.instance());
1578
- this._proxyTracerProvider = new ProxyTracerProvider();
1579
- };
1580
- return TraceAPI2;
1581
- }();
1582
- }
1583
- });
1584
-
1585
- // node_modules/@opentelemetry/api/build/esm/trace-api.js
1586
- var trace;
1587
- var init_trace_api = __esm({
1588
- "node_modules/@opentelemetry/api/build/esm/trace-api.js"() {
1589
- init_trace();
1590
- trace = TraceAPI.getInstance();
1591
- }
1592
- });
1593
-
1594
- // node_modules/@opentelemetry/api/build/esm/index.js
1595
- var esm_exports = {};
1596
- __export(esm_exports, {
1597
- DiagConsoleLogger: () => DiagConsoleLogger,
1598
- DiagLogLevel: () => DiagLogLevel,
1599
- INVALID_SPANID: () => INVALID_SPANID,
1600
- INVALID_SPAN_CONTEXT: () => INVALID_SPAN_CONTEXT,
1601
- INVALID_TRACEID: () => INVALID_TRACEID,
1602
- ProxyTracer: () => ProxyTracer,
1603
- ProxyTracerProvider: () => ProxyTracerProvider,
1604
- ROOT_CONTEXT: () => ROOT_CONTEXT,
1605
- SamplingDecision: () => SamplingDecision,
1606
- SpanKind: () => SpanKind,
1607
- SpanStatusCode: () => SpanStatusCode,
1608
- TraceFlags: () => TraceFlags,
1609
- ValueType: () => ValueType,
1610
- baggageEntryMetadataFromString: () => baggageEntryMetadataFromString,
1611
- context: () => context,
1612
- createContextKey: () => createContextKey,
1613
- createNoopMeter: () => createNoopMeter,
1614
- createTraceState: () => createTraceState,
1615
- default: () => esm_default,
1616
- defaultTextMapGetter: () => defaultTextMapGetter,
1617
- defaultTextMapSetter: () => defaultTextMapSetter,
1618
- diag: () => diag2,
1619
- isSpanContextValid: () => isSpanContextValid,
1620
- isValidSpanId: () => isValidSpanId,
1621
- isValidTraceId: () => isValidTraceId,
1622
- metrics: () => metrics,
1623
- propagation: () => propagation,
1624
- trace: () => trace
1625
- });
1626
- var esm_default;
1627
- var init_esm = __esm({
1628
- "node_modules/@opentelemetry/api/build/esm/index.js"() {
1629
- init_utils();
1630
- init_context();
1631
- init_consoleLogger();
1632
- init_types();
1633
- init_NoopMeter();
1634
- init_Metric();
1635
- init_TextMapPropagator();
1636
- init_ProxyTracer();
1637
- init_ProxyTracerProvider();
1638
- init_SamplingResult();
1639
- init_span_kind();
1640
- init_status();
1641
- init_trace_flags();
1642
- init_utils2();
1643
- init_spancontext_utils();
1644
- init_invalid_span_constants();
1645
- init_context_api();
1646
- init_diag_api();
1647
- init_metrics_api();
1648
- init_propagation_api();
1649
- init_trace_api();
1650
- esm_default = {
1651
- context,
1652
- diag: diag2,
1653
- metrics,
1654
- propagation,
1655
- trace
1656
- };
1657
- }
1658
- });
1659
-
1660
23
  // node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js
1661
24
  var require_suppress_tracing = __commonJS({
1662
25
  "node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js"(exports2) {
@@ -1665,16 +28,16 @@ var require_suppress_tracing = __commonJS({
1665
28
  exports2.isTracingSuppressed = exports2.unsuppressTracing = exports2.suppressTracing = void 0;
1666
29
  var api_1 = (init_esm(), __toCommonJS(esm_exports));
1667
30
  var SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
1668
- function suppressTracing(context2) {
1669
- return context2.setValue(SUPPRESS_TRACING_KEY, true);
31
+ function suppressTracing(context) {
32
+ return context.setValue(SUPPRESS_TRACING_KEY, true);
1670
33
  }
1671
34
  exports2.suppressTracing = suppressTracing;
1672
- function unsuppressTracing(context2) {
1673
- return context2.deleteValue(SUPPRESS_TRACING_KEY);
35
+ function unsuppressTracing(context) {
36
+ return context.deleteValue(SUPPRESS_TRACING_KEY);
1674
37
  }
1675
38
  exports2.unsuppressTracing = unsuppressTracing;
1676
- function isTracingSuppressed(context2) {
1677
- return context2.getValue(SUPPRESS_TRACING_KEY) === true;
39
+ function isTracingSuppressed(context) {
40
+ return context.getValue(SUPPRESS_TRACING_KEY) === true;
1678
41
  }
1679
42
  exports2.isTracingSuppressed = isTracingSuppressed;
1680
43
  }
@@ -1765,9 +128,9 @@ var require_W3CBaggagePropagator = __commonJS({
1765
128
  var constants_1 = require_constants();
1766
129
  var utils_1 = require_utils();
1767
130
  var W3CBaggagePropagator = class {
1768
- inject(context2, carrier, setter) {
1769
- const baggage = api_1.propagation.getBaggage(context2);
1770
- if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context2))
131
+ inject(context, carrier, setter) {
132
+ const baggage = api_1.propagation.getBaggage(context);
133
+ if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context))
1771
134
  return;
1772
135
  const keyPairs = (0, utils_1.getKeyPairs)(baggage).filter((pair) => {
1773
136
  return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;
@@ -1777,14 +140,14 @@ var require_W3CBaggagePropagator = __commonJS({
1777
140
  setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue);
1778
141
  }
1779
142
  }
1780
- extract(context2, carrier, getter) {
143
+ extract(context, carrier, getter) {
1781
144
  const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER);
1782
145
  const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue;
1783
146
  if (!baggageString)
1784
- return context2;
147
+ return context;
1785
148
  const baggage = {};
1786
149
  if (baggageString.length === 0) {
1787
- return context2;
150
+ return context;
1788
151
  }
1789
152
  const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR);
1790
153
  pairs.forEach((entry) => {
@@ -1798,9 +161,9 @@ var require_W3CBaggagePropagator = __commonJS({
1798
161
  }
1799
162
  });
1800
163
  if (Object.entries(baggage).length === 0) {
1801
- return context2;
164
+ return context;
1802
165
  }
1803
- return api_1.propagation.setBaggage(context2, api_1.propagation.createBaggage(baggage));
166
+ return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage));
1804
167
  }
1805
168
  fields() {
1806
169
  return [constants_1.BAGGAGE_HEADER];
@@ -3912,10 +2275,10 @@ var require_composite = __commonJS({
3912
2275
  * @param context Context to inject
3913
2276
  * @param carrier Carrier into which context will be injected
3914
2277
  */
3915
- inject(context2, carrier, setter) {
2278
+ inject(context, carrier, setter) {
3916
2279
  for (const propagator of this._propagators) {
3917
2280
  try {
3918
- propagator.inject(context2, carrier, setter);
2281
+ propagator.inject(context, carrier, setter);
3919
2282
  } catch (err) {
3920
2283
  api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);
3921
2284
  }
@@ -3930,7 +2293,7 @@ var require_composite = __commonJS({
3930
2293
  * @param context Context to add values to
3931
2294
  * @param carrier Carrier from which to extract context
3932
2295
  */
3933
- extract(context2, carrier, getter) {
2296
+ extract(context, carrier, getter) {
3934
2297
  return this._propagators.reduce((ctx, propagator) => {
3935
2298
  try {
3936
2299
  return propagator.extract(ctx, carrier, getter);
@@ -3938,7 +2301,7 @@ var require_composite = __commonJS({
3938
2301
  api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);
3939
2302
  }
3940
2303
  return ctx;
3941
- }, context2);
2304
+ }, context);
3942
2305
  }
3943
2306
  fields() {
3944
2307
  return this._fields.slice();
@@ -3954,20 +2317,20 @@ var require_validators = __commonJS({
3954
2317
  "use strict";
3955
2318
  Object.defineProperty(exports2, "__esModule", { value: true });
3956
2319
  exports2.validateValue = exports2.validateKey = void 0;
3957
- var VALID_KEY_CHAR_RANGE2 = "[_0-9a-z-*/]";
3958
- var VALID_KEY2 = `[a-z]${VALID_KEY_CHAR_RANGE2}{0,255}`;
3959
- var VALID_VENDOR_KEY2 = `[a-z0-9]${VALID_KEY_CHAR_RANGE2}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE2}{0,13}`;
3960
- var VALID_KEY_REGEX2 = new RegExp(`^(?:${VALID_KEY2}|${VALID_VENDOR_KEY2})$`);
3961
- var VALID_VALUE_BASE_REGEX2 = /^[ -~]{0,255}[!-~]$/;
3962
- var INVALID_VALUE_COMMA_EQUAL_REGEX2 = /,|=/;
3963
- function validateKey2(key) {
3964
- return VALID_KEY_REGEX2.test(key);
2320
+ var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
2321
+ var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
2322
+ var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
2323
+ var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
2324
+ var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
2325
+ var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
2326
+ function validateKey(key) {
2327
+ return VALID_KEY_REGEX.test(key);
3965
2328
  }
3966
- exports2.validateKey = validateKey2;
3967
- function validateValue2(value) {
3968
- return VALID_VALUE_BASE_REGEX2.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX2.test(value);
2329
+ exports2.validateKey = validateKey;
2330
+ function validateValue(value) {
2331
+ return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
3969
2332
  }
3970
- exports2.validateValue = validateValue2;
2333
+ exports2.validateValue = validateValue;
3971
2334
  }
3972
2335
  });
3973
2336
 
@@ -3978,10 +2341,10 @@ var require_TraceState = __commonJS({
3978
2341
  Object.defineProperty(exports2, "__esModule", { value: true });
3979
2342
  exports2.TraceState = void 0;
3980
2343
  var validators_1 = require_validators();
3981
- var MAX_TRACE_STATE_ITEMS2 = 32;
3982
- var MAX_TRACE_STATE_LEN2 = 512;
3983
- var LIST_MEMBERS_SEPARATOR2 = ",";
3984
- var LIST_MEMBER_KEY_VALUE_SPLITTER2 = "=";
2344
+ var MAX_TRACE_STATE_ITEMS = 32;
2345
+ var MAX_TRACE_STATE_LEN = 512;
2346
+ var LIST_MEMBERS_SEPARATOR = ",";
2347
+ var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
3985
2348
  var TraceState = class _TraceState {
3986
2349
  constructor(rawTraceState) {
3987
2350
  this._internalState = /* @__PURE__ */ new Map();
@@ -4006,16 +2369,16 @@ var require_TraceState = __commonJS({
4006
2369
  }
4007
2370
  serialize() {
4008
2371
  return this._keys().reduce((agg, key) => {
4009
- agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER2 + this.get(key));
2372
+ agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
4010
2373
  return agg;
4011
- }, []).join(LIST_MEMBERS_SEPARATOR2);
2374
+ }, []).join(LIST_MEMBERS_SEPARATOR);
4012
2375
  }
4013
2376
  _parse(rawTraceState) {
4014
- if (rawTraceState.length > MAX_TRACE_STATE_LEN2)
2377
+ if (rawTraceState.length > MAX_TRACE_STATE_LEN)
4015
2378
  return;
4016
- this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR2).reverse().reduce((agg, part) => {
2379
+ this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reverse().reduce((agg, part) => {
4017
2380
  const listMember = part.trim();
4018
- const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER2);
2381
+ const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
4019
2382
  if (i !== -1) {
4020
2383
  const key = listMember.slice(0, i);
4021
2384
  const value = listMember.slice(i + 1, part.length);
@@ -4026,8 +2389,8 @@ var require_TraceState = __commonJS({
4026
2389
  }
4027
2390
  return agg;
4028
2391
  }, /* @__PURE__ */ new Map());
4029
- if (this._internalState.size > MAX_TRACE_STATE_ITEMS2) {
4030
- this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS2));
2392
+ if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
2393
+ this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
4031
2394
  }
4032
2395
  }
4033
2396
  _keys() {
@@ -4054,7 +2417,7 @@ var require_W3CTraceContextPropagator = __commonJS({
4054
2417
  var TraceState_1 = require_TraceState();
4055
2418
  exports2.TRACE_PARENT_HEADER = "traceparent";
4056
2419
  exports2.TRACE_STATE_HEADER = "tracestate";
4057
- var VERSION2 = "00";
2420
+ var VERSION = "00";
4058
2421
  var VERSION_PART = "(?!ff)[\\da-f]{2}";
4059
2422
  var TRACE_ID_PART = "(?![0]{32})[\\da-f]{32}";
4060
2423
  var PARENT_ID_PART = "(?![0]{16})[\\da-f]{16}";
@@ -4074,33 +2437,33 @@ var require_W3CTraceContextPropagator = __commonJS({
4074
2437
  }
4075
2438
  exports2.parseTraceParent = parseTraceParent;
4076
2439
  var W3CTraceContextPropagator = class {
4077
- inject(context2, carrier, setter) {
4078
- const spanContext = api_1.trace.getSpanContext(context2);
4079
- if (!spanContext || (0, suppress_tracing_1.isTracingSuppressed)(context2) || !(0, api_1.isSpanContextValid)(spanContext))
2440
+ inject(context, carrier, setter) {
2441
+ const spanContext = api_1.trace.getSpanContext(context);
2442
+ if (!spanContext || (0, suppress_tracing_1.isTracingSuppressed)(context) || !(0, api_1.isSpanContextValid)(spanContext))
4080
2443
  return;
4081
- const traceParent = `${VERSION2}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;
2444
+ const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;
4082
2445
  setter.set(carrier, exports2.TRACE_PARENT_HEADER, traceParent);
4083
2446
  if (spanContext.traceState) {
4084
2447
  setter.set(carrier, exports2.TRACE_STATE_HEADER, spanContext.traceState.serialize());
4085
2448
  }
4086
2449
  }
4087
- extract(context2, carrier, getter) {
2450
+ extract(context, carrier, getter) {
4088
2451
  const traceParentHeader = getter.get(carrier, exports2.TRACE_PARENT_HEADER);
4089
2452
  if (!traceParentHeader)
4090
- return context2;
2453
+ return context;
4091
2454
  const traceParent = Array.isArray(traceParentHeader) ? traceParentHeader[0] : traceParentHeader;
4092
2455
  if (typeof traceParent !== "string")
4093
- return context2;
2456
+ return context;
4094
2457
  const spanContext = parseTraceParent(traceParent);
4095
2458
  if (!spanContext)
4096
- return context2;
2459
+ return context;
4097
2460
  spanContext.isRemote = true;
4098
2461
  const traceStateHeader = getter.get(carrier, exports2.TRACE_STATE_HEADER);
4099
2462
  if (traceStateHeader) {
4100
2463
  const state = Array.isArray(traceStateHeader) ? traceStateHeader.join(",") : traceStateHeader;
4101
2464
  spanContext.traceState = new TraceState_1.TraceState(typeof state === "string" ? state : void 0);
4102
2465
  }
4103
- return api_1.trace.setSpanContext(context2, spanContext);
2466
+ return api_1.trace.setSpanContext(context, spanContext);
4104
2467
  }
4105
2468
  fields() {
4106
2469
  return [exports2.TRACE_PARENT_HEADER, exports2.TRACE_STATE_HEADER];
@@ -4130,16 +2493,16 @@ var require_rpc_metadata = __commonJS({
4130
2493
  (function(RPCType2) {
4131
2494
  RPCType2["HTTP"] = "http";
4132
2495
  })(RPCType = exports2.RPCType || (exports2.RPCType = {}));
4133
- function setRPCMetadata(context2, meta) {
4134
- return context2.setValue(RPC_METADATA_KEY, meta);
2496
+ function setRPCMetadata(context, meta) {
2497
+ return context.setValue(RPC_METADATA_KEY, meta);
4135
2498
  }
4136
2499
  exports2.setRPCMetadata = setRPCMetadata;
4137
- function deleteRPCMetadata(context2) {
4138
- return context2.deleteValue(RPC_METADATA_KEY);
2500
+ function deleteRPCMetadata(context) {
2501
+ return context.deleteValue(RPC_METADATA_KEY);
4139
2502
  }
4140
2503
  exports2.deleteRPCMetadata = deleteRPCMetadata;
4141
- function getRPCMetadata(context2) {
4142
- return context2.getValue(RPC_METADATA_KEY);
2504
+ function getRPCMetadata(context) {
2505
+ return context.getValue(RPC_METADATA_KEY);
4143
2506
  }
4144
2507
  exports2.getRPCMetadata = getRPCMetadata;
4145
2508
  }
@@ -4210,21 +2573,21 @@ var require_ParentBasedSampler = __commonJS({
4210
2573
  this._localParentSampled = (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler();
4211
2574
  this._localParentNotSampled = (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler();
4212
2575
  }
4213
- shouldSample(context2, traceId, spanName, spanKind, attributes, links) {
4214
- const parentContext = api_1.trace.getSpanContext(context2);
2576
+ shouldSample(context, traceId, spanName, spanKind, attributes, links) {
2577
+ const parentContext = api_1.trace.getSpanContext(context);
4215
2578
  if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {
4216
- return this._root.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
2579
+ return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);
4217
2580
  }
4218
2581
  if (parentContext.isRemote) {
4219
2582
  if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
4220
- return this._remoteParentSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
2583
+ return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
4221
2584
  }
4222
- return this._remoteParentNotSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
2585
+ return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
4223
2586
  }
4224
2587
  if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
4225
- return this._localParentSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
2588
+ return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
4226
2589
  }
4227
- return this._localParentNotSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
2590
+ return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
4228
2591
  }
4229
2592
  toString() {
4230
2593
  return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;
@@ -4247,7 +2610,7 @@ var require_TraceIdRatioBasedSampler = __commonJS({
4247
2610
  this._ratio = this._normalize(_ratio);
4248
2611
  this._upperBound = Math.floor(this._ratio * 4294967295);
4249
2612
  }
4250
- shouldSample(context2, traceId) {
2613
+ shouldSample(context, traceId) {
4251
2614
  return {
4252
2615
  decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound ? api_1.SamplingDecision.RECORD_AND_SAMPLED : api_1.SamplingDecision.NOT_RECORD
4253
2616
  };
@@ -7528,12 +5891,12 @@ var require_InMemoryMetricExporter = __commonJS({
7528
5891
  /**
7529
5892
  * @inheritedDoc
7530
5893
  */
7531
- export(metrics2, resultCallback) {
5894
+ export(metrics, resultCallback) {
7532
5895
  if (this._shutdown) {
7533
5896
  setTimeout(() => resultCallback({ code: core_1.ExportResultCode.FAILED }), 0);
7534
5897
  return;
7535
5898
  }
7536
- this._metrics.push(metrics2);
5899
+ this._metrics.push(metrics);
7537
5900
  setTimeout(() => resultCallback({ code: core_1.ExportResultCode.SUCCESS }), 0);
7538
5901
  }
7539
5902
  /**
@@ -7575,12 +5938,12 @@ var require_ConsoleMetricExporter = __commonJS({
7575
5938
  this._shutdown = false;
7576
5939
  this._temporalitySelector = (_a = options === null || options === void 0 ? void 0 : options.temporalitySelector) !== null && _a !== void 0 ? _a : AggregationSelector_1.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;
7577
5940
  }
7578
- export(metrics2, resultCallback) {
5941
+ export(metrics, resultCallback) {
7579
5942
  if (this._shutdown) {
7580
5943
  setImmediate(resultCallback, { code: core_1.ExportResultCode.FAILED });
7581
5944
  return;
7582
5945
  }
7583
- return _ConsoleMetricExporter._sendMetrics(metrics2, resultCallback);
5946
+ return _ConsoleMetricExporter._sendMetrics(metrics, resultCallback);
7584
5947
  }
7585
5948
  forceFlush() {
7586
5949
  return Promise.resolve();
@@ -7592,8 +5955,8 @@ var require_ConsoleMetricExporter = __commonJS({
7592
5955
  this._shutdown = true;
7593
5956
  return Promise.resolve();
7594
5957
  }
7595
- static _sendMetrics(metrics2, done) {
7596
- for (const scopeMetrics of metrics2.scopeMetrics) {
5958
+ static _sendMetrics(metrics, done) {
5959
+ for (const scopeMetrics of metrics.scopeMetrics) {
7597
5960
  for (const metric of scopeMetrics.metrics) {
7598
5961
  console.dir({
7599
5962
  descriptor: metric.descriptor,
@@ -8517,7 +6880,7 @@ var require_Instruments = __commonJS({
8517
6880
  this._writableMetricStorage = _writableMetricStorage;
8518
6881
  this._descriptor = _descriptor;
8519
6882
  }
8520
- _record(value, attributes = {}, context2 = api_1.context.active()) {
6883
+ _record(value, attributes = {}, context = api_1.context.active()) {
8521
6884
  if (typeof value !== "number") {
8522
6885
  api_1.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${value}`);
8523
6886
  return;
@@ -8529,7 +6892,7 @@ var require_Instruments = __commonJS({
8529
6892
  return;
8530
6893
  }
8531
6894
  }
8532
- this._writableMetricStorage.record(value, attributes, context2, (0, core_1.millisToHrTime)(Date.now()));
6895
+ this._writableMetricStorage.record(value, attributes, context, (0, core_1.millisToHrTime)(Date.now()));
8533
6896
  }
8534
6897
  };
8535
6898
  exports2.SyncInstrument = SyncInstrument;
@@ -9162,9 +7525,9 @@ var require_MultiWritableMetricStorage = __commonJS({
9162
7525
  constructor(_backingStorages) {
9163
7526
  this._backingStorages = _backingStorages;
9164
7527
  }
9165
- record(value, attributes, context2, recordTime) {
7528
+ record(value, attributes, context, recordTime) {
9166
7529
  this._backingStorages.forEach((it) => {
9167
- it.record(value, attributes, context2, recordTime);
7530
+ it.record(value, attributes, context, recordTime);
9168
7531
  });
9169
7532
  }
9170
7533
  };
@@ -9365,9 +7728,9 @@ var require_SyncMetricStorage = __commonJS({
9365
7728
  this._deltaMetricStorage = new DeltaMetricProcessor_1.DeltaMetricProcessor(aggregator);
9366
7729
  this._temporalMetricStorage = new TemporalMetricProcessor_1.TemporalMetricProcessor(aggregator, collectorHandles);
9367
7730
  }
9368
- record(value, attributes, context2, recordTime) {
9369
- attributes = this._attributesProcessor.process(attributes, context2);
9370
- this._deltaMetricStorage.record(value, attributes, context2, recordTime);
7731
+ record(value, attributes, context, recordTime) {
7732
+ attributes = this._attributesProcessor.process(attributes, context);
7733
+ this._deltaMetricStorage.record(value, attributes, context, recordTime);
9371
7734
  }
9372
7735
  /**
9373
7736
  * Collects the metrics from this storage.
@@ -10003,13 +8366,13 @@ var require_internal3 = __commonJS({
10003
8366
  }
10004
8367
  exports2.toResourceMetrics = toResourceMetrics;
10005
8368
  function toScopeMetrics(scopeMetrics, encoder) {
10006
- return Array.from(scopeMetrics.map((metrics2) => ({
8369
+ return Array.from(scopeMetrics.map((metrics) => ({
10007
8370
  scope: {
10008
- name: metrics2.scope.name,
10009
- version: metrics2.scope.version
8371
+ name: metrics.scope.name,
8372
+ version: metrics.scope.version
10010
8373
  },
10011
- metrics: metrics2.metrics.map((metricData) => toMetric(metricData, encoder)),
10012
- schemaUrl: metrics2.scope.schemaUrl
8374
+ metrics: metrics.metrics.map((metricData) => toMetric(metricData, encoder)),
8375
+ schemaUrl: metrics.scope.schemaUrl
10013
8376
  })));
10014
8377
  }
10015
8378
  exports2.toScopeMetrics = toScopeMetrics;
@@ -10130,7 +8493,7 @@ var require_metrics = __commonJS({
10130
8493
  var internal_1 = require_internal3();
10131
8494
  function createExportMetricsServiceRequest(resourceMetrics, options) {
10132
8495
  return {
10133
- resourceMetrics: resourceMetrics.map((metrics2) => (0, internal_1.toResourceMetrics)(metrics2, options))
8496
+ resourceMetrics: resourceMetrics.map((metrics) => (0, internal_1.toResourceMetrics)(metrics, options))
10134
8497
  };
10135
8498
  }
10136
8499
  exports2.createExportMetricsServiceRequest = createExportMetricsServiceRequest;
@@ -10644,12 +9007,12 @@ var require_LogRecord2 = __commonJS({
10644
9007
  this.attributes = {};
10645
9008
  this.totalAttributesCount = 0;
10646
9009
  this._isReadonly = false;
10647
- const { timestamp, observedTimestamp, severityNumber, severityText, body, attributes = {}, context: context2 } = logRecord;
9010
+ const { timestamp, observedTimestamp, severityNumber, severityText, body, attributes = {}, context } = logRecord;
10648
9011
  const now = Date.now();
10649
9012
  this.hrTime = (0, core_1.timeInputToHrTime)(timestamp !== null && timestamp !== void 0 ? timestamp : now);
10650
9013
  this.hrTimeObserved = (0, core_1.timeInputToHrTime)(observedTimestamp !== null && observedTimestamp !== void 0 ? observedTimestamp : now);
10651
- if (context2) {
10652
- const spanContext = api.trace.getSpanContext(context2);
9014
+ if (context) {
9015
+ const spanContext = api.trace.getSpanContext(context);
10653
9016
  if (spanContext && api.isSpanContextValid(spanContext)) {
10654
9017
  this.spanContext = spanContext;
10655
9018
  }
@@ -10851,8 +9214,8 @@ var require_MultiLogRecordProcessor = __commonJS({
10851
9214
  const timeout = this.forceFlushTimeoutMillis;
10852
9215
  await Promise.all(this.processors.map((processor) => (0, core_1.callWithTimeout)(processor.forceFlush(), timeout)));
10853
9216
  }
10854
- onEmit(logRecord, context2) {
10855
- this.processors.forEach((processors) => processors.onEmit(logRecord, context2));
9217
+ onEmit(logRecord, context) {
9218
+ this.processors.forEach((processors) => processors.onEmit(logRecord, context));
10856
9219
  }
10857
9220
  async shutdown() {
10858
9221
  await Promise.all(this.processors.map((processor) => processor.shutdown()));
@@ -11355,19 +9718,19 @@ var require_AbstractAsyncHooksContextManager = __commonJS({
11355
9718
  * @param target a function or event emitter. When target or one of its callbacks is called,
11356
9719
  * the provided context will be used as the active context for the duration of the call.
11357
9720
  */
11358
- bind(context2, target) {
9721
+ bind(context, target) {
11359
9722
  if (target instanceof events_1.EventEmitter) {
11360
- return this._bindEventEmitter(context2, target);
9723
+ return this._bindEventEmitter(context, target);
11361
9724
  }
11362
9725
  if (typeof target === "function") {
11363
- return this._bindFunction(context2, target);
9726
+ return this._bindFunction(context, target);
11364
9727
  }
11365
9728
  return target;
11366
9729
  }
11367
- _bindFunction(context2, target) {
9730
+ _bindFunction(context, target) {
11368
9731
  const manager = this;
11369
9732
  const contextWrapper = function(...args) {
11370
- return manager.with(context2, () => target.apply(this, args));
9733
+ return manager.with(context, () => target.apply(this, args));
11371
9734
  };
11372
9735
  Object.defineProperty(contextWrapper, "length", {
11373
9736
  enumerable: false,
@@ -11384,7 +9747,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS({
11384
9747
  * @param context the context we want to bind
11385
9748
  * @param ee EventEmitter an instance of EventEmitter to patch
11386
9749
  */
11387
- _bindEventEmitter(context2, ee) {
9750
+ _bindEventEmitter(context, ee) {
11388
9751
  const map = this._getPatchMap(ee);
11389
9752
  if (map !== void 0)
11390
9753
  return ee;
@@ -11392,7 +9755,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS({
11392
9755
  ADD_LISTENER_METHODS.forEach((methodName) => {
11393
9756
  if (ee[methodName] === void 0)
11394
9757
  return;
11395
- ee[methodName] = this._patchAddListener(ee, ee[methodName], context2);
9758
+ ee[methodName] = this._patchAddListener(ee, ee[methodName], context);
11396
9759
  });
11397
9760
  if (typeof ee.removeListener === "function") {
11398
9761
  ee.removeListener = this._patchRemoveListener(ee, ee.removeListener);
@@ -11450,7 +9813,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS({
11450
9813
  * @param original reference to the patched method
11451
9814
  * @param [context] context to propagate when calling listeners
11452
9815
  */
11453
- _patchAddListener(ee, original, context2) {
9816
+ _patchAddListener(ee, original, context) {
11454
9817
  const contextManager = this;
11455
9818
  return function(event, listener) {
11456
9819
  if (contextManager._wrapped) {
@@ -11465,7 +9828,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS({
11465
9828
  listeners = /* @__PURE__ */ new WeakMap();
11466
9829
  map[event] = listeners;
11467
9830
  }
11468
- const patchedListener = contextManager.bind(context2, listener);
9831
+ const patchedListener = contextManager.bind(context, listener);
11469
9832
  listeners.set(listener, patchedListener);
11470
9833
  contextManager._wrapped = true;
11471
9834
  try {
@@ -11514,8 +9877,8 @@ var require_AsyncHooksContextManager = __commonJS({
11514
9877
  var _a;
11515
9878
  return (_a = this._stack[this._stack.length - 1]) !== null && _a !== void 0 ? _a : api_1.ROOT_CONTEXT;
11516
9879
  }
11517
- with(context2, fn, thisArg, ...args) {
11518
- this._enterContext(context2);
9880
+ with(context, fn, thisArg, ...args) {
9881
+ this._enterContext(context);
11519
9882
  try {
11520
9883
  return fn.call(thisArg, ...args);
11521
9884
  } finally {
@@ -11541,9 +9904,9 @@ var require_AsyncHooksContextManager = __commonJS({
11541
9904
  _init(uid, type) {
11542
9905
  if (type === "TIMERWRAP")
11543
9906
  return;
11544
- const context2 = this._stack[this._stack.length - 1];
11545
- if (context2 !== void 0) {
11546
- this._contexts.set(uid, context2);
9907
+ const context = this._stack[this._stack.length - 1];
9908
+ if (context !== void 0) {
9909
+ this._contexts.set(uid, context);
11547
9910
  }
11548
9911
  }
11549
9912
  /**
@@ -11559,9 +9922,9 @@ var require_AsyncHooksContextManager = __commonJS({
11559
9922
  * @param uid uid of the async context
11560
9923
  */
11561
9924
  _before(uid) {
11562
- const context2 = this._contexts.get(uid);
11563
- if (context2 !== void 0) {
11564
- this._enterContext(context2);
9925
+ const context = this._contexts.get(uid);
9926
+ if (context !== void 0) {
9927
+ this._enterContext(context);
11565
9928
  }
11566
9929
  }
11567
9930
  /**
@@ -11573,8 +9936,8 @@ var require_AsyncHooksContextManager = __commonJS({
11573
9936
  /**
11574
9937
  * Set the given context as active
11575
9938
  */
11576
- _enterContext(context2) {
11577
- this._stack.push(context2);
9939
+ _enterContext(context) {
9940
+ this._stack.push(context);
11578
9941
  }
11579
9942
  /**
11580
9943
  * Remove the context at the root of the stack
@@ -11605,9 +9968,9 @@ var require_AsyncLocalStorageContextManager = __commonJS({
11605
9968
  var _a;
11606
9969
  return (_a = this._asyncLocalStorage.getStore()) !== null && _a !== void 0 ? _a : api_1.ROOT_CONTEXT;
11607
9970
  }
11608
- with(context2, fn, thisArg, ...args) {
9971
+ with(context, fn, thisArg, ...args) {
11609
9972
  const cb = thisArg == null ? fn : fn.bind(thisArg);
11610
- return this._asyncLocalStorage.run(context2, cb, ...args);
9973
+ return this._asyncLocalStorage.run(context, cb, ...args);
11611
9974
  }
11612
9975
  enable() {
11613
9976
  return this;
@@ -11725,11 +10088,11 @@ var require_B3MultiPropagator = __commonJS({
11725
10088
  return;
11726
10089
  }
11727
10090
  var B3MultiPropagator = class {
11728
- inject(context2, carrier, setter) {
11729
- const spanContext = api_1.trace.getSpanContext(context2);
11730
- if (!spanContext || !(0, api_1.isSpanContextValid)(spanContext) || (0, core_1.isTracingSuppressed)(context2))
10091
+ inject(context, carrier, setter) {
10092
+ const spanContext = api_1.trace.getSpanContext(context);
10093
+ if (!spanContext || !(0, api_1.isSpanContextValid)(spanContext) || (0, core_1.isTracingSuppressed)(context))
11731
10094
  return;
11732
- const debug = context2.getValue(common_1.B3_DEBUG_FLAG_KEY);
10095
+ const debug = context.getValue(common_1.B3_DEBUG_FLAG_KEY);
11733
10096
  setter.set(carrier, constants_1.X_B3_TRACE_ID, spanContext.traceId);
11734
10097
  setter.set(carrier, constants_1.X_B3_SPAN_ID, spanContext.spanId);
11735
10098
  if (debug === "1") {
@@ -11738,21 +10101,21 @@ var require_B3MultiPropagator = __commonJS({
11738
10101
  setter.set(carrier, constants_1.X_B3_SAMPLED, (api_1.TraceFlags.SAMPLED & spanContext.traceFlags) === api_1.TraceFlags.SAMPLED ? "1" : "0");
11739
10102
  }
11740
10103
  }
11741
- extract(context2, carrier, getter) {
10104
+ extract(context, carrier, getter) {
11742
10105
  const traceId = getTraceId(carrier, getter);
11743
10106
  const spanId = getSpanId(carrier, getter);
11744
10107
  const traceFlags = getTraceFlags(carrier, getter);
11745
10108
  const debug = getDebug(carrier, getter);
11746
10109
  if ((0, api_1.isValidTraceId)(traceId) && (0, api_1.isValidSpanId)(spanId) && isValidSampledValue(traceFlags)) {
11747
- context2 = context2.setValue(common_1.B3_DEBUG_FLAG_KEY, debug);
11748
- return api_1.trace.setSpanContext(context2, {
10110
+ context = context.setValue(common_1.B3_DEBUG_FLAG_KEY, debug);
10111
+ return api_1.trace.setSpanContext(context, {
11749
10112
  traceId,
11750
10113
  spanId,
11751
10114
  isRemote: true,
11752
10115
  traceFlags
11753
10116
  });
11754
10117
  }
11755
- return context2;
10118
+ return context;
11756
10119
  }
11757
10120
  fields() {
11758
10121
  return [
@@ -11792,31 +10155,31 @@ var require_B3SinglePropagator = __commonJS({
11792
10155
  return api_1.TraceFlags.NONE;
11793
10156
  }
11794
10157
  var B3SinglePropagator = class {
11795
- inject(context2, carrier, setter) {
11796
- const spanContext = api_1.trace.getSpanContext(context2);
11797
- if (!spanContext || !(0, api_1.isSpanContextValid)(spanContext) || (0, core_1.isTracingSuppressed)(context2))
10158
+ inject(context, carrier, setter) {
10159
+ const spanContext = api_1.trace.getSpanContext(context);
10160
+ if (!spanContext || !(0, api_1.isSpanContextValid)(spanContext) || (0, core_1.isTracingSuppressed)(context))
11798
10161
  return;
11799
- const samplingState = context2.getValue(common_1.B3_DEBUG_FLAG_KEY) || spanContext.traceFlags & 1;
10162
+ const samplingState = context.getValue(common_1.B3_DEBUG_FLAG_KEY) || spanContext.traceFlags & 1;
11800
10163
  const value = `${spanContext.traceId}-${spanContext.spanId}-${samplingState}`;
11801
10164
  setter.set(carrier, constants_1.B3_CONTEXT_HEADER, value);
11802
10165
  }
11803
- extract(context2, carrier, getter) {
10166
+ extract(context, carrier, getter) {
11804
10167
  const header = getter.get(carrier, constants_1.B3_CONTEXT_HEADER);
11805
10168
  const b3Context = Array.isArray(header) ? header[0] : header;
11806
10169
  if (typeof b3Context !== "string")
11807
- return context2;
10170
+ return context;
11808
10171
  const match = b3Context.match(B3_CONTEXT_REGEX);
11809
10172
  if (!match)
11810
- return context2;
10173
+ return context;
11811
10174
  const [, extractedTraceId, spanId, samplingState] = match;
11812
10175
  const traceId = convertToTraceId128(extractedTraceId);
11813
10176
  if (!(0, api_1.isValidTraceId)(traceId) || !(0, api_1.isValidSpanId)(spanId))
11814
- return context2;
10177
+ return context;
11815
10178
  const traceFlags = convertToTraceFlags(samplingState);
11816
10179
  if (samplingState === DEBUG_STATE) {
11817
- context2 = context2.setValue(common_1.B3_DEBUG_FLAG_KEY, samplingState);
10180
+ context = context.setValue(common_1.B3_DEBUG_FLAG_KEY, samplingState);
11818
10181
  }
11819
- return api_1.trace.setSpanContext(context2, {
10182
+ return api_1.trace.setSpanContext(context, {
11820
10183
  traceId,
11821
10184
  spanId,
11822
10185
  isRemote: true,
@@ -11868,19 +10231,19 @@ var require_B3Propagator = __commonJS({
11868
10231
  this._fields = this._b3SinglePropagator.fields();
11869
10232
  }
11870
10233
  }
11871
- inject(context2, carrier, setter) {
11872
- if ((0, core_1.isTracingSuppressed)(context2)) {
10234
+ inject(context, carrier, setter) {
10235
+ if ((0, core_1.isTracingSuppressed)(context)) {
11873
10236
  return;
11874
10237
  }
11875
- this._inject(context2, carrier, setter);
10238
+ this._inject(context, carrier, setter);
11876
10239
  }
11877
- extract(context2, carrier, getter) {
10240
+ extract(context, carrier, getter) {
11878
10241
  const header = getter.get(carrier, constants_1.B3_CONTEXT_HEADER);
11879
10242
  const b3Context = Array.isArray(header) ? header[0] : header;
11880
10243
  if (b3Context) {
11881
- return this._b3SinglePropagator.extract(context2, carrier, getter);
10244
+ return this._b3SinglePropagator.extract(context, carrier, getter);
11882
10245
  } else {
11883
- return this._b3MultiPropagator.extract(context2, carrier, getter);
10246
+ return this._b3MultiPropagator.extract(context, carrier, getter);
11884
10247
  }
11885
10248
  }
11886
10249
  fields() {
@@ -11944,7 +10307,7 @@ var require_Span = __commonJS({
11944
10307
  *
11945
10308
  * @deprecated calling Span constructor directly is not supported. Please use tracer.startSpan.
11946
10309
  * */
11947
- constructor(parentTracer, context2, spanName, spanContext, kind, parentSpanId, links = [], startTime, _deprecatedClock, attributes) {
10310
+ constructor(parentTracer, context, spanName, spanContext, kind, parentSpanId, links = [], startTime, _deprecatedClock, attributes) {
11948
10311
  this.attributes = {};
11949
10312
  this.links = [];
11950
10313
  this.events = [];
@@ -11975,7 +10338,7 @@ var require_Span = __commonJS({
11975
10338
  this.setAttributes(attributes);
11976
10339
  }
11977
10340
  this._spanProcessor = parentTracer.getActiveSpanProcessor();
11978
- this._spanProcessor.onStart(this, context2);
10341
+ this._spanProcessor.onStart(this, context);
11979
10342
  }
11980
10343
  spanContext() {
11981
10344
  return this._spanContext;
@@ -12183,12 +10546,12 @@ var require_Sampler = __commonJS({
12183
10546
  "use strict";
12184
10547
  Object.defineProperty(exports2, "__esModule", { value: true });
12185
10548
  exports2.SamplingDecision = void 0;
12186
- var SamplingDecision2;
12187
- (function(SamplingDecision3) {
12188
- SamplingDecision3[SamplingDecision3["NOT_RECORD"] = 0] = "NOT_RECORD";
12189
- SamplingDecision3[SamplingDecision3["RECORD"] = 1] = "RECORD";
12190
- SamplingDecision3[SamplingDecision3["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
12191
- })(SamplingDecision2 = exports2.SamplingDecision || (exports2.SamplingDecision = {}));
10549
+ var SamplingDecision;
10550
+ (function(SamplingDecision2) {
10551
+ SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
10552
+ SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
10553
+ SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
10554
+ })(SamplingDecision = exports2.SamplingDecision || (exports2.SamplingDecision = {}));
12192
10555
  }
12193
10556
  });
12194
10557
 
@@ -12257,21 +10620,21 @@ var require_ParentBasedSampler2 = __commonJS({
12257
10620
  this._localParentSampled = (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler();
12258
10621
  this._localParentNotSampled = (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler();
12259
10622
  }
12260
- shouldSample(context2, traceId, spanName, spanKind, attributes, links) {
12261
- const parentContext = api_1.trace.getSpanContext(context2);
10623
+ shouldSample(context, traceId, spanName, spanKind, attributes, links) {
10624
+ const parentContext = api_1.trace.getSpanContext(context);
12262
10625
  if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {
12263
- return this._root.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
10626
+ return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);
12264
10627
  }
12265
10628
  if (parentContext.isRemote) {
12266
10629
  if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
12267
- return this._remoteParentSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
10630
+ return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
12268
10631
  }
12269
- return this._remoteParentNotSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
10632
+ return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
12270
10633
  }
12271
10634
  if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
12272
- return this._localParentSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
10635
+ return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
12273
10636
  }
12274
- return this._localParentNotSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
10637
+ return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
12275
10638
  }
12276
10639
  toString() {
12277
10640
  return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;
@@ -12295,7 +10658,7 @@ var require_TraceIdRatioBasedSampler2 = __commonJS({
12295
10658
  this._ratio = this._normalize(_ratio);
12296
10659
  this._upperBound = Math.floor(this._ratio * 4294967295);
12297
10660
  }
12298
- shouldSample(context2, traceId) {
10661
+ shouldSample(context, traceId) {
12299
10662
  return {
12300
10663
  decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound ? Sampler_1.SamplingDecision.RECORD_AND_SAMPLED : Sampler_1.SamplingDecision.NOT_RECORD
12301
10664
  };
@@ -12719,13 +11082,13 @@ var require_Tracer = __commonJS({
12719
11082
  * Starts a new Span or returns the default NoopSpan based on the sampling
12720
11083
  * decision.
12721
11084
  */
12722
- startSpan(name2, options = {}, context2 = api.context.active()) {
11085
+ startSpan(name2, options = {}, context = api.context.active()) {
12723
11086
  var _a, _b, _c;
12724
11087
  if (options.root) {
12725
- context2 = api.trace.deleteSpan(context2);
11088
+ context = api.trace.deleteSpan(context);
12726
11089
  }
12727
- const parentSpan = api.trace.getSpan(context2);
12728
- if ((0, core_1.isTracingSuppressed)(context2)) {
11090
+ const parentSpan = api.trace.getSpan(context);
11091
+ if ((0, core_1.isTracingSuppressed)(context)) {
12729
11092
  api.diag.debug("Instrumentation suppressed, returning Noop Span");
12730
11093
  const nonRecordingSpan = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);
12731
11094
  return nonRecordingSpan;
@@ -12750,7 +11113,7 @@ var require_Tracer = __commonJS({
12750
11113
  };
12751
11114
  });
12752
11115
  const attributes = (0, core_1.sanitizeAttributes)(options.attributes);
12753
- const samplingResult = this._sampler.shouldSample(context2, traceId, name2, spanKind, attributes, links);
11116
+ const samplingResult = this._sampler.shouldSample(context, traceId, name2, spanKind, attributes, links);
12754
11117
  traceState = (_c = samplingResult.traceState) !== null && _c !== void 0 ? _c : traceState;
12755
11118
  const traceFlags = samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED ? api.TraceFlags.SAMPLED : api.TraceFlags.NONE;
12756
11119
  const spanContext = { traceId, spanId, traceFlags, traceState };
@@ -12760,7 +11123,7 @@ var require_Tracer = __commonJS({
12760
11123
  return nonRecordingSpan;
12761
11124
  }
12762
11125
  const initAttributes = (0, core_1.sanitizeAttributes)(Object.assign(attributes, samplingResult.attributes));
12763
- const span = new Span_1.Span(this, context2, name2, spanContext, spanKind, parentSpanId, links, options.startTime, void 0, initAttributes);
11126
+ const span = new Span_1.Span(this, context, name2, spanContext, spanKind, parentSpanId, links, options.startTime, void 0, initAttributes);
12764
11127
  return span;
12765
11128
  }
12766
11129
  startActiveSpan(name2, arg2, arg3, arg4) {
@@ -12825,9 +11188,9 @@ var require_MultiSpanProcessor = __commonJS({
12825
11188
  });
12826
11189
  });
12827
11190
  }
12828
- onStart(span, context2) {
11191
+ onStart(span, context) {
12829
11192
  for (const spanProcessor of this._spanProcessors) {
12830
- spanProcessor.onStart(span, context2);
11193
+ spanProcessor.onStart(span, context);
12831
11194
  }
12832
11195
  }
12833
11196
  onEnd(span) {
@@ -13335,10 +11698,10 @@ var require_JaegerPropagator = __commonJS({
13335
11698
  this._jaegerBaggageHeaderPrefix = (config === null || config === void 0 ? void 0 : config.customBaggageHeaderPrefix) || exports2.UBER_BAGGAGE_HEADER_PREFIX;
13336
11699
  }
13337
11700
  }
13338
- inject(context2, carrier, setter) {
13339
- const spanContext = api_1.trace.getSpanContext(context2);
13340
- const baggage = api_1.propagation.getBaggage(context2);
13341
- if (spanContext && (0, core_1.isTracingSuppressed)(context2) === false) {
11701
+ inject(context, carrier, setter) {
11702
+ const spanContext = api_1.trace.getSpanContext(context);
11703
+ const baggage = api_1.propagation.getBaggage(context);
11704
+ if (spanContext && (0, core_1.isTracingSuppressed)(context) === false) {
13342
11705
  const traceFlags = `0${(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;
13343
11706
  setter.set(carrier, this._jaegerTraceHeader, `${spanContext.traceId}:${spanContext.spanId}:0:${traceFlags}`);
13344
11707
  }
@@ -13348,7 +11711,7 @@ var require_JaegerPropagator = __commonJS({
13348
11711
  }
13349
11712
  }
13350
11713
  }
13351
- extract(context2, carrier, getter) {
11714
+ extract(context, carrier, getter) {
13352
11715
  var _a;
13353
11716
  const uberTraceIdHeader = getter.get(carrier, this._jaegerTraceHeader);
13354
11717
  const uberTraceId = Array.isArray(uberTraceIdHeader) ? uberTraceIdHeader[0] : uberTraceIdHeader;
@@ -13359,7 +11722,7 @@ var require_JaegerPropagator = __commonJS({
13359
11722
  value: Array.isArray(value) ? value[0] : value
13360
11723
  };
13361
11724
  });
13362
- let newContext = context2;
11725
+ let newContext = context;
13363
11726
  if (typeof uberTraceId === "string") {
13364
11727
  const spanContext = deserializeSpanContext(uberTraceId);
13365
11728
  if (spanContext) {
@@ -13368,7 +11731,7 @@ var require_JaegerPropagator = __commonJS({
13368
11731
  }
13369
11732
  if (baggageValues.length === 0)
13370
11733
  return newContext;
13371
- let currentBaggage = (_a = api_1.propagation.getBaggage(context2)) !== null && _a !== void 0 ? _a : api_1.propagation.createBaggage();
11734
+ let currentBaggage = (_a = api_1.propagation.getBaggage(context)) !== null && _a !== void 0 ? _a : api_1.propagation.createBaggage();
13372
11735
  for (const baggageEntry of baggageValues) {
13373
11736
  if (baggageEntry.value === void 0)
13374
11737
  continue;
@@ -15850,8 +14213,8 @@ var require_require_in_the_middle = __commonJS({
15850
14213
  if (Module.isBuiltin) {
15851
14214
  isCore = Module.isBuiltin;
15852
14215
  } else {
15853
- const [major2, minor] = process.versions.node.split(".").map(Number);
15854
- if (major2 === 8 && minor < 8) {
14216
+ const [major, minor] = process.versions.node.split(".").map(Number);
14217
+ if (major === 8 && minor < 8) {
15855
14218
  isCore = (moduleName2) => {
15856
14219
  if (moduleName2 === "http2") {
15857
14220
  return true;
@@ -18997,8 +17360,8 @@ var require_root = __commonJS({
18997
17360
  return resource;
18998
17361
  }();
18999
17362
  proto.trace = function() {
19000
- var trace2 = {};
19001
- trace2.v1 = function() {
17363
+ var trace = {};
17364
+ trace.v1 = function() {
19002
17365
  var v1 = {};
19003
17366
  v1.TracesData = function() {
19004
17367
  function TracesData(properties) {
@@ -20455,13 +18818,13 @@ var require_root = __commonJS({
20455
18818
  }();
20456
18819
  return v1;
20457
18820
  }();
20458
- return trace2;
18821
+ return trace;
20459
18822
  }();
20460
18823
  proto.collector = function() {
20461
18824
  var collector = {};
20462
18825
  collector.trace = function() {
20463
- var trace2 = {};
20464
- trace2.v1 = function() {
18826
+ var trace = {};
18827
+ trace.v1 = function() {
20465
18828
  var v1 = {};
20466
18829
  v1.TraceService = function() {
20467
18830
  function TraceService(rpcImpl, requestDelimited, responseDelimited) {
@@ -20795,11 +19158,11 @@ var require_root = __commonJS({
20795
19158
  }();
20796
19159
  return v1;
20797
19160
  }();
20798
- return trace2;
19161
+ return trace;
20799
19162
  }();
20800
19163
  collector.metrics = function() {
20801
- var metrics2 = {};
20802
- metrics2.v1 = function() {
19164
+ var metrics = {};
19165
+ metrics.v1 = function() {
20803
19166
  var v1 = {};
20804
19167
  v1.MetricsService = function() {
20805
19168
  function MetricsService(rpcImpl, requestDelimited, responseDelimited) {
@@ -21133,7 +19496,7 @@ var require_root = __commonJS({
21133
19496
  }();
21134
19497
  return v1;
21135
19498
  }();
21136
- return metrics2;
19499
+ return metrics;
21137
19500
  }();
21138
19501
  collector.logs = function() {
21139
19502
  var logs = {};
@@ -21476,8 +19839,8 @@ var require_root = __commonJS({
21476
19839
  return collector;
21477
19840
  }();
21478
19841
  proto.metrics = function() {
21479
- var metrics2 = {};
21480
- metrics2.v1 = function() {
19842
+ var metrics = {};
19843
+ metrics.v1 = function() {
21481
19844
  var v1 = {};
21482
19845
  v1.MetricsData = function() {
21483
19846
  function MetricsData(properties) {
@@ -24862,7 +23225,7 @@ var require_root = __commonJS({
24862
23225
  }();
24863
23226
  return v1;
24864
23227
  }();
24865
- return metrics2;
23228
+ return metrics;
24866
23229
  }();
24867
23230
  proto.logs = function() {
24868
23231
  var logs = {};
@@ -26322,12 +24685,12 @@ var require_logging = __commonJS({
26322
24685
  }
26323
24686
  }
26324
24687
  var allEnabled = enabledTracers.has("all");
26325
- function trace2(severity, tracer, text) {
24688
+ function trace(severity, tracer, text) {
26326
24689
  if (isTracerEnabled(tracer)) {
26327
24690
  (0, exports2.log)(severity, (/* @__PURE__ */ new Date()).toISOString() + " | v" + clientVersion + " " + process_1.pid + " | " + tracer + " | " + text);
26328
24691
  }
26329
24692
  }
26330
- exports2.trace = trace2;
24693
+ exports2.trace = trace;
26331
24694
  function isTracerEnabled(tracer) {
26332
24695
  return !disabledTracers.has(tracer) && (allEnabled || enabledTracers.has(tracer));
26333
24696
  }
@@ -27828,7 +26191,7 @@ var require_resolving_load_balancer = __commonJS({
27828
26191
  var uri_parser_1 = require_uri_parser();
27829
26192
  var load_balancer_child_handler_1 = require_load_balancer_child_handler();
27830
26193
  var TRACER_NAME = "resolving_load_balancer";
27831
- function trace2(text) {
26194
+ function trace(text) {
27832
26195
  logging.trace(constants_2.LogVerbosity.DEBUG, TRACER_NAME, text);
27833
26196
  }
27834
26197
  var NAME_MATCH_LEVEL_ORDER = [
@@ -27928,7 +26291,7 @@ var require_resolving_load_balancer = __commonJS({
27928
26291
  createSubchannel: channelControlHelper.createSubchannel.bind(channelControlHelper),
27929
26292
  requestReresolution: () => {
27930
26293
  if (this.backoffTimeout.isRunning()) {
27931
- trace2("requestReresolution delayed by backoff timer until " + this.backoffTimeout.getEndTime().toISOString());
26294
+ trace("requestReresolution delayed by backoff timer until " + this.backoffTimeout.getEndTime().toISOString());
27932
26295
  this.continueResolving = true;
27933
26296
  } else {
27934
26297
  this.updateResolution();
@@ -28003,7 +26366,7 @@ var require_resolving_load_balancer = __commonJS({
28003
26366
  this.backoffTimeout.runOnce();
28004
26367
  }
28005
26368
  updateState(connectivityState, picker) {
28006
- trace2((0, uri_parser_1.uriToString)(this.target) + " " + connectivity_state_1.ConnectivityState[this.currentState] + " -> " + connectivity_state_1.ConnectivityState[connectivityState]);
26369
+ trace((0, uri_parser_1.uriToString)(this.target) + " " + connectivity_state_1.ConnectivityState[this.currentState] + " -> " + connectivity_state_1.ConnectivityState[connectivityState]);
28007
26370
  if (connectivityState === connectivity_state_1.ConnectivityState.IDLE) {
28008
26371
  picker = new picker_1.QueuePicker(this, picker);
28009
26372
  }
@@ -28374,14 +26737,14 @@ ${callerStack}`;
28374
26737
  }
28375
26738
  _write(chunk, encoding, cb) {
28376
26739
  var _a;
28377
- const context2 = {
26740
+ const context = {
28378
26741
  callback: cb
28379
26742
  };
28380
26743
  const flags = Number(encoding);
28381
26744
  if (!Number.isNaN(flags)) {
28382
- context2.flags = flags;
26745
+ context.flags = flags;
28383
26746
  }
28384
- (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context2, chunk);
26747
+ (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context, chunk);
28385
26748
  }
28386
26749
  _final(cb) {
28387
26750
  var _a;
@@ -28410,14 +26773,14 @@ ${callerStack}`;
28410
26773
  }
28411
26774
  _write(chunk, encoding, cb) {
28412
26775
  var _a;
28413
- const context2 = {
26776
+ const context = {
28414
26777
  callback: cb
28415
26778
  };
28416
26779
  const flags = Number(encoding);
28417
26780
  if (!Number.isNaN(flags)) {
28418
- context2.flags = flags;
26781
+ context.flags = flags;
28419
26782
  }
28420
- (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context2, chunk);
26783
+ (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context, chunk);
28421
26784
  }
28422
26785
  _final(cb) {
28423
26786
  var _a;
@@ -28670,15 +27033,15 @@ var require_client_interceptors = __commonJS({
28670
27033
  });
28671
27034
  }
28672
27035
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
28673
- sendMessageWithContext(context2, message) {
27036
+ sendMessageWithContext(context, message) {
28674
27037
  this.processingMessage = true;
28675
27038
  this.requester.sendMessage(message, (finalMessage) => {
28676
27039
  this.processingMessage = false;
28677
27040
  if (this.processingMetadata) {
28678
- this.pendingMessageContext = context2;
27041
+ this.pendingMessageContext = context;
28679
27042
  this.pendingMessage = message;
28680
27043
  } else {
28681
- this.nextCall.sendMessageWithContext(context2, finalMessage);
27044
+ this.nextCall.sendMessageWithContext(context, finalMessage);
28682
27045
  this.processPendingHalfClose();
28683
27046
  }
28684
27047
  });
@@ -28726,7 +27089,7 @@ var require_client_interceptors = __commonJS({
28726
27089
  return this.call.getPeer();
28727
27090
  }
28728
27091
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
28729
- sendMessageWithContext(context2, message) {
27092
+ sendMessageWithContext(context, message) {
28730
27093
  let serialized;
28731
27094
  try {
28732
27095
  serialized = this.methodDefinition.requestSerialize(message);
@@ -28734,7 +27097,7 @@ var require_client_interceptors = __commonJS({
28734
27097
  this.call.cancelWithStatus(constants_1.Status.INTERNAL, `Request message serialization failure: ${(0, error_1.getErrorMessage)(e)}`);
28735
27098
  return;
28736
27099
  }
28737
- this.call.sendMessageWithContext(context2, serialized);
27100
+ this.call.sendMessageWithContext(context, serialized);
28738
27101
  }
28739
27102
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
28740
27103
  sendMessage(message) {
@@ -32222,12 +30585,12 @@ var require_tokenize = __commonJS({
32222
30585
  return Error("illegal " + subject + " (line " + line + ")");
32223
30586
  }
32224
30587
  function readString() {
32225
- var re2 = stringDelim === "'" ? stringSingleRe : stringDoubleRe;
32226
- re2.lastIndex = offset - 1;
32227
- var match = re2.exec(source);
30588
+ var re = stringDelim === "'" ? stringSingleRe : stringDoubleRe;
30589
+ re.lastIndex = offset - 1;
30590
+ var match = re.exec(source);
32228
30591
  if (!match)
32229
30592
  throw illegal("string");
32230
- offset = re2.lastIndex;
30593
+ offset = re.lastIndex;
32231
30594
  push(stringDelim);
32232
30595
  stringDelim = null;
32233
30596
  return unescape(match[1]);
@@ -36724,7 +35087,7 @@ var require_resolver_dns = __commonJS({
36724
35087
  var net_1 = __require("net");
36725
35088
  var backoff_timeout_1 = require_backoff_timeout();
36726
35089
  var TRACER_NAME = "dns_resolver";
36727
- function trace2(text) {
35090
+ function trace(text) {
36728
35091
  logging.trace(constants_2.LogVerbosity.DEBUG, TRACER_NAME, text);
36729
35092
  }
36730
35093
  exports2.DEFAULT_PORT = 443;
@@ -36745,7 +35108,7 @@ var require_resolver_dns = __commonJS({
36745
35108
  this.isNextResolutionTimerRunning = false;
36746
35109
  this.isServiceConfigEnabled = true;
36747
35110
  this.returnedIpResult = false;
36748
- trace2("Resolver constructed for target " + (0, uri_parser_1.uriToString)(target));
35111
+ trace("Resolver constructed for target " + (0, uri_parser_1.uriToString)(target));
36749
35112
  const hostPort = (0, uri_parser_1.splitHostPort)(target.path);
36750
35113
  if (hostPort === null) {
36751
35114
  this.ipResult = null;
@@ -36802,7 +35165,7 @@ var require_resolver_dns = __commonJS({
36802
35165
  startResolution() {
36803
35166
  if (this.ipResult !== null) {
36804
35167
  if (!this.returnedIpResult) {
36805
- trace2("Returning IP address for target " + (0, uri_parser_1.uriToString)(this.target));
35168
+ trace("Returning IP address for target " + (0, uri_parser_1.uriToString)(this.target));
36806
35169
  setImmediate(() => {
36807
35170
  this.listener.onSuccessfulResolution(this.ipResult, null, null, null, {});
36808
35171
  });
@@ -36814,7 +35177,7 @@ var require_resolver_dns = __commonJS({
36814
35177
  return;
36815
35178
  }
36816
35179
  if (this.dnsHostname === null) {
36817
- trace2("Failed to parse DNS address " + (0, uri_parser_1.uriToString)(this.target));
35180
+ trace("Failed to parse DNS address " + (0, uri_parser_1.uriToString)(this.target));
36818
35181
  setImmediate(() => {
36819
35182
  this.listener.onError({
36820
35183
  code: constants_1.Status.UNAVAILABLE,
@@ -36827,7 +35190,7 @@ var require_resolver_dns = __commonJS({
36827
35190
  if (this.pendingLookupPromise !== null) {
36828
35191
  return;
36829
35192
  }
36830
- trace2("Looking up DNS hostname " + this.dnsHostname);
35193
+ trace("Looking up DNS hostname " + this.dnsHostname);
36831
35194
  this.latestLookupResult = null;
36832
35195
  const hostname = this.dnsHostname;
36833
35196
  this.pendingLookupPromise = dnsLookupPromise(hostname, { all: true });
@@ -36843,7 +35206,7 @@ var require_resolver_dns = __commonJS({
36843
35206
  addresses: [address]
36844
35207
  }));
36845
35208
  const allAddressesString = "[" + subchannelAddresses.map((addr) => addr.host + ":" + addr.port).join(",") + "]";
36846
- trace2("Resolved addresses for target " + (0, uri_parser_1.uriToString)(this.target) + ": " + allAddressesString);
35209
+ trace("Resolved addresses for target " + (0, uri_parser_1.uriToString)(this.target) + ": " + allAddressesString);
36847
35210
  if (this.latestLookupResult.length === 0) {
36848
35211
  this.listener.onError(this.defaultResolutionError);
36849
35212
  return;
@@ -36853,7 +35216,7 @@ var require_resolver_dns = __commonJS({
36853
35216
  if (this.pendingLookupPromise === null) {
36854
35217
  return;
36855
35218
  }
36856
- trace2("Resolution error for target " + (0, uri_parser_1.uriToString)(this.target) + ": " + err.message);
35219
+ trace("Resolution error for target " + (0, uri_parser_1.uriToString)(this.target) + ": " + err.message);
36857
35220
  this.pendingLookupPromise = null;
36858
35221
  this.stopNextResolutionTimer();
36859
35222
  this.listener.onError(this.defaultResolutionError);
@@ -36909,9 +35272,9 @@ var require_resolver_dns = __commonJS({
36909
35272
  if (this.pendingLookupPromise === null) {
36910
35273
  if (this.isNextResolutionTimerRunning || this.backoff.isRunning()) {
36911
35274
  if (this.isNextResolutionTimerRunning) {
36912
- trace2('resolution update delayed by "min time between resolutions" rate limit');
35275
+ trace('resolution update delayed by "min time between resolutions" rate limit');
36913
35276
  } else {
36914
- trace2("resolution update delayed by backoff timer until " + this.backoff.getEndTime().toISOString());
35277
+ trace("resolution update delayed by backoff timer until " + this.backoff.getEndTime().toISOString());
36915
35278
  }
36916
35279
  this.continueResolving = true;
36917
35280
  } else {
@@ -36970,7 +35333,7 @@ var require_http_proxy = __commonJS({
36970
35333
  var url_1 = __require("url");
36971
35334
  var resolver_dns_1 = require_resolver_dns();
36972
35335
  var TRACER_NAME = "proxy";
36973
- function trace2(text) {
35336
+ function trace(text) {
36974
35337
  logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);
36975
35338
  }
36976
35339
  function getProxyInfo() {
@@ -37019,7 +35382,7 @@ var require_http_proxy = __commonJS({
37019
35382
  if (userCred) {
37020
35383
  result.creds = userCred;
37021
35384
  }
37022
- trace2("Proxy server " + result.address + " set by environment variable " + envVar);
35385
+ trace("Proxy server " + result.address + " set by environment variable " + envVar);
37023
35386
  return result;
37024
35387
  }
37025
35388
  function getNoProxyHostList() {
@@ -37030,7 +35393,7 @@ var require_http_proxy = __commonJS({
37030
35393
  envVar = "no_proxy";
37031
35394
  }
37032
35395
  if (noProxyStr) {
37033
- trace2("No proxy server list set by environment variable " + envVar);
35396
+ trace("No proxy server list set by environment variable " + envVar);
37034
35397
  return noProxyStr.split(",");
37035
35398
  } else {
37036
35399
  return [];
@@ -37059,7 +35422,7 @@ var require_http_proxy = __commonJS({
37059
35422
  const serverHost = hostPort.host;
37060
35423
  for (const host of getNoProxyHostList()) {
37061
35424
  if (host === serverHost) {
37062
- trace2("Not using proxy for target in no_proxy list: " + (0, uri_parser_1.uriToString)(target));
35425
+ trace("Not using proxy for target in no_proxy list: " + (0, uri_parser_1.uriToString)(target));
37063
35426
  return noProxyResult;
37064
35427
  }
37065
35428
  }
@@ -37111,7 +35474,7 @@ var require_http_proxy = __commonJS({
37111
35474
  }
37112
35475
  options.headers = headers;
37113
35476
  const proxyAddressString = (0, subchannel_address_1.subchannelAddressToString)(address);
37114
- trace2("Using proxy " + proxyAddressString + " to connect to " + options.path);
35477
+ trace("Using proxy " + proxyAddressString + " to connect to " + options.path);
37115
35478
  return new Promise((resolve, reject) => {
37116
35479
  const request = http.request(options);
37117
35480
  request.once("connect", (res, socket, head) => {
@@ -37119,21 +35482,21 @@ var require_http_proxy = __commonJS({
37119
35482
  request.removeAllListeners();
37120
35483
  socket.removeAllListeners();
37121
35484
  if (res.statusCode === 200) {
37122
- trace2("Successfully connected to " + options.path + " through proxy " + proxyAddressString);
35485
+ trace("Successfully connected to " + options.path + " through proxy " + proxyAddressString);
37123
35486
  if ("secureContext" in connectionOptions) {
37124
35487
  const targetPath = (0, resolver_1.getDefaultAuthority)(parsedTarget);
37125
35488
  const hostPort2 = (0, uri_parser_1.splitHostPort)(targetPath);
37126
35489
  const remoteHost = (_a2 = hostPort2 === null || hostPort2 === void 0 ? void 0 : hostPort2.host) !== null && _a2 !== void 0 ? _a2 : targetPath;
37127
35490
  const cts = tls.connect(Object.assign({ host: remoteHost, servername: remoteHost, socket }, connectionOptions), () => {
37128
- trace2("Successfully established a TLS connection to " + options.path + " through proxy " + proxyAddressString);
35491
+ trace("Successfully established a TLS connection to " + options.path + " through proxy " + proxyAddressString);
37129
35492
  resolve({ socket: cts, realTarget: parsedTarget });
37130
35493
  });
37131
35494
  cts.on("error", (error) => {
37132
- trace2("Failed to establish a TLS connection to " + options.path + " through proxy " + proxyAddressString + " with error " + error.message);
35495
+ trace("Failed to establish a TLS connection to " + options.path + " through proxy " + proxyAddressString + " with error " + error.message);
37133
35496
  reject();
37134
35497
  });
37135
35498
  } else {
37136
- trace2("Successfully established a plaintext connection to " + options.path + " through proxy " + proxyAddressString);
35499
+ trace("Successfully established a plaintext connection to " + options.path + " through proxy " + proxyAddressString);
37137
35500
  resolve({
37138
35501
  socket,
37139
35502
  realTarget: parsedTarget
@@ -37544,7 +35907,7 @@ var require_subchannel_call = __commonJS({
37544
35907
  }
37545
35908
  this.http2Stream.resume();
37546
35909
  }
37547
- sendMessageWithContext(context2, message) {
35910
+ sendMessageWithContext(context, message) {
37548
35911
  this.trace("write() called with message of length " + message.length);
37549
35912
  const cb = (error) => {
37550
35913
  process.nextTick(() => {
@@ -37556,7 +35919,7 @@ var require_subchannel_call = __commonJS({
37556
35919
  if (error) {
37557
35920
  this.cancelWithStatus(code, `Write error: ${error.message}`);
37558
35921
  }
37559
- (_a = context2.callback) === null || _a === void 0 ? void 0 : _a.call(context2);
35922
+ (_a = context.callback) === null || _a === void 0 ? void 0 : _a.call(context);
37560
35923
  });
37561
35924
  };
37562
35925
  this.trace("sending data chunk of length " + message.length);
@@ -38839,12 +37202,12 @@ var require_load_balancing_call = __commonJS({
38839
37202
  this.metadata = metadata;
38840
37203
  this.doPick();
38841
37204
  }
38842
- sendMessageWithContext(context2, message) {
37205
+ sendMessageWithContext(context, message) {
38843
37206
  this.trace("write() called with message of length " + message.length);
38844
37207
  if (this.child) {
38845
- this.child.sendMessageWithContext(context2, message);
37208
+ this.child.sendMessageWithContext(context, message);
38846
37209
  } else {
38847
- this.pendingMessage = { context: context2, message };
37210
+ this.pendingMessage = { context, message };
38848
37211
  }
38849
37212
  }
38850
37213
  startRead() {
@@ -38958,15 +37321,15 @@ var require_resolving_call = __commonJS({
38958
37321
  });
38959
37322
  }
38960
37323
  }
38961
- sendMessageOnChild(context2, message) {
37324
+ sendMessageOnChild(context, message) {
38962
37325
  if (!this.child) {
38963
37326
  throw new Error("sendMessageonChild called with child not populated");
38964
37327
  }
38965
37328
  const child = this.child;
38966
37329
  this.writeFilterPending = true;
38967
- this.filterStack.sendMessage(Promise.resolve({ message, flags: context2.flags })).then((filteredMessage) => {
37330
+ this.filterStack.sendMessage(Promise.resolve({ message, flags: context.flags })).then((filteredMessage) => {
38968
37331
  this.writeFilterPending = false;
38969
- child.sendMessageWithContext(context2, filteredMessage.message);
37332
+ child.sendMessageWithContext(context, filteredMessage.message);
38970
37333
  if (this.pendingHalfClose) {
38971
37334
  child.halfClose();
38972
37335
  }
@@ -39083,12 +37446,12 @@ var require_resolving_call = __commonJS({
39083
37446
  this.listener = listener;
39084
37447
  this.getConfig();
39085
37448
  }
39086
- sendMessageWithContext(context2, message) {
37449
+ sendMessageWithContext(context, message) {
39087
37450
  this.trace("write() called with message of length " + message.length);
39088
37451
  if (this.child) {
39089
- this.sendMessageOnChild(context2, message);
37452
+ this.sendMessageOnChild(context, message);
39090
37453
  } else {
39091
- this.pendingMessage = { context: context2, message };
37454
+ this.pendingMessage = { context, message };
39092
37455
  }
39093
37456
  }
39094
37457
  startRead() {
@@ -39606,12 +37969,12 @@ var require_retrying_call = __commonJS({
39606
37969
  }
39607
37970
  }
39608
37971
  }
39609
- sendMessageWithContext(context2, message) {
37972
+ sendMessageWithContext(context, message) {
39610
37973
  var _a;
39611
37974
  this.trace("write() called with message of length " + message.length);
39612
37975
  const writeObj = {
39613
37976
  message,
39614
- flags: context2.flags
37977
+ flags: context.flags
39615
37978
  };
39616
37979
  const messageIndex = this.getNextBufferIndex();
39617
37980
  const bufferEntry = {
@@ -39621,7 +37984,7 @@ var require_retrying_call = __commonJS({
39621
37984
  };
39622
37985
  this.writeBuffer.push(bufferEntry);
39623
37986
  if (bufferEntry.allocated) {
39624
- (_a = context2.callback) === null || _a === void 0 ? void 0 : _a.call(context2);
37987
+ (_a = context.callback) === null || _a === void 0 ? void 0 : _a.call(context);
39625
37988
  for (const [callIndex, call] of this.underlyingCalls.entries()) {
39626
37989
  if (call.state === "ACTIVE" && call.nextMessageToSend === messageIndex) {
39627
37990
  call.call.sendMessageWithContext({
@@ -39637,7 +38000,7 @@ var require_retrying_call = __commonJS({
39637
38000
  return;
39638
38001
  }
39639
38002
  const call = this.underlyingCalls[this.committedCallIndex];
39640
- bufferEntry.callback = context2.callback;
38003
+ bufferEntry.callback = context.callback;
39641
38004
  if (call.state === "ACTIVE" && call.nextMessageToSend === messageIndex) {
39642
38005
  call.call.sendMessageWithContext({
39643
38006
  callback: (error) => {
@@ -40610,7 +38973,7 @@ var require_server_interceptors = __commonJS({
40610
38973
  var unzip = (0, util_1.promisify)(zlib.unzip);
40611
38974
  var inflate = (0, util_1.promisify)(zlib.inflate);
40612
38975
  var TRACER_NAME = "server_call";
40613
- function trace2(text) {
38976
+ function trace(text) {
40614
38977
  logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);
40615
38978
  }
40616
38979
  var ServerListenerBuilder = class {
@@ -40911,7 +39274,7 @@ var require_server_interceptors = __commonJS({
40911
39274
  });
40912
39275
  this.stream.once("close", () => {
40913
39276
  var _a;
40914
- trace2("Request to method " + ((_a = this.handler) === null || _a === void 0 ? void 0 : _a.path) + " stream closed with rstCode " + this.stream.rstCode);
39277
+ trace("Request to method " + ((_a = this.handler) === null || _a === void 0 ? void 0 : _a.path) + " stream closed with rstCode " + this.stream.rstCode);
40915
39278
  if (this.callEventTracker && !this.streamEnded) {
40916
39279
  this.streamEnded = true;
40917
39280
  this.callEventTracker.onStreamEnd(false);
@@ -40938,7 +39301,7 @@ var require_server_interceptors = __commonJS({
40938
39301
  }
40939
39302
  const metadata = metadata_1.Metadata.fromHttp2Headers(headers);
40940
39303
  if (logging.isTracerEnabled(TRACER_NAME)) {
40941
- trace2("Request to " + this.handler.path + " received headers " + JSON.stringify(metadata.toJSON()));
39304
+ trace("Request to " + this.handler.path + " received headers " + JSON.stringify(metadata.toJSON()));
40942
39305
  }
40943
39306
  const timeoutHeader = metadata.get(GRPC_TIMEOUT_HEADER);
40944
39307
  if (timeoutHeader.length > 0) {
@@ -41077,7 +39440,7 @@ var require_server_interceptors = __commonJS({
41077
39440
  if (this.checkCancelled()) {
41078
39441
  return;
41079
39442
  }
41080
- trace2("Request to " + this.handler.path + " received data frame of size " + data.length);
39443
+ trace("Request to " + this.handler.path + " received data frame of size " + data.length);
41081
39444
  const rawMessages = this.decoder.write(data);
41082
39445
  for (const messageBytes of rawMessages) {
41083
39446
  this.stream.pause();
@@ -41109,7 +39472,7 @@ var require_server_interceptors = __commonJS({
41109
39472
  this.maybePushNextMessage();
41110
39473
  }
41111
39474
  start(listener) {
41112
- trace2("Request to " + this.handler.path + " start called");
39475
+ trace("Request to " + this.handler.path + " start called");
41113
39476
  if (this.checkCancelled()) {
41114
39477
  return;
41115
39478
  }
@@ -41152,7 +39515,7 @@ var require_server_interceptors = __commonJS({
41152
39515
  return;
41153
39516
  }
41154
39517
  this.maybeSendMetadata();
41155
- trace2("Request to " + this.handler.path + " sent data frame of size " + response.length);
39518
+ trace("Request to " + this.handler.path + " sent data frame of size " + response.length);
41156
39519
  this.stream.write(response, (error) => {
41157
39520
  var _a;
41158
39521
  if (error) {
@@ -41173,7 +39536,7 @@ var require_server_interceptors = __commonJS({
41173
39536
  return;
41174
39537
  }
41175
39538
  this.notifyOnCancel();
41176
- trace2("Request to method " + ((_a = this.handler) === null || _a === void 0 ? void 0 : _a.path) + " ended with status code: " + constants_1.Status[status.code] + " details: " + status.details);
39539
+ trace("Request to method " + ((_a = this.handler) === null || _a === void 0 ? void 0 : _a.path) + " ended with status code: " + constants_1.Status[status.code] + " details: " + status.details);
41177
39540
  if (this.stream.headersSent) {
41178
39541
  if (!this.wantTrailers) {
41179
39542
  this.wantTrailers = true;
@@ -41200,7 +39563,7 @@ var require_server_interceptors = __commonJS({
41200
39563
  }
41201
39564
  }
41202
39565
  startRead() {
41203
- trace2("Request to " + this.handler.path + " startRead called");
39566
+ trace("Request to " + this.handler.path + " startRead called");
41204
39567
  if (this.checkCancelled()) {
41205
39568
  return;
41206
39569
  }
@@ -41270,17 +39633,17 @@ var require_server = __commonJS({
41270
39633
  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
41271
39634
  var _, done = false;
41272
39635
  for (var i = decorators.length - 1; i >= 0; i--) {
41273
- var context2 = {};
39636
+ var context = {};
41274
39637
  for (var p in contextIn)
41275
- context2[p] = p === "access" ? {} : contextIn[p];
39638
+ context[p] = p === "access" ? {} : contextIn[p];
41276
39639
  for (var p in contextIn.access)
41277
- context2.access[p] = contextIn.access[p];
41278
- context2.addInitializer = function(f) {
39640
+ context.access[p] = contextIn.access[p];
39641
+ context.addInitializer = function(f) {
41279
39642
  if (done)
41280
39643
  throw new TypeError("Cannot add initializers after decoration has completed");
41281
39644
  extraInitializers.push(accept(f || null));
41282
39645
  };
41283
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
39646
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
41284
39647
  if (kind === "accessor") {
41285
39648
  if (result === void 0)
41286
39649
  continue;
@@ -41324,7 +39687,7 @@ var require_server = __commonJS({
41324
39687
  function noop() {
41325
39688
  }
41326
39689
  function deprecate(message) {
41327
- return function(target, context2) {
39690
+ return function(target, context) {
41328
39691
  return util.deprecate(target, message);
41329
39692
  };
41330
39693
  }
@@ -42471,7 +40834,7 @@ var require_load_balancer_pick_first = __commonJS({
42471
40834
  var subchannel_address_1 = require_subchannel_address();
42472
40835
  var net_1 = __require("net");
42473
40836
  var TRACER_NAME = "pick_first";
42474
- function trace2(text) {
40837
+ function trace(text) {
42475
40838
  logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);
42476
40839
  }
42477
40840
  var TYPE_NAME = "pick_first";
@@ -42690,7 +41053,7 @@ var require_load_balancer_pick_first = __commonJS({
42690
41053
  clearTimeout(this.connectionDelayTimeout);
42691
41054
  this.currentSubchannelIndex = subchannelIndex;
42692
41055
  if (this.children[subchannelIndex].subchannel.getConnectivityState() === connectivity_state_1.ConnectivityState.IDLE) {
42693
- trace2("Start connecting to subchannel with address " + this.children[subchannelIndex].subchannel.getAddress());
41056
+ trace("Start connecting to subchannel with address " + this.children[subchannelIndex].subchannel.getAddress());
42694
41057
  process.nextTick(() => {
42695
41058
  var _a2;
42696
41059
  (_a2 = this.children[subchannelIndex]) === null || _a2 === void 0 ? void 0 : _a2.subchannel.startConnecting();
@@ -42704,7 +41067,7 @@ var require_load_balancer_pick_first = __commonJS({
42704
41067
  if (this.currentPick && subchannel.realSubchannelEquals(this.currentPick)) {
42705
41068
  return;
42706
41069
  }
42707
- trace2("Pick subchannel with address " + subchannel.getAddress());
41070
+ trace("Pick subchannel with address " + subchannel.getAddress());
42708
41071
  this.stickyTransientFailureMode = false;
42709
41072
  this.removeCurrentPick();
42710
41073
  this.currentPick = subchannel;
@@ -42718,7 +41081,7 @@ var require_load_balancer_pick_first = __commonJS({
42718
41081
  this.calculateAndReportNewState();
42719
41082
  }
42720
41083
  updateState(newState, picker) {
42721
- trace2(connectivity_state_1.ConnectivityState[this.currentState] + " -> " + connectivity_state_1.ConnectivityState[newState]);
41084
+ trace(connectivity_state_1.ConnectivityState[this.currentState] + " -> " + connectivity_state_1.ConnectivityState[newState]);
42722
41085
  this.currentState = newState;
42723
41086
  this.channelControlHelper.updateState(newState, picker);
42724
41087
  }
@@ -42997,7 +41360,7 @@ var require_resolver_ip = __commonJS({
42997
41360
  var uri_parser_1 = require_uri_parser();
42998
41361
  var logging = require_logging();
42999
41362
  var TRACER_NAME = "ip_resolver";
43000
- function trace2(text) {
41363
+ function trace(text) {
43001
41364
  logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);
43002
41365
  }
43003
41366
  var IPV4_SCHEME = "ipv4";
@@ -43010,7 +41373,7 @@ var require_resolver_ip = __commonJS({
43010
41373
  this.endpoints = [];
43011
41374
  this.error = null;
43012
41375
  this.hasReturnedResult = false;
43013
- trace2("Resolver constructed for target " + (0, uri_parser_1.uriToString)(target));
41376
+ trace("Resolver constructed for target " + (0, uri_parser_1.uriToString)(target));
43014
41377
  const addresses = [];
43015
41378
  if (!(target.scheme === IPV4_SCHEME || target.scheme === IPV6_SCHEME)) {
43016
41379
  this.error = {
@@ -43045,7 +41408,7 @@ var require_resolver_ip = __commonJS({
43045
41408
  });
43046
41409
  }
43047
41410
  this.endpoints = addresses.map((address) => ({ addresses: [address] }));
43048
- trace2("Parsed " + target.scheme + " address list " + addresses);
41411
+ trace("Parsed " + target.scheme + " address list " + addresses);
43049
41412
  }
43050
41413
  updateResolution() {
43051
41414
  if (!this.hasReturnedResult) {
@@ -43088,7 +41451,7 @@ var require_load_balancer_round_robin = __commonJS({
43088
41451
  var subchannel_address_1 = require_subchannel_address();
43089
41452
  var load_balancer_pick_first_1 = require_load_balancer_pick_first();
43090
41453
  var TRACER_NAME = "round_robin";
43091
- function trace2(text) {
41454
+ function trace(text) {
43092
41455
  logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);
43093
41456
  }
43094
41457
  var TYPE_NAME = "round_robin";
@@ -43177,7 +41540,7 @@ var require_load_balancer_round_robin = __commonJS({
43177
41540
  }
43178
41541
  }
43179
41542
  updateState(newState, picker) {
43180
- trace2(connectivity_state_1.ConnectivityState[this.currentState] + " -> " + connectivity_state_1.ConnectivityState[newState]);
41543
+ trace(connectivity_state_1.ConnectivityState[this.currentState] + " -> " + connectivity_state_1.ConnectivityState[newState]);
43181
41544
  if (newState === connectivity_state_1.ConnectivityState.READY) {
43182
41545
  this.currentReadyPicker = picker;
43183
41546
  } else {
@@ -43193,7 +41556,7 @@ var require_load_balancer_round_robin = __commonJS({
43193
41556
  }
43194
41557
  updateAddressList(endpointList, lbConfig) {
43195
41558
  this.resetSubchannelList();
43196
- trace2("Connect to endpoint list " + endpointList.map(subchannel_address_1.endpointToString));
41559
+ trace("Connect to endpoint list " + endpointList.map(subchannel_address_1.endpointToString));
43197
41560
  this.updatesPaused = true;
43198
41561
  this.children = endpointList.map((endpoint) => new load_balancer_pick_first_1.LeafLoadBalancer(endpoint, this.childChannelControlHelper, this.options));
43199
41562
  for (const child of this.children) {
@@ -43239,7 +41602,7 @@ var require_load_balancer_outlier_detection = __commonJS({
43239
41602
  var subchannel_interface_1 = require_subchannel_interface();
43240
41603
  var logging = require_logging();
43241
41604
  var TRACER_NAME = "outlier_detection";
43242
- function trace2(text) {
41605
+ function trace(text) {
43243
41606
  logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);
43244
41607
  }
43245
41608
  var TYPE_NAME = "outlier_detection";
@@ -43509,20 +41872,20 @@ var require_load_balancer_outlier_detection = __commonJS({
43509
41872
  if (!successRateConfig) {
43510
41873
  return;
43511
41874
  }
43512
- trace2("Running success rate check");
41875
+ trace("Running success rate check");
43513
41876
  const targetRequestVolume = successRateConfig.request_volume;
43514
41877
  let addresesWithTargetVolume = 0;
43515
41878
  const successRates = [];
43516
41879
  for (const [endpoint, mapEntry] of this.entryMap.entries()) {
43517
41880
  const successes = mapEntry.counter.getLastSuccesses();
43518
41881
  const failures = mapEntry.counter.getLastFailures();
43519
- trace2("Stats for " + (0, subchannel_address_1.endpointToString)(endpoint) + ": successes=" + successes + " failures=" + failures + " targetRequestVolume=" + targetRequestVolume);
41882
+ trace("Stats for " + (0, subchannel_address_1.endpointToString)(endpoint) + ": successes=" + successes + " failures=" + failures + " targetRequestVolume=" + targetRequestVolume);
43520
41883
  if (successes + failures >= targetRequestVolume) {
43521
41884
  addresesWithTargetVolume += 1;
43522
41885
  successRates.push(successes / (successes + failures));
43523
41886
  }
43524
41887
  }
43525
- trace2("Found " + addresesWithTargetVolume + " success rate candidates; currentEjectionPercent=" + this.getCurrentEjectionPercent() + " successRates=[" + successRates + "]");
41888
+ trace("Found " + addresesWithTargetVolume + " success rate candidates; currentEjectionPercent=" + this.getCurrentEjectionPercent() + " successRates=[" + successRates + "]");
43526
41889
  if (addresesWithTargetVolume < successRateConfig.minimum_hosts) {
43527
41890
  return;
43528
41891
  }
@@ -43535,7 +41898,7 @@ var require_load_balancer_outlier_detection = __commonJS({
43535
41898
  const successRateVariance = successRateDeviationSum / successRates.length;
43536
41899
  const successRateStdev = Math.sqrt(successRateVariance);
43537
41900
  const ejectionThreshold = successRateMean - successRateStdev * (successRateConfig.stdev_factor / 1e3);
43538
- trace2("stdev=" + successRateStdev + " ejectionThreshold=" + ejectionThreshold);
41901
+ trace("stdev=" + successRateStdev + " ejectionThreshold=" + ejectionThreshold);
43539
41902
  for (const [address, mapEntry] of this.entryMap.entries()) {
43540
41903
  if (this.getCurrentEjectionPercent() >= this.latestConfig.getMaxEjectionPercent()) {
43541
41904
  break;
@@ -43546,12 +41909,12 @@ var require_load_balancer_outlier_detection = __commonJS({
43546
41909
  continue;
43547
41910
  }
43548
41911
  const successRate = successes / (successes + failures);
43549
- trace2("Checking candidate " + address + " successRate=" + successRate);
41912
+ trace("Checking candidate " + address + " successRate=" + successRate);
43550
41913
  if (successRate < ejectionThreshold) {
43551
41914
  const randomNumber = Math.random() * 100;
43552
- trace2("Candidate " + address + " randomNumber=" + randomNumber + " enforcement_percentage=" + successRateConfig.enforcement_percentage);
41915
+ trace("Candidate " + address + " randomNumber=" + randomNumber + " enforcement_percentage=" + successRateConfig.enforcement_percentage);
43553
41916
  if (randomNumber < successRateConfig.enforcement_percentage) {
43554
- trace2("Ejecting candidate " + address);
41917
+ trace("Ejecting candidate " + address);
43555
41918
  this.eject(mapEntry, ejectionTimestamp);
43556
41919
  }
43557
41920
  }
@@ -43565,7 +41928,7 @@ var require_load_balancer_outlier_detection = __commonJS({
43565
41928
  if (!failurePercentageConfig) {
43566
41929
  return;
43567
41930
  }
43568
- trace2("Running failure percentage check. threshold=" + failurePercentageConfig.threshold + " request volume threshold=" + failurePercentageConfig.request_volume);
41931
+ trace("Running failure percentage check. threshold=" + failurePercentageConfig.threshold + " request volume threshold=" + failurePercentageConfig.request_volume);
43569
41932
  let addressesWithTargetVolume = 0;
43570
41933
  for (const mapEntry of this.entryMap.values()) {
43571
41934
  const successes = mapEntry.counter.getLastSuccesses();
@@ -43583,16 +41946,16 @@ var require_load_balancer_outlier_detection = __commonJS({
43583
41946
  }
43584
41947
  const successes = mapEntry.counter.getLastSuccesses();
43585
41948
  const failures = mapEntry.counter.getLastFailures();
43586
- trace2("Candidate successes=" + successes + " failures=" + failures);
41949
+ trace("Candidate successes=" + successes + " failures=" + failures);
43587
41950
  if (successes + failures < failurePercentageConfig.request_volume) {
43588
41951
  continue;
43589
41952
  }
43590
41953
  const failurePercentage = failures * 100 / (failures + successes);
43591
41954
  if (failurePercentage > failurePercentageConfig.threshold) {
43592
41955
  const randomNumber = Math.random() * 100;
43593
- trace2("Candidate " + address + " randomNumber=" + randomNumber + " enforcement_percentage=" + failurePercentageConfig.enforcement_percentage);
41956
+ trace("Candidate " + address + " randomNumber=" + randomNumber + " enforcement_percentage=" + failurePercentageConfig.enforcement_percentage);
43594
41957
  if (randomNumber < failurePercentageConfig.enforcement_percentage) {
43595
- trace2("Ejecting candidate " + address);
41958
+ trace("Ejecting candidate " + address);
43596
41959
  this.eject(mapEntry, ejectionTimestamp);
43597
41960
  }
43598
41961
  }
@@ -43623,7 +41986,7 @@ var require_load_balancer_outlier_detection = __commonJS({
43623
41986
  }
43624
41987
  runChecks() {
43625
41988
  const ejectionTimestamp = /* @__PURE__ */ new Date();
43626
- trace2("Ejection timer running");
41989
+ trace("Ejection timer running");
43627
41990
  this.switchAllBuckets();
43628
41991
  if (!this.latestConfig) {
43629
41992
  return;
@@ -43643,7 +42006,7 @@ var require_load_balancer_outlier_detection = __commonJS({
43643
42006
  const returnTime = new Date(mapEntry.currentEjectionTimestamp.getTime());
43644
42007
  returnTime.setMilliseconds(returnTime.getMilliseconds() + Math.min(baseEjectionTimeMs * mapEntry.ejectionTimeMultiplier, Math.max(baseEjectionTimeMs, maxEjectionTimeMs)));
43645
42008
  if (returnTime < /* @__PURE__ */ new Date()) {
43646
- trace2("Unejecting " + address);
42009
+ trace("Unejecting " + address);
43647
42010
  this.uneject(mapEntry);
43648
42011
  }
43649
42012
  }
@@ -43655,7 +42018,7 @@ var require_load_balancer_outlier_detection = __commonJS({
43655
42018
  }
43656
42019
  for (const endpoint of endpointList) {
43657
42020
  if (!this.entryMap.has(endpoint)) {
43658
- trace2("Adding map entry for " + (0, subchannel_address_1.endpointToString)(endpoint));
42021
+ trace("Adding map entry for " + (0, subchannel_address_1.endpointToString)(endpoint));
43659
42022
  this.entryMap.set(endpoint, {
43660
42023
  counter: new CallCounter(),
43661
42024
  currentEjectionTimestamp: null,
@@ -43669,18 +42032,18 @@ var require_load_balancer_outlier_detection = __commonJS({
43669
42032
  this.childBalancer.updateAddressList(endpointList, childPolicy, attributes);
43670
42033
  if (lbConfig.getSuccessRateEjectionConfig() || lbConfig.getFailurePercentageEjectionConfig()) {
43671
42034
  if (this.timerStartTime) {
43672
- trace2("Previous timer existed. Replacing timer");
42035
+ trace("Previous timer existed. Replacing timer");
43673
42036
  clearTimeout(this.ejectionTimer);
43674
42037
  const remainingDelay = lbConfig.getIntervalMs() - ((/* @__PURE__ */ new Date()).getTime() - this.timerStartTime.getTime());
43675
42038
  this.startTimer(remainingDelay);
43676
42039
  } else {
43677
- trace2("Starting new timer");
42040
+ trace("Starting new timer");
43678
42041
  this.timerStartTime = /* @__PURE__ */ new Date();
43679
42042
  this.startTimer(lbConfig.getIntervalMs());
43680
42043
  this.switchAllBuckets();
43681
42044
  }
43682
42045
  } else {
43683
- trace2("Counting disabled. Cancelling timer.");
42046
+ trace("Counting disabled. Cancelling timer.");
43684
42047
  this.timerStartTime = null;
43685
42048
  clearTimeout(this.ejectionTimer);
43686
42049
  for (const mapEntry of this.entryMap.values()) {
@@ -44813,8 +43176,8 @@ var require_root3 = __commonJS({
44813
43176
  return resource;
44814
43177
  }();
44815
43178
  proto.trace = function() {
44816
- var trace2 = {};
44817
- trace2.v1 = function() {
43179
+ var trace = {};
43180
+ trace.v1 = function() {
44818
43181
  var v1 = {};
44819
43182
  v1.TracesData = function() {
44820
43183
  function TracesData(properties) {
@@ -46271,13 +44634,13 @@ var require_root3 = __commonJS({
46271
44634
  }();
46272
44635
  return v1;
46273
44636
  }();
46274
- return trace2;
44637
+ return trace;
46275
44638
  }();
46276
44639
  proto.collector = function() {
46277
44640
  var collector = {};
46278
44641
  collector.trace = function() {
46279
- var trace2 = {};
46280
- trace2.v1 = function() {
44642
+ var trace = {};
44643
+ trace.v1 = function() {
46281
44644
  var v1 = {};
46282
44645
  v1.TraceService = function() {
46283
44646
  function TraceService(rpcImpl, requestDelimited, responseDelimited) {
@@ -46611,11 +44974,11 @@ var require_root3 = __commonJS({
46611
44974
  }();
46612
44975
  return v1;
46613
44976
  }();
46614
- return trace2;
44977
+ return trace;
46615
44978
  }();
46616
44979
  collector.metrics = function() {
46617
- var metrics2 = {};
46618
- metrics2.v1 = function() {
44980
+ var metrics = {};
44981
+ metrics.v1 = function() {
46619
44982
  var v1 = {};
46620
44983
  v1.MetricsService = function() {
46621
44984
  function MetricsService(rpcImpl, requestDelimited, responseDelimited) {
@@ -46949,7 +45312,7 @@ var require_root3 = __commonJS({
46949
45312
  }();
46950
45313
  return v1;
46951
45314
  }();
46952
- return metrics2;
45315
+ return metrics;
46953
45316
  }();
46954
45317
  collector.logs = function() {
46955
45318
  var logs = {};
@@ -47292,8 +45655,8 @@ var require_root3 = __commonJS({
47292
45655
  return collector;
47293
45656
  }();
47294
45657
  proto.metrics = function() {
47295
- var metrics2 = {};
47296
- metrics2.v1 = function() {
45658
+ var metrics = {};
45659
+ metrics.v1 = function() {
47297
45660
  var v1 = {};
47298
45661
  v1.MetricsData = function() {
47299
45662
  function MetricsData(properties) {
@@ -50678,7 +49041,7 @@ var require_root3 = __commonJS({
50678
49041
  }();
50679
49042
  return v1;
50680
49043
  }();
50681
- return metrics2;
49044
+ return metrics;
50682
49045
  }();
50683
49046
  proto.logs = function() {
50684
49047
  var logs = {};
@@ -52190,13 +50553,13 @@ var require_types18 = __commonJS({
52190
50553
  "use strict";
52191
50554
  Object.defineProperty(exports2, "__esModule", { value: true });
52192
50555
  exports2.SpanKind = void 0;
52193
- var SpanKind2;
52194
- (function(SpanKind3) {
52195
- SpanKind3["CLIENT"] = "CLIENT";
52196
- SpanKind3["SERVER"] = "SERVER";
52197
- SpanKind3["CONSUMER"] = "CONSUMER";
52198
- SpanKind3["PRODUCER"] = "PRODUCER";
52199
- })(SpanKind2 = exports2.SpanKind || (exports2.SpanKind = {}));
50556
+ var SpanKind;
50557
+ (function(SpanKind2) {
50558
+ SpanKind2["CLIENT"] = "CLIENT";
50559
+ SpanKind2["SERVER"] = "SERVER";
50560
+ SpanKind2["CONSUMER"] = "CONSUMER";
50561
+ SpanKind2["PRODUCER"] = "PRODUCER";
50562
+ })(SpanKind = exports2.SpanKind || (exports2.SpanKind = {}));
52200
50563
  }
52201
50564
  });
52202
50565
 
@@ -52839,7 +51202,7 @@ var import_sdk_trace_node = __toESM(require_src14(), 1);
52839
51202
  var import_semantic_conventions = __toESM(require_src(), 1);
52840
51203
  var {
52841
51204
  default: { version, name }
52842
- } = await import("../../esm-chunks/package-ZWSB2JUJ.js");
51205
+ } = await import("../../esm-chunks/package-NFGYFGF2.js");
52843
51206
  var sdk = new import_sdk_node.NodeSDK({
52844
51207
  resource: new import_resources.Resource({
52845
51208
  [import_semantic_conventions.SEMRESATTRS_SERVICE_NAME]: name,