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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,11 +4,6 @@
4
4
  return createRequire(import.meta.url);
5
5
  })();
6
6
 
7
- import {
8
- esm_exports,
9
- init_esm,
10
- trace
11
- } from "../../esm-chunks/chunk-GQ6KIYPX.js";
12
7
  import {
13
8
  require_semver
14
9
  } from "../../esm-chunks/chunk-PJG75HGC.js";
@@ -21,6 +16,1647 @@ import {
21
16
  __toESM
22
17
  } from "../../esm-chunks/chunk-5JVNISGM.js";
23
18
 
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
+
24
1660
  // node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js
25
1661
  var require_suppress_tracing = __commonJS({
26
1662
  "node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js"(exports2) {
@@ -29,16 +1665,16 @@ var require_suppress_tracing = __commonJS({
29
1665
  exports2.isTracingSuppressed = exports2.unsuppressTracing = exports2.suppressTracing = void 0;
30
1666
  var api_1 = (init_esm(), __toCommonJS(esm_exports));
31
1667
  var SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
32
- function suppressTracing(context) {
33
- return context.setValue(SUPPRESS_TRACING_KEY, true);
1668
+ function suppressTracing(context2) {
1669
+ return context2.setValue(SUPPRESS_TRACING_KEY, true);
34
1670
  }
35
1671
  exports2.suppressTracing = suppressTracing;
36
- function unsuppressTracing(context) {
37
- return context.deleteValue(SUPPRESS_TRACING_KEY);
1672
+ function unsuppressTracing(context2) {
1673
+ return context2.deleteValue(SUPPRESS_TRACING_KEY);
38
1674
  }
39
1675
  exports2.unsuppressTracing = unsuppressTracing;
40
- function isTracingSuppressed(context) {
41
- return context.getValue(SUPPRESS_TRACING_KEY) === true;
1676
+ function isTracingSuppressed(context2) {
1677
+ return context2.getValue(SUPPRESS_TRACING_KEY) === true;
42
1678
  }
43
1679
  exports2.isTracingSuppressed = isTracingSuppressed;
44
1680
  }
@@ -129,9 +1765,9 @@ var require_W3CBaggagePropagator = __commonJS({
129
1765
  var constants_1 = require_constants();
130
1766
  var utils_1 = require_utils();
131
1767
  var W3CBaggagePropagator = class {
132
- inject(context, carrier, setter) {
133
- const baggage = api_1.propagation.getBaggage(context);
134
- if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context))
1768
+ inject(context2, carrier, setter) {
1769
+ const baggage = api_1.propagation.getBaggage(context2);
1770
+ if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context2))
135
1771
  return;
136
1772
  const keyPairs = (0, utils_1.getKeyPairs)(baggage).filter((pair) => {
137
1773
  return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;
@@ -141,14 +1777,14 @@ var require_W3CBaggagePropagator = __commonJS({
141
1777
  setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue);
142
1778
  }
143
1779
  }
144
- extract(context, carrier, getter) {
1780
+ extract(context2, carrier, getter) {
145
1781
  const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER);
146
1782
  const baggageString = Array.isArray(headerValue) ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) : headerValue;
147
1783
  if (!baggageString)
148
- return context;
1784
+ return context2;
149
1785
  const baggage = {};
150
1786
  if (baggageString.length === 0) {
151
- return context;
1787
+ return context2;
152
1788
  }
153
1789
  const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR);
154
1790
  pairs.forEach((entry) => {
@@ -162,9 +1798,9 @@ var require_W3CBaggagePropagator = __commonJS({
162
1798
  }
163
1799
  });
164
1800
  if (Object.entries(baggage).length === 0) {
165
- return context;
1801
+ return context2;
166
1802
  }
167
- return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage));
1803
+ return api_1.propagation.setBaggage(context2, api_1.propagation.createBaggage(baggage));
168
1804
  }
169
1805
  fields() {
170
1806
  return [constants_1.BAGGAGE_HEADER];
@@ -2276,10 +3912,10 @@ var require_composite = __commonJS({
2276
3912
  * @param context Context to inject
2277
3913
  * @param carrier Carrier into which context will be injected
2278
3914
  */
2279
- inject(context, carrier, setter) {
3915
+ inject(context2, carrier, setter) {
2280
3916
  for (const propagator of this._propagators) {
2281
3917
  try {
2282
- propagator.inject(context, carrier, setter);
3918
+ propagator.inject(context2, carrier, setter);
2283
3919
  } catch (err) {
2284
3920
  api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);
2285
3921
  }
@@ -2294,7 +3930,7 @@ var require_composite = __commonJS({
2294
3930
  * @param context Context to add values to
2295
3931
  * @param carrier Carrier from which to extract context
2296
3932
  */
2297
- extract(context, carrier, getter) {
3933
+ extract(context2, carrier, getter) {
2298
3934
  return this._propagators.reduce((ctx, propagator) => {
2299
3935
  try {
2300
3936
  return propagator.extract(ctx, carrier, getter);
@@ -2302,7 +3938,7 @@ var require_composite = __commonJS({
2302
3938
  api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);
2303
3939
  }
2304
3940
  return ctx;
2305
- }, context);
3941
+ }, context2);
2306
3942
  }
2307
3943
  fields() {
2308
3944
  return this._fields.slice();
@@ -2318,20 +3954,20 @@ var require_validators = __commonJS({
2318
3954
  "use strict";
2319
3955
  Object.defineProperty(exports2, "__esModule", { value: true });
2320
3956
  exports2.validateValue = exports2.validateKey = void 0;
2321
- var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
2322
- var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
2323
- var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
2324
- var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
2325
- var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
2326
- var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
2327
- function validateKey(key) {
2328
- return VALID_KEY_REGEX.test(key);
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);
2329
3965
  }
2330
- exports2.validateKey = validateKey;
2331
- function validateValue(value) {
2332
- return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
3966
+ exports2.validateKey = validateKey2;
3967
+ function validateValue2(value) {
3968
+ return VALID_VALUE_BASE_REGEX2.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX2.test(value);
2333
3969
  }
2334
- exports2.validateValue = validateValue;
3970
+ exports2.validateValue = validateValue2;
2335
3971
  }
2336
3972
  });
2337
3973
 
@@ -2342,10 +3978,10 @@ var require_TraceState = __commonJS({
2342
3978
  Object.defineProperty(exports2, "__esModule", { value: true });
2343
3979
  exports2.TraceState = void 0;
2344
3980
  var validators_1 = require_validators();
2345
- var MAX_TRACE_STATE_ITEMS = 32;
2346
- var MAX_TRACE_STATE_LEN = 512;
2347
- var LIST_MEMBERS_SEPARATOR = ",";
2348
- var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
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 = "=";
2349
3985
  var TraceState = class _TraceState {
2350
3986
  constructor(rawTraceState) {
2351
3987
  this._internalState = /* @__PURE__ */ new Map();
@@ -2370,16 +4006,16 @@ var require_TraceState = __commonJS({
2370
4006
  }
2371
4007
  serialize() {
2372
4008
  return this._keys().reduce((agg, key) => {
2373
- agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
4009
+ agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER2 + this.get(key));
2374
4010
  return agg;
2375
- }, []).join(LIST_MEMBERS_SEPARATOR);
4011
+ }, []).join(LIST_MEMBERS_SEPARATOR2);
2376
4012
  }
2377
4013
  _parse(rawTraceState) {
2378
- if (rawTraceState.length > MAX_TRACE_STATE_LEN)
4014
+ if (rawTraceState.length > MAX_TRACE_STATE_LEN2)
2379
4015
  return;
2380
- this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reverse().reduce((agg, part) => {
4016
+ this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR2).reverse().reduce((agg, part) => {
2381
4017
  const listMember = part.trim();
2382
- const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
4018
+ const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER2);
2383
4019
  if (i !== -1) {
2384
4020
  const key = listMember.slice(0, i);
2385
4021
  const value = listMember.slice(i + 1, part.length);
@@ -2390,8 +4026,8 @@ var require_TraceState = __commonJS({
2390
4026
  }
2391
4027
  return agg;
2392
4028
  }, /* @__PURE__ */ new Map());
2393
- if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
2394
- this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
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));
2395
4031
  }
2396
4032
  }
2397
4033
  _keys() {
@@ -2418,7 +4054,7 @@ var require_W3CTraceContextPropagator = __commonJS({
2418
4054
  var TraceState_1 = require_TraceState();
2419
4055
  exports2.TRACE_PARENT_HEADER = "traceparent";
2420
4056
  exports2.TRACE_STATE_HEADER = "tracestate";
2421
- var VERSION = "00";
4057
+ var VERSION2 = "00";
2422
4058
  var VERSION_PART = "(?!ff)[\\da-f]{2}";
2423
4059
  var TRACE_ID_PART = "(?![0]{32})[\\da-f]{32}";
2424
4060
  var PARENT_ID_PART = "(?![0]{16})[\\da-f]{16}";
@@ -2438,33 +4074,33 @@ var require_W3CTraceContextPropagator = __commonJS({
2438
4074
  }
2439
4075
  exports2.parseTraceParent = parseTraceParent;
2440
4076
  var W3CTraceContextPropagator = class {
2441
- inject(context, carrier, setter) {
2442
- const spanContext = api_1.trace.getSpanContext(context);
2443
- if (!spanContext || (0, suppress_tracing_1.isTracingSuppressed)(context) || !(0, api_1.isSpanContextValid)(spanContext))
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))
2444
4080
  return;
2445
- const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;
4081
+ const traceParent = `${VERSION2}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;
2446
4082
  setter.set(carrier, exports2.TRACE_PARENT_HEADER, traceParent);
2447
4083
  if (spanContext.traceState) {
2448
4084
  setter.set(carrier, exports2.TRACE_STATE_HEADER, spanContext.traceState.serialize());
2449
4085
  }
2450
4086
  }
2451
- extract(context, carrier, getter) {
4087
+ extract(context2, carrier, getter) {
2452
4088
  const traceParentHeader = getter.get(carrier, exports2.TRACE_PARENT_HEADER);
2453
4089
  if (!traceParentHeader)
2454
- return context;
4090
+ return context2;
2455
4091
  const traceParent = Array.isArray(traceParentHeader) ? traceParentHeader[0] : traceParentHeader;
2456
4092
  if (typeof traceParent !== "string")
2457
- return context;
4093
+ return context2;
2458
4094
  const spanContext = parseTraceParent(traceParent);
2459
4095
  if (!spanContext)
2460
- return context;
4096
+ return context2;
2461
4097
  spanContext.isRemote = true;
2462
4098
  const traceStateHeader = getter.get(carrier, exports2.TRACE_STATE_HEADER);
2463
4099
  if (traceStateHeader) {
2464
4100
  const state = Array.isArray(traceStateHeader) ? traceStateHeader.join(",") : traceStateHeader;
2465
4101
  spanContext.traceState = new TraceState_1.TraceState(typeof state === "string" ? state : void 0);
2466
4102
  }
2467
- return api_1.trace.setSpanContext(context, spanContext);
4103
+ return api_1.trace.setSpanContext(context2, spanContext);
2468
4104
  }
2469
4105
  fields() {
2470
4106
  return [exports2.TRACE_PARENT_HEADER, exports2.TRACE_STATE_HEADER];
@@ -2494,16 +4130,16 @@ var require_rpc_metadata = __commonJS({
2494
4130
  (function(RPCType2) {
2495
4131
  RPCType2["HTTP"] = "http";
2496
4132
  })(RPCType = exports2.RPCType || (exports2.RPCType = {}));
2497
- function setRPCMetadata(context, meta) {
2498
- return context.setValue(RPC_METADATA_KEY, meta);
4133
+ function setRPCMetadata(context2, meta) {
4134
+ return context2.setValue(RPC_METADATA_KEY, meta);
2499
4135
  }
2500
4136
  exports2.setRPCMetadata = setRPCMetadata;
2501
- function deleteRPCMetadata(context) {
2502
- return context.deleteValue(RPC_METADATA_KEY);
4137
+ function deleteRPCMetadata(context2) {
4138
+ return context2.deleteValue(RPC_METADATA_KEY);
2503
4139
  }
2504
4140
  exports2.deleteRPCMetadata = deleteRPCMetadata;
2505
- function getRPCMetadata(context) {
2506
- return context.getValue(RPC_METADATA_KEY);
4141
+ function getRPCMetadata(context2) {
4142
+ return context2.getValue(RPC_METADATA_KEY);
2507
4143
  }
2508
4144
  exports2.getRPCMetadata = getRPCMetadata;
2509
4145
  }
@@ -2574,21 +4210,21 @@ var require_ParentBasedSampler = __commonJS({
2574
4210
  this._localParentSampled = (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler();
2575
4211
  this._localParentNotSampled = (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler();
2576
4212
  }
2577
- shouldSample(context, traceId, spanName, spanKind, attributes, links) {
2578
- const parentContext = api_1.trace.getSpanContext(context);
4213
+ shouldSample(context2, traceId, spanName, spanKind, attributes, links) {
4214
+ const parentContext = api_1.trace.getSpanContext(context2);
2579
4215
  if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {
2580
- return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);
4216
+ return this._root.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
2581
4217
  }
2582
4218
  if (parentContext.isRemote) {
2583
4219
  if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
2584
- return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
4220
+ return this._remoteParentSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
2585
4221
  }
2586
- return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
4222
+ return this._remoteParentNotSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
2587
4223
  }
2588
4224
  if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
2589
- return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
4225
+ return this._localParentSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
2590
4226
  }
2591
- return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
4227
+ return this._localParentNotSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
2592
4228
  }
2593
4229
  toString() {
2594
4230
  return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;
@@ -2611,7 +4247,7 @@ var require_TraceIdRatioBasedSampler = __commonJS({
2611
4247
  this._ratio = this._normalize(_ratio);
2612
4248
  this._upperBound = Math.floor(this._ratio * 4294967295);
2613
4249
  }
2614
- shouldSample(context, traceId) {
4250
+ shouldSample(context2, traceId) {
2615
4251
  return {
2616
4252
  decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound ? api_1.SamplingDecision.RECORD_AND_SAMPLED : api_1.SamplingDecision.NOT_RECORD
2617
4253
  };
@@ -5892,12 +7528,12 @@ var require_InMemoryMetricExporter = __commonJS({
5892
7528
  /**
5893
7529
  * @inheritedDoc
5894
7530
  */
5895
- export(metrics, resultCallback) {
7531
+ export(metrics2, resultCallback) {
5896
7532
  if (this._shutdown) {
5897
7533
  setTimeout(() => resultCallback({ code: core_1.ExportResultCode.FAILED }), 0);
5898
7534
  return;
5899
7535
  }
5900
- this._metrics.push(metrics);
7536
+ this._metrics.push(metrics2);
5901
7537
  setTimeout(() => resultCallback({ code: core_1.ExportResultCode.SUCCESS }), 0);
5902
7538
  }
5903
7539
  /**
@@ -5939,12 +7575,12 @@ var require_ConsoleMetricExporter = __commonJS({
5939
7575
  this._shutdown = false;
5940
7576
  this._temporalitySelector = (_a = options === null || options === void 0 ? void 0 : options.temporalitySelector) !== null && _a !== void 0 ? _a : AggregationSelector_1.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;
5941
7577
  }
5942
- export(metrics, resultCallback) {
7578
+ export(metrics2, resultCallback) {
5943
7579
  if (this._shutdown) {
5944
7580
  setImmediate(resultCallback, { code: core_1.ExportResultCode.FAILED });
5945
7581
  return;
5946
7582
  }
5947
- return _ConsoleMetricExporter._sendMetrics(metrics, resultCallback);
7583
+ return _ConsoleMetricExporter._sendMetrics(metrics2, resultCallback);
5948
7584
  }
5949
7585
  forceFlush() {
5950
7586
  return Promise.resolve();
@@ -5956,8 +7592,8 @@ var require_ConsoleMetricExporter = __commonJS({
5956
7592
  this._shutdown = true;
5957
7593
  return Promise.resolve();
5958
7594
  }
5959
- static _sendMetrics(metrics, done) {
5960
- for (const scopeMetrics of metrics.scopeMetrics) {
7595
+ static _sendMetrics(metrics2, done) {
7596
+ for (const scopeMetrics of metrics2.scopeMetrics) {
5961
7597
  for (const metric of scopeMetrics.metrics) {
5962
7598
  console.dir({
5963
7599
  descriptor: metric.descriptor,
@@ -6881,7 +8517,7 @@ var require_Instruments = __commonJS({
6881
8517
  this._writableMetricStorage = _writableMetricStorage;
6882
8518
  this._descriptor = _descriptor;
6883
8519
  }
6884
- _record(value, attributes = {}, context = api_1.context.active()) {
8520
+ _record(value, attributes = {}, context2 = api_1.context.active()) {
6885
8521
  if (typeof value !== "number") {
6886
8522
  api_1.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${value}`);
6887
8523
  return;
@@ -6893,7 +8529,7 @@ var require_Instruments = __commonJS({
6893
8529
  return;
6894
8530
  }
6895
8531
  }
6896
- this._writableMetricStorage.record(value, attributes, context, (0, core_1.millisToHrTime)(Date.now()));
8532
+ this._writableMetricStorage.record(value, attributes, context2, (0, core_1.millisToHrTime)(Date.now()));
6897
8533
  }
6898
8534
  };
6899
8535
  exports2.SyncInstrument = SyncInstrument;
@@ -7526,9 +9162,9 @@ var require_MultiWritableMetricStorage = __commonJS({
7526
9162
  constructor(_backingStorages) {
7527
9163
  this._backingStorages = _backingStorages;
7528
9164
  }
7529
- record(value, attributes, context, recordTime) {
9165
+ record(value, attributes, context2, recordTime) {
7530
9166
  this._backingStorages.forEach((it) => {
7531
- it.record(value, attributes, context, recordTime);
9167
+ it.record(value, attributes, context2, recordTime);
7532
9168
  });
7533
9169
  }
7534
9170
  };
@@ -7729,9 +9365,9 @@ var require_SyncMetricStorage = __commonJS({
7729
9365
  this._deltaMetricStorage = new DeltaMetricProcessor_1.DeltaMetricProcessor(aggregator);
7730
9366
  this._temporalMetricStorage = new TemporalMetricProcessor_1.TemporalMetricProcessor(aggregator, collectorHandles);
7731
9367
  }
7732
- record(value, attributes, context, recordTime) {
7733
- attributes = this._attributesProcessor.process(attributes, context);
7734
- this._deltaMetricStorage.record(value, attributes, context, recordTime);
9368
+ record(value, attributes, context2, recordTime) {
9369
+ attributes = this._attributesProcessor.process(attributes, context2);
9370
+ this._deltaMetricStorage.record(value, attributes, context2, recordTime);
7735
9371
  }
7736
9372
  /**
7737
9373
  * Collects the metrics from this storage.
@@ -8367,13 +10003,13 @@ var require_internal3 = __commonJS({
8367
10003
  }
8368
10004
  exports2.toResourceMetrics = toResourceMetrics;
8369
10005
  function toScopeMetrics(scopeMetrics, encoder) {
8370
- return Array.from(scopeMetrics.map((metrics) => ({
10006
+ return Array.from(scopeMetrics.map((metrics2) => ({
8371
10007
  scope: {
8372
- name: metrics.scope.name,
8373
- version: metrics.scope.version
10008
+ name: metrics2.scope.name,
10009
+ version: metrics2.scope.version
8374
10010
  },
8375
- metrics: metrics.metrics.map((metricData) => toMetric(metricData, encoder)),
8376
- schemaUrl: metrics.scope.schemaUrl
10011
+ metrics: metrics2.metrics.map((metricData) => toMetric(metricData, encoder)),
10012
+ schemaUrl: metrics2.scope.schemaUrl
8377
10013
  })));
8378
10014
  }
8379
10015
  exports2.toScopeMetrics = toScopeMetrics;
@@ -8494,7 +10130,7 @@ var require_metrics = __commonJS({
8494
10130
  var internal_1 = require_internal3();
8495
10131
  function createExportMetricsServiceRequest(resourceMetrics, options) {
8496
10132
  return {
8497
- resourceMetrics: resourceMetrics.map((metrics) => (0, internal_1.toResourceMetrics)(metrics, options))
10133
+ resourceMetrics: resourceMetrics.map((metrics2) => (0, internal_1.toResourceMetrics)(metrics2, options))
8498
10134
  };
8499
10135
  }
8500
10136
  exports2.createExportMetricsServiceRequest = createExportMetricsServiceRequest;
@@ -9008,12 +10644,12 @@ var require_LogRecord2 = __commonJS({
9008
10644
  this.attributes = {};
9009
10645
  this.totalAttributesCount = 0;
9010
10646
  this._isReadonly = false;
9011
- const { timestamp, observedTimestamp, severityNumber, severityText, body, attributes = {}, context } = logRecord;
10647
+ const { timestamp, observedTimestamp, severityNumber, severityText, body, attributes = {}, context: context2 } = logRecord;
9012
10648
  const now = Date.now();
9013
10649
  this.hrTime = (0, core_1.timeInputToHrTime)(timestamp !== null && timestamp !== void 0 ? timestamp : now);
9014
10650
  this.hrTimeObserved = (0, core_1.timeInputToHrTime)(observedTimestamp !== null && observedTimestamp !== void 0 ? observedTimestamp : now);
9015
- if (context) {
9016
- const spanContext = api.trace.getSpanContext(context);
10651
+ if (context2) {
10652
+ const spanContext = api.trace.getSpanContext(context2);
9017
10653
  if (spanContext && api.isSpanContextValid(spanContext)) {
9018
10654
  this.spanContext = spanContext;
9019
10655
  }
@@ -9215,8 +10851,8 @@ var require_MultiLogRecordProcessor = __commonJS({
9215
10851
  const timeout = this.forceFlushTimeoutMillis;
9216
10852
  await Promise.all(this.processors.map((processor) => (0, core_1.callWithTimeout)(processor.forceFlush(), timeout)));
9217
10853
  }
9218
- onEmit(logRecord, context) {
9219
- this.processors.forEach((processors) => processors.onEmit(logRecord, context));
10854
+ onEmit(logRecord, context2) {
10855
+ this.processors.forEach((processors) => processors.onEmit(logRecord, context2));
9220
10856
  }
9221
10857
  async shutdown() {
9222
10858
  await Promise.all(this.processors.map((processor) => processor.shutdown()));
@@ -9719,19 +11355,19 @@ var require_AbstractAsyncHooksContextManager = __commonJS({
9719
11355
  * @param target a function or event emitter. When target or one of its callbacks is called,
9720
11356
  * the provided context will be used as the active context for the duration of the call.
9721
11357
  */
9722
- bind(context, target) {
11358
+ bind(context2, target) {
9723
11359
  if (target instanceof events_1.EventEmitter) {
9724
- return this._bindEventEmitter(context, target);
11360
+ return this._bindEventEmitter(context2, target);
9725
11361
  }
9726
11362
  if (typeof target === "function") {
9727
- return this._bindFunction(context, target);
11363
+ return this._bindFunction(context2, target);
9728
11364
  }
9729
11365
  return target;
9730
11366
  }
9731
- _bindFunction(context, target) {
11367
+ _bindFunction(context2, target) {
9732
11368
  const manager = this;
9733
11369
  const contextWrapper = function(...args) {
9734
- return manager.with(context, () => target.apply(this, args));
11370
+ return manager.with(context2, () => target.apply(this, args));
9735
11371
  };
9736
11372
  Object.defineProperty(contextWrapper, "length", {
9737
11373
  enumerable: false,
@@ -9748,7 +11384,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS({
9748
11384
  * @param context the context we want to bind
9749
11385
  * @param ee EventEmitter an instance of EventEmitter to patch
9750
11386
  */
9751
- _bindEventEmitter(context, ee) {
11387
+ _bindEventEmitter(context2, ee) {
9752
11388
  const map = this._getPatchMap(ee);
9753
11389
  if (map !== void 0)
9754
11390
  return ee;
@@ -9756,7 +11392,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS({
9756
11392
  ADD_LISTENER_METHODS.forEach((methodName) => {
9757
11393
  if (ee[methodName] === void 0)
9758
11394
  return;
9759
- ee[methodName] = this._patchAddListener(ee, ee[methodName], context);
11395
+ ee[methodName] = this._patchAddListener(ee, ee[methodName], context2);
9760
11396
  });
9761
11397
  if (typeof ee.removeListener === "function") {
9762
11398
  ee.removeListener = this._patchRemoveListener(ee, ee.removeListener);
@@ -9814,7 +11450,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS({
9814
11450
  * @param original reference to the patched method
9815
11451
  * @param [context] context to propagate when calling listeners
9816
11452
  */
9817
- _patchAddListener(ee, original, context) {
11453
+ _patchAddListener(ee, original, context2) {
9818
11454
  const contextManager = this;
9819
11455
  return function(event, listener) {
9820
11456
  if (contextManager._wrapped) {
@@ -9829,7 +11465,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS({
9829
11465
  listeners = /* @__PURE__ */ new WeakMap();
9830
11466
  map[event] = listeners;
9831
11467
  }
9832
- const patchedListener = contextManager.bind(context, listener);
11468
+ const patchedListener = contextManager.bind(context2, listener);
9833
11469
  listeners.set(listener, patchedListener);
9834
11470
  contextManager._wrapped = true;
9835
11471
  try {
@@ -9878,8 +11514,8 @@ var require_AsyncHooksContextManager = __commonJS({
9878
11514
  var _a;
9879
11515
  return (_a = this._stack[this._stack.length - 1]) !== null && _a !== void 0 ? _a : api_1.ROOT_CONTEXT;
9880
11516
  }
9881
- with(context, fn, thisArg, ...args) {
9882
- this._enterContext(context);
11517
+ with(context2, fn, thisArg, ...args) {
11518
+ this._enterContext(context2);
9883
11519
  try {
9884
11520
  return fn.call(thisArg, ...args);
9885
11521
  } finally {
@@ -9905,9 +11541,9 @@ var require_AsyncHooksContextManager = __commonJS({
9905
11541
  _init(uid, type) {
9906
11542
  if (type === "TIMERWRAP")
9907
11543
  return;
9908
- const context = this._stack[this._stack.length - 1];
9909
- if (context !== void 0) {
9910
- this._contexts.set(uid, context);
11544
+ const context2 = this._stack[this._stack.length - 1];
11545
+ if (context2 !== void 0) {
11546
+ this._contexts.set(uid, context2);
9911
11547
  }
9912
11548
  }
9913
11549
  /**
@@ -9923,9 +11559,9 @@ var require_AsyncHooksContextManager = __commonJS({
9923
11559
  * @param uid uid of the async context
9924
11560
  */
9925
11561
  _before(uid) {
9926
- const context = this._contexts.get(uid);
9927
- if (context !== void 0) {
9928
- this._enterContext(context);
11562
+ const context2 = this._contexts.get(uid);
11563
+ if (context2 !== void 0) {
11564
+ this._enterContext(context2);
9929
11565
  }
9930
11566
  }
9931
11567
  /**
@@ -9937,8 +11573,8 @@ var require_AsyncHooksContextManager = __commonJS({
9937
11573
  /**
9938
11574
  * Set the given context as active
9939
11575
  */
9940
- _enterContext(context) {
9941
- this._stack.push(context);
11576
+ _enterContext(context2) {
11577
+ this._stack.push(context2);
9942
11578
  }
9943
11579
  /**
9944
11580
  * Remove the context at the root of the stack
@@ -9969,9 +11605,9 @@ var require_AsyncLocalStorageContextManager = __commonJS({
9969
11605
  var _a;
9970
11606
  return (_a = this._asyncLocalStorage.getStore()) !== null && _a !== void 0 ? _a : api_1.ROOT_CONTEXT;
9971
11607
  }
9972
- with(context, fn, thisArg, ...args) {
11608
+ with(context2, fn, thisArg, ...args) {
9973
11609
  const cb = thisArg == null ? fn : fn.bind(thisArg);
9974
- return this._asyncLocalStorage.run(context, cb, ...args);
11610
+ return this._asyncLocalStorage.run(context2, cb, ...args);
9975
11611
  }
9976
11612
  enable() {
9977
11613
  return this;
@@ -10089,11 +11725,11 @@ var require_B3MultiPropagator = __commonJS({
10089
11725
  return;
10090
11726
  }
10091
11727
  var B3MultiPropagator = class {
10092
- inject(context, carrier, setter) {
10093
- const spanContext = api_1.trace.getSpanContext(context);
10094
- if (!spanContext || !(0, api_1.isSpanContextValid)(spanContext) || (0, core_1.isTracingSuppressed)(context))
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))
10095
11731
  return;
10096
- const debug = context.getValue(common_1.B3_DEBUG_FLAG_KEY);
11732
+ const debug = context2.getValue(common_1.B3_DEBUG_FLAG_KEY);
10097
11733
  setter.set(carrier, constants_1.X_B3_TRACE_ID, spanContext.traceId);
10098
11734
  setter.set(carrier, constants_1.X_B3_SPAN_ID, spanContext.spanId);
10099
11735
  if (debug === "1") {
@@ -10102,21 +11738,21 @@ var require_B3MultiPropagator = __commonJS({
10102
11738
  setter.set(carrier, constants_1.X_B3_SAMPLED, (api_1.TraceFlags.SAMPLED & spanContext.traceFlags) === api_1.TraceFlags.SAMPLED ? "1" : "0");
10103
11739
  }
10104
11740
  }
10105
- extract(context, carrier, getter) {
11741
+ extract(context2, carrier, getter) {
10106
11742
  const traceId = getTraceId(carrier, getter);
10107
11743
  const spanId = getSpanId(carrier, getter);
10108
11744
  const traceFlags = getTraceFlags(carrier, getter);
10109
11745
  const debug = getDebug(carrier, getter);
10110
11746
  if ((0, api_1.isValidTraceId)(traceId) && (0, api_1.isValidSpanId)(spanId) && isValidSampledValue(traceFlags)) {
10111
- context = context.setValue(common_1.B3_DEBUG_FLAG_KEY, debug);
10112
- return api_1.trace.setSpanContext(context, {
11747
+ context2 = context2.setValue(common_1.B3_DEBUG_FLAG_KEY, debug);
11748
+ return api_1.trace.setSpanContext(context2, {
10113
11749
  traceId,
10114
11750
  spanId,
10115
11751
  isRemote: true,
10116
11752
  traceFlags
10117
11753
  });
10118
11754
  }
10119
- return context;
11755
+ return context2;
10120
11756
  }
10121
11757
  fields() {
10122
11758
  return [
@@ -10156,31 +11792,31 @@ var require_B3SinglePropagator = __commonJS({
10156
11792
  return api_1.TraceFlags.NONE;
10157
11793
  }
10158
11794
  var B3SinglePropagator = class {
10159
- inject(context, carrier, setter) {
10160
- const spanContext = api_1.trace.getSpanContext(context);
10161
- if (!spanContext || !(0, api_1.isSpanContextValid)(spanContext) || (0, core_1.isTracingSuppressed)(context))
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))
10162
11798
  return;
10163
- const samplingState = context.getValue(common_1.B3_DEBUG_FLAG_KEY) || spanContext.traceFlags & 1;
11799
+ const samplingState = context2.getValue(common_1.B3_DEBUG_FLAG_KEY) || spanContext.traceFlags & 1;
10164
11800
  const value = `${spanContext.traceId}-${spanContext.spanId}-${samplingState}`;
10165
11801
  setter.set(carrier, constants_1.B3_CONTEXT_HEADER, value);
10166
11802
  }
10167
- extract(context, carrier, getter) {
11803
+ extract(context2, carrier, getter) {
10168
11804
  const header = getter.get(carrier, constants_1.B3_CONTEXT_HEADER);
10169
11805
  const b3Context = Array.isArray(header) ? header[0] : header;
10170
11806
  if (typeof b3Context !== "string")
10171
- return context;
11807
+ return context2;
10172
11808
  const match = b3Context.match(B3_CONTEXT_REGEX);
10173
11809
  if (!match)
10174
- return context;
11810
+ return context2;
10175
11811
  const [, extractedTraceId, spanId, samplingState] = match;
10176
11812
  const traceId = convertToTraceId128(extractedTraceId);
10177
11813
  if (!(0, api_1.isValidTraceId)(traceId) || !(0, api_1.isValidSpanId)(spanId))
10178
- return context;
11814
+ return context2;
10179
11815
  const traceFlags = convertToTraceFlags(samplingState);
10180
11816
  if (samplingState === DEBUG_STATE) {
10181
- context = context.setValue(common_1.B3_DEBUG_FLAG_KEY, samplingState);
11817
+ context2 = context2.setValue(common_1.B3_DEBUG_FLAG_KEY, samplingState);
10182
11818
  }
10183
- return api_1.trace.setSpanContext(context, {
11819
+ return api_1.trace.setSpanContext(context2, {
10184
11820
  traceId,
10185
11821
  spanId,
10186
11822
  isRemote: true,
@@ -10232,19 +11868,19 @@ var require_B3Propagator = __commonJS({
10232
11868
  this._fields = this._b3SinglePropagator.fields();
10233
11869
  }
10234
11870
  }
10235
- inject(context, carrier, setter) {
10236
- if ((0, core_1.isTracingSuppressed)(context)) {
11871
+ inject(context2, carrier, setter) {
11872
+ if ((0, core_1.isTracingSuppressed)(context2)) {
10237
11873
  return;
10238
11874
  }
10239
- this._inject(context, carrier, setter);
11875
+ this._inject(context2, carrier, setter);
10240
11876
  }
10241
- extract(context, carrier, getter) {
11877
+ extract(context2, carrier, getter) {
10242
11878
  const header = getter.get(carrier, constants_1.B3_CONTEXT_HEADER);
10243
11879
  const b3Context = Array.isArray(header) ? header[0] : header;
10244
11880
  if (b3Context) {
10245
- return this._b3SinglePropagator.extract(context, carrier, getter);
11881
+ return this._b3SinglePropagator.extract(context2, carrier, getter);
10246
11882
  } else {
10247
- return this._b3MultiPropagator.extract(context, carrier, getter);
11883
+ return this._b3MultiPropagator.extract(context2, carrier, getter);
10248
11884
  }
10249
11885
  }
10250
11886
  fields() {
@@ -10308,7 +11944,7 @@ var require_Span = __commonJS({
10308
11944
  *
10309
11945
  * @deprecated calling Span constructor directly is not supported. Please use tracer.startSpan.
10310
11946
  * */
10311
- constructor(parentTracer, context, spanName, spanContext, kind, parentSpanId, links = [], startTime, _deprecatedClock, attributes) {
11947
+ constructor(parentTracer, context2, spanName, spanContext, kind, parentSpanId, links = [], startTime, _deprecatedClock, attributes) {
10312
11948
  this.attributes = {};
10313
11949
  this.links = [];
10314
11950
  this.events = [];
@@ -10339,7 +11975,7 @@ var require_Span = __commonJS({
10339
11975
  this.setAttributes(attributes);
10340
11976
  }
10341
11977
  this._spanProcessor = parentTracer.getActiveSpanProcessor();
10342
- this._spanProcessor.onStart(this, context);
11978
+ this._spanProcessor.onStart(this, context2);
10343
11979
  }
10344
11980
  spanContext() {
10345
11981
  return this._spanContext;
@@ -10547,12 +12183,12 @@ var require_Sampler = __commonJS({
10547
12183
  "use strict";
10548
12184
  Object.defineProperty(exports2, "__esModule", { value: true });
10549
12185
  exports2.SamplingDecision = void 0;
10550
- var SamplingDecision;
10551
- (function(SamplingDecision2) {
10552
- SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
10553
- SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
10554
- SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
10555
- })(SamplingDecision = exports2.SamplingDecision || (exports2.SamplingDecision = {}));
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 = {}));
10556
12192
  }
10557
12193
  });
10558
12194
 
@@ -10621,21 +12257,21 @@ var require_ParentBasedSampler2 = __commonJS({
10621
12257
  this._localParentSampled = (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler();
10622
12258
  this._localParentNotSampled = (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler();
10623
12259
  }
10624
- shouldSample(context, traceId, spanName, spanKind, attributes, links) {
10625
- const parentContext = api_1.trace.getSpanContext(context);
12260
+ shouldSample(context2, traceId, spanName, spanKind, attributes, links) {
12261
+ const parentContext = api_1.trace.getSpanContext(context2);
10626
12262
  if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {
10627
- return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);
12263
+ return this._root.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
10628
12264
  }
10629
12265
  if (parentContext.isRemote) {
10630
12266
  if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
10631
- return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
12267
+ return this._remoteParentSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
10632
12268
  }
10633
- return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
12269
+ return this._remoteParentNotSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
10634
12270
  }
10635
12271
  if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
10636
- return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
12272
+ return this._localParentSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
10637
12273
  }
10638
- return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);
12274
+ return this._localParentNotSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
10639
12275
  }
10640
12276
  toString() {
10641
12277
  return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;
@@ -10659,7 +12295,7 @@ var require_TraceIdRatioBasedSampler2 = __commonJS({
10659
12295
  this._ratio = this._normalize(_ratio);
10660
12296
  this._upperBound = Math.floor(this._ratio * 4294967295);
10661
12297
  }
10662
- shouldSample(context, traceId) {
12298
+ shouldSample(context2, traceId) {
10663
12299
  return {
10664
12300
  decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound ? Sampler_1.SamplingDecision.RECORD_AND_SAMPLED : Sampler_1.SamplingDecision.NOT_RECORD
10665
12301
  };
@@ -11083,13 +12719,13 @@ var require_Tracer = __commonJS({
11083
12719
  * Starts a new Span or returns the default NoopSpan based on the sampling
11084
12720
  * decision.
11085
12721
  */
11086
- startSpan(name2, options = {}, context = api.context.active()) {
12722
+ startSpan(name2, options = {}, context2 = api.context.active()) {
11087
12723
  var _a, _b, _c;
11088
12724
  if (options.root) {
11089
- context = api.trace.deleteSpan(context);
12725
+ context2 = api.trace.deleteSpan(context2);
11090
12726
  }
11091
- const parentSpan = api.trace.getSpan(context);
11092
- if ((0, core_1.isTracingSuppressed)(context)) {
12727
+ const parentSpan = api.trace.getSpan(context2);
12728
+ if ((0, core_1.isTracingSuppressed)(context2)) {
11093
12729
  api.diag.debug("Instrumentation suppressed, returning Noop Span");
11094
12730
  const nonRecordingSpan = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);
11095
12731
  return nonRecordingSpan;
@@ -11114,7 +12750,7 @@ var require_Tracer = __commonJS({
11114
12750
  };
11115
12751
  });
11116
12752
  const attributes = (0, core_1.sanitizeAttributes)(options.attributes);
11117
- const samplingResult = this._sampler.shouldSample(context, traceId, name2, spanKind, attributes, links);
12753
+ const samplingResult = this._sampler.shouldSample(context2, traceId, name2, spanKind, attributes, links);
11118
12754
  traceState = (_c = samplingResult.traceState) !== null && _c !== void 0 ? _c : traceState;
11119
12755
  const traceFlags = samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED ? api.TraceFlags.SAMPLED : api.TraceFlags.NONE;
11120
12756
  const spanContext = { traceId, spanId, traceFlags, traceState };
@@ -11124,7 +12760,7 @@ var require_Tracer = __commonJS({
11124
12760
  return nonRecordingSpan;
11125
12761
  }
11126
12762
  const initAttributes = (0, core_1.sanitizeAttributes)(Object.assign(attributes, samplingResult.attributes));
11127
- const span = new Span_1.Span(this, context, name2, spanContext, spanKind, parentSpanId, links, options.startTime, void 0, initAttributes);
12763
+ const span = new Span_1.Span(this, context2, name2, spanContext, spanKind, parentSpanId, links, options.startTime, void 0, initAttributes);
11128
12764
  return span;
11129
12765
  }
11130
12766
  startActiveSpan(name2, arg2, arg3, arg4) {
@@ -11189,9 +12825,9 @@ var require_MultiSpanProcessor = __commonJS({
11189
12825
  });
11190
12826
  });
11191
12827
  }
11192
- onStart(span, context) {
12828
+ onStart(span, context2) {
11193
12829
  for (const spanProcessor of this._spanProcessors) {
11194
- spanProcessor.onStart(span, context);
12830
+ spanProcessor.onStart(span, context2);
11195
12831
  }
11196
12832
  }
11197
12833
  onEnd(span) {
@@ -11699,10 +13335,10 @@ var require_JaegerPropagator = __commonJS({
11699
13335
  this._jaegerBaggageHeaderPrefix = (config === null || config === void 0 ? void 0 : config.customBaggageHeaderPrefix) || exports2.UBER_BAGGAGE_HEADER_PREFIX;
11700
13336
  }
11701
13337
  }
11702
- inject(context, carrier, setter) {
11703
- const spanContext = api_1.trace.getSpanContext(context);
11704
- const baggage = api_1.propagation.getBaggage(context);
11705
- if (spanContext && (0, core_1.isTracingSuppressed)(context) === false) {
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) {
11706
13342
  const traceFlags = `0${(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;
11707
13343
  setter.set(carrier, this._jaegerTraceHeader, `${spanContext.traceId}:${spanContext.spanId}:0:${traceFlags}`);
11708
13344
  }
@@ -11712,7 +13348,7 @@ var require_JaegerPropagator = __commonJS({
11712
13348
  }
11713
13349
  }
11714
13350
  }
11715
- extract(context, carrier, getter) {
13351
+ extract(context2, carrier, getter) {
11716
13352
  var _a;
11717
13353
  const uberTraceIdHeader = getter.get(carrier, this._jaegerTraceHeader);
11718
13354
  const uberTraceId = Array.isArray(uberTraceIdHeader) ? uberTraceIdHeader[0] : uberTraceIdHeader;
@@ -11723,7 +13359,7 @@ var require_JaegerPropagator = __commonJS({
11723
13359
  value: Array.isArray(value) ? value[0] : value
11724
13360
  };
11725
13361
  });
11726
- let newContext = context;
13362
+ let newContext = context2;
11727
13363
  if (typeof uberTraceId === "string") {
11728
13364
  const spanContext = deserializeSpanContext(uberTraceId);
11729
13365
  if (spanContext) {
@@ -11732,7 +13368,7 @@ var require_JaegerPropagator = __commonJS({
11732
13368
  }
11733
13369
  if (baggageValues.length === 0)
11734
13370
  return newContext;
11735
- let currentBaggage = (_a = api_1.propagation.getBaggage(context)) !== null && _a !== void 0 ? _a : api_1.propagation.createBaggage();
13371
+ let currentBaggage = (_a = api_1.propagation.getBaggage(context2)) !== null && _a !== void 0 ? _a : api_1.propagation.createBaggage();
11736
13372
  for (const baggageEntry of baggageValues) {
11737
13373
  if (baggageEntry.value === void 0)
11738
13374
  continue;
@@ -14214,8 +15850,8 @@ var require_require_in_the_middle = __commonJS({
14214
15850
  if (Module.isBuiltin) {
14215
15851
  isCore = Module.isBuiltin;
14216
15852
  } else {
14217
- const [major, minor] = process.versions.node.split(".").map(Number);
14218
- if (major === 8 && minor < 8) {
15853
+ const [major2, minor] = process.versions.node.split(".").map(Number);
15854
+ if (major2 === 8 && minor < 8) {
14219
15855
  isCore = (moduleName2) => {
14220
15856
  if (moduleName2 === "http2") {
14221
15857
  return true;
@@ -19162,8 +20798,8 @@ var require_root = __commonJS({
19162
20798
  return trace2;
19163
20799
  }();
19164
20800
  collector.metrics = function() {
19165
- var metrics = {};
19166
- metrics.v1 = function() {
20801
+ var metrics2 = {};
20802
+ metrics2.v1 = function() {
19167
20803
  var v1 = {};
19168
20804
  v1.MetricsService = function() {
19169
20805
  function MetricsService(rpcImpl, requestDelimited, responseDelimited) {
@@ -19497,7 +21133,7 @@ var require_root = __commonJS({
19497
21133
  }();
19498
21134
  return v1;
19499
21135
  }();
19500
- return metrics;
21136
+ return metrics2;
19501
21137
  }();
19502
21138
  collector.logs = function() {
19503
21139
  var logs = {};
@@ -19840,8 +21476,8 @@ var require_root = __commonJS({
19840
21476
  return collector;
19841
21477
  }();
19842
21478
  proto.metrics = function() {
19843
- var metrics = {};
19844
- metrics.v1 = function() {
21479
+ var metrics2 = {};
21480
+ metrics2.v1 = function() {
19845
21481
  var v1 = {};
19846
21482
  v1.MetricsData = function() {
19847
21483
  function MetricsData(properties) {
@@ -23226,7 +24862,7 @@ var require_root = __commonJS({
23226
24862
  }();
23227
24863
  return v1;
23228
24864
  }();
23229
- return metrics;
24865
+ return metrics2;
23230
24866
  }();
23231
24867
  proto.logs = function() {
23232
24868
  var logs = {};
@@ -26738,14 +28374,14 @@ ${callerStack}`;
26738
28374
  }
26739
28375
  _write(chunk, encoding, cb) {
26740
28376
  var _a;
26741
- const context = {
28377
+ const context2 = {
26742
28378
  callback: cb
26743
28379
  };
26744
28380
  const flags = Number(encoding);
26745
28381
  if (!Number.isNaN(flags)) {
26746
- context.flags = flags;
28382
+ context2.flags = flags;
26747
28383
  }
26748
- (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context, chunk);
28384
+ (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context2, chunk);
26749
28385
  }
26750
28386
  _final(cb) {
26751
28387
  var _a;
@@ -26774,14 +28410,14 @@ ${callerStack}`;
26774
28410
  }
26775
28411
  _write(chunk, encoding, cb) {
26776
28412
  var _a;
26777
- const context = {
28413
+ const context2 = {
26778
28414
  callback: cb
26779
28415
  };
26780
28416
  const flags = Number(encoding);
26781
28417
  if (!Number.isNaN(flags)) {
26782
- context.flags = flags;
28418
+ context2.flags = flags;
26783
28419
  }
26784
- (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context, chunk);
28420
+ (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendMessageWithContext(context2, chunk);
26785
28421
  }
26786
28422
  _final(cb) {
26787
28423
  var _a;
@@ -27034,15 +28670,15 @@ var require_client_interceptors = __commonJS({
27034
28670
  });
27035
28671
  }
27036
28672
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
27037
- sendMessageWithContext(context, message) {
28673
+ sendMessageWithContext(context2, message) {
27038
28674
  this.processingMessage = true;
27039
28675
  this.requester.sendMessage(message, (finalMessage) => {
27040
28676
  this.processingMessage = false;
27041
28677
  if (this.processingMetadata) {
27042
- this.pendingMessageContext = context;
28678
+ this.pendingMessageContext = context2;
27043
28679
  this.pendingMessage = message;
27044
28680
  } else {
27045
- this.nextCall.sendMessageWithContext(context, finalMessage);
28681
+ this.nextCall.sendMessageWithContext(context2, finalMessage);
27046
28682
  this.processPendingHalfClose();
27047
28683
  }
27048
28684
  });
@@ -27090,7 +28726,7 @@ var require_client_interceptors = __commonJS({
27090
28726
  return this.call.getPeer();
27091
28727
  }
27092
28728
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
27093
- sendMessageWithContext(context, message) {
28729
+ sendMessageWithContext(context2, message) {
27094
28730
  let serialized;
27095
28731
  try {
27096
28732
  serialized = this.methodDefinition.requestSerialize(message);
@@ -27098,7 +28734,7 @@ var require_client_interceptors = __commonJS({
27098
28734
  this.call.cancelWithStatus(constants_1.Status.INTERNAL, `Request message serialization failure: ${(0, error_1.getErrorMessage)(e)}`);
27099
28735
  return;
27100
28736
  }
27101
- this.call.sendMessageWithContext(context, serialized);
28737
+ this.call.sendMessageWithContext(context2, serialized);
27102
28738
  }
27103
28739
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
27104
28740
  sendMessage(message) {
@@ -30586,12 +32222,12 @@ var require_tokenize = __commonJS({
30586
32222
  return Error("illegal " + subject + " (line " + line + ")");
30587
32223
  }
30588
32224
  function readString() {
30589
- var re = stringDelim === "'" ? stringSingleRe : stringDoubleRe;
30590
- re.lastIndex = offset - 1;
30591
- var match = re.exec(source);
32225
+ var re2 = stringDelim === "'" ? stringSingleRe : stringDoubleRe;
32226
+ re2.lastIndex = offset - 1;
32227
+ var match = re2.exec(source);
30592
32228
  if (!match)
30593
32229
  throw illegal("string");
30594
- offset = re.lastIndex;
32230
+ offset = re2.lastIndex;
30595
32231
  push(stringDelim);
30596
32232
  stringDelim = null;
30597
32233
  return unescape(match[1]);
@@ -35908,7 +37544,7 @@ var require_subchannel_call = __commonJS({
35908
37544
  }
35909
37545
  this.http2Stream.resume();
35910
37546
  }
35911
- sendMessageWithContext(context, message) {
37547
+ sendMessageWithContext(context2, message) {
35912
37548
  this.trace("write() called with message of length " + message.length);
35913
37549
  const cb = (error) => {
35914
37550
  process.nextTick(() => {
@@ -35920,7 +37556,7 @@ var require_subchannel_call = __commonJS({
35920
37556
  if (error) {
35921
37557
  this.cancelWithStatus(code, `Write error: ${error.message}`);
35922
37558
  }
35923
- (_a = context.callback) === null || _a === void 0 ? void 0 : _a.call(context);
37559
+ (_a = context2.callback) === null || _a === void 0 ? void 0 : _a.call(context2);
35924
37560
  });
35925
37561
  };
35926
37562
  this.trace("sending data chunk of length " + message.length);
@@ -37203,12 +38839,12 @@ var require_load_balancing_call = __commonJS({
37203
38839
  this.metadata = metadata;
37204
38840
  this.doPick();
37205
38841
  }
37206
- sendMessageWithContext(context, message) {
38842
+ sendMessageWithContext(context2, message) {
37207
38843
  this.trace("write() called with message of length " + message.length);
37208
38844
  if (this.child) {
37209
- this.child.sendMessageWithContext(context, message);
38845
+ this.child.sendMessageWithContext(context2, message);
37210
38846
  } else {
37211
- this.pendingMessage = { context, message };
38847
+ this.pendingMessage = { context: context2, message };
37212
38848
  }
37213
38849
  }
37214
38850
  startRead() {
@@ -37322,15 +38958,15 @@ var require_resolving_call = __commonJS({
37322
38958
  });
37323
38959
  }
37324
38960
  }
37325
- sendMessageOnChild(context, message) {
38961
+ sendMessageOnChild(context2, message) {
37326
38962
  if (!this.child) {
37327
38963
  throw new Error("sendMessageonChild called with child not populated");
37328
38964
  }
37329
38965
  const child = this.child;
37330
38966
  this.writeFilterPending = true;
37331
- this.filterStack.sendMessage(Promise.resolve({ message, flags: context.flags })).then((filteredMessage) => {
38967
+ this.filterStack.sendMessage(Promise.resolve({ message, flags: context2.flags })).then((filteredMessage) => {
37332
38968
  this.writeFilterPending = false;
37333
- child.sendMessageWithContext(context, filteredMessage.message);
38969
+ child.sendMessageWithContext(context2, filteredMessage.message);
37334
38970
  if (this.pendingHalfClose) {
37335
38971
  child.halfClose();
37336
38972
  }
@@ -37447,12 +39083,12 @@ var require_resolving_call = __commonJS({
37447
39083
  this.listener = listener;
37448
39084
  this.getConfig();
37449
39085
  }
37450
- sendMessageWithContext(context, message) {
39086
+ sendMessageWithContext(context2, message) {
37451
39087
  this.trace("write() called with message of length " + message.length);
37452
39088
  if (this.child) {
37453
- this.sendMessageOnChild(context, message);
39089
+ this.sendMessageOnChild(context2, message);
37454
39090
  } else {
37455
- this.pendingMessage = { context, message };
39091
+ this.pendingMessage = { context: context2, message };
37456
39092
  }
37457
39093
  }
37458
39094
  startRead() {
@@ -37970,12 +39606,12 @@ var require_retrying_call = __commonJS({
37970
39606
  }
37971
39607
  }
37972
39608
  }
37973
- sendMessageWithContext(context, message) {
39609
+ sendMessageWithContext(context2, message) {
37974
39610
  var _a;
37975
39611
  this.trace("write() called with message of length " + message.length);
37976
39612
  const writeObj = {
37977
39613
  message,
37978
- flags: context.flags
39614
+ flags: context2.flags
37979
39615
  };
37980
39616
  const messageIndex = this.getNextBufferIndex();
37981
39617
  const bufferEntry = {
@@ -37985,7 +39621,7 @@ var require_retrying_call = __commonJS({
37985
39621
  };
37986
39622
  this.writeBuffer.push(bufferEntry);
37987
39623
  if (bufferEntry.allocated) {
37988
- (_a = context.callback) === null || _a === void 0 ? void 0 : _a.call(context);
39624
+ (_a = context2.callback) === null || _a === void 0 ? void 0 : _a.call(context2);
37989
39625
  for (const [callIndex, call] of this.underlyingCalls.entries()) {
37990
39626
  if (call.state === "ACTIVE" && call.nextMessageToSend === messageIndex) {
37991
39627
  call.call.sendMessageWithContext({
@@ -38001,7 +39637,7 @@ var require_retrying_call = __commonJS({
38001
39637
  return;
38002
39638
  }
38003
39639
  const call = this.underlyingCalls[this.committedCallIndex];
38004
- bufferEntry.callback = context.callback;
39640
+ bufferEntry.callback = context2.callback;
38005
39641
  if (call.state === "ACTIVE" && call.nextMessageToSend === messageIndex) {
38006
39642
  call.call.sendMessageWithContext({
38007
39643
  callback: (error) => {
@@ -39634,17 +41270,17 @@ var require_server = __commonJS({
39634
41270
  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
39635
41271
  var _, done = false;
39636
41272
  for (var i = decorators.length - 1; i >= 0; i--) {
39637
- var context = {};
41273
+ var context2 = {};
39638
41274
  for (var p in contextIn)
39639
- context[p] = p === "access" ? {} : contextIn[p];
41275
+ context2[p] = p === "access" ? {} : contextIn[p];
39640
41276
  for (var p in contextIn.access)
39641
- context.access[p] = contextIn.access[p];
39642
- context.addInitializer = function(f) {
41277
+ context2.access[p] = contextIn.access[p];
41278
+ context2.addInitializer = function(f) {
39643
41279
  if (done)
39644
41280
  throw new TypeError("Cannot add initializers after decoration has completed");
39645
41281
  extraInitializers.push(accept(f || null));
39646
41282
  };
39647
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
41283
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
39648
41284
  if (kind === "accessor") {
39649
41285
  if (result === void 0)
39650
41286
  continue;
@@ -39688,7 +41324,7 @@ var require_server = __commonJS({
39688
41324
  function noop() {
39689
41325
  }
39690
41326
  function deprecate(message) {
39691
- return function(target, context) {
41327
+ return function(target, context2) {
39692
41328
  return util.deprecate(target, message);
39693
41329
  };
39694
41330
  }
@@ -44978,8 +46614,8 @@ var require_root3 = __commonJS({
44978
46614
  return trace2;
44979
46615
  }();
44980
46616
  collector.metrics = function() {
44981
- var metrics = {};
44982
- metrics.v1 = function() {
46617
+ var metrics2 = {};
46618
+ metrics2.v1 = function() {
44983
46619
  var v1 = {};
44984
46620
  v1.MetricsService = function() {
44985
46621
  function MetricsService(rpcImpl, requestDelimited, responseDelimited) {
@@ -45313,7 +46949,7 @@ var require_root3 = __commonJS({
45313
46949
  }();
45314
46950
  return v1;
45315
46951
  }();
45316
- return metrics;
46952
+ return metrics2;
45317
46953
  }();
45318
46954
  collector.logs = function() {
45319
46955
  var logs = {};
@@ -45656,8 +47292,8 @@ var require_root3 = __commonJS({
45656
47292
  return collector;
45657
47293
  }();
45658
47294
  proto.metrics = function() {
45659
- var metrics = {};
45660
- metrics.v1 = function() {
47295
+ var metrics2 = {};
47296
+ metrics2.v1 = function() {
45661
47297
  var v1 = {};
45662
47298
  v1.MetricsData = function() {
45663
47299
  function MetricsData(properties) {
@@ -49042,7 +50678,7 @@ var require_root3 = __commonJS({
49042
50678
  }();
49043
50679
  return v1;
49044
50680
  }();
49045
- return metrics;
50681
+ return metrics2;
49046
50682
  }();
49047
50683
  proto.logs = function() {
49048
50684
  var logs = {};
@@ -50554,13 +52190,13 @@ var require_types18 = __commonJS({
50554
52190
  "use strict";
50555
52191
  Object.defineProperty(exports2, "__esModule", { value: true });
50556
52192
  exports2.SpanKind = void 0;
50557
- var SpanKind;
50558
- (function(SpanKind2) {
50559
- SpanKind2["CLIENT"] = "CLIENT";
50560
- SpanKind2["SERVER"] = "SERVER";
50561
- SpanKind2["CONSUMER"] = "CONSUMER";
50562
- SpanKind2["PRODUCER"] = "PRODUCER";
50563
- })(SpanKind = exports2.SpanKind || (exports2.SpanKind = {}));
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 = {}));
50564
52200
  }
50565
52201
  });
50566
52202
 
@@ -51201,10 +52837,9 @@ var import_resources = __toESM(require_src4(), 1);
51201
52837
  var import_sdk_node = __toESM(require_src25(), 1);
51202
52838
  var import_sdk_trace_node = __toESM(require_src14(), 1);
51203
52839
  var import_semantic_conventions = __toESM(require_src(), 1);
51204
- init_esm();
51205
52840
  var {
51206
52841
  default: { version, name }
51207
- } = await import("../../esm-chunks/package-67C5TREY.js");
52842
+ } = await import("../../esm-chunks/package-ZWSB2JUJ.js");
51208
52843
  var sdk = new import_sdk_node.NodeSDK({
51209
52844
  resource: new import_resources.Resource({
51210
52845
  [import_semantic_conventions.SEMRESATTRS_SERVICE_NAME]: name,
@@ -51226,8 +52861,7 @@ process.on("SIGTERM", () => {
51226
52861
  ).finally(() => process.exit(0));
51227
52862
  });
51228
52863
  export {
51229
- tracing_default as default,
51230
- trace
52864
+ tracing_default as default
51231
52865
  };
51232
52866
  /*! Bundled license information:
51233
52867