@workflow/web 5.0.0-beta.5 → 5.0.0-beta.51

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.
Files changed (48) hide show
  1. package/README.md +1 -0
  2. package/build/client/assets/app-9JVnf-IU.css +1 -0
  3. package/build/client/assets/arrow-up-right-D35zSWdr.js +15 -0
  4. package/build/client/assets/{entry.client-DtOpLtMQ.js → entry.client-DmlDFlyx.js} +25 -185
  5. package/build/client/assets/{highlighted-body-B3W2YXNL-L1CrwoL_.js → highlighted-body-B3W2YXNL-CaN05-wF.js} +2 -2
  6. package/build/client/assets/{home-B6UmDDP6.js → home-CERPMYFB.js} +1762 -291
  7. package/build/client/assets/index-HqNj_XIX.js +200 -0
  8. package/build/client/assets/{index-BsV8i_Jn.js → index-thGVuYbY.js} +19 -19
  9. package/build/client/assets/loader-circle-BS067e3l.js +12 -0
  10. package/build/client/assets/manifest-e59a5df7.js +1 -0
  11. package/build/client/assets/mermaid-3ZIDBTTL-D8CjRQta.css +1 -0
  12. package/build/client/assets/{mermaid-3ZIDBTTL-BQLU7GUr.js → mermaid-3ZIDBTTL-DX-qOY9c.js} +17613 -12954
  13. package/build/client/assets/root-Bl5xphvU.css +1 -0
  14. package/build/client/assets/{root-Yk3JVwUh.js → root-D0H-cabN.js} +17 -42
  15. package/build/client/assets/{run-detail-DMUaWXhb.js → run-detail-C7nNgL_7.js} +2215 -1599
  16. package/build/client/assets/run-detail-CWoGxu_0.css +1 -0
  17. package/build/client/assets/{workflow-graph-viewer-yqeN-U_2.js → workflow-graph-viewer-nSzDqm6s.js} +5111 -5254
  18. package/build/client/assets/zstd-B5R2yJjB.wasm +0 -0
  19. package/build/client/assets/zstd-browser-decoder-DtSP7rJ_.js +27 -0
  20. package/build/server/assets/{server-build-DtcOUEHS.js → app-8hyjFpMO.js} +77875 -59603
  21. package/build/server/assets/{highlighted-body-B3W2YXNL-CZjJIpdD.js → highlighted-body-B3W2YXNL-DY_BqM6l.js} +16 -8
  22. package/build/server/assets/index-Az8HzIf_.js +174 -0
  23. package/build/server/assets/index-BfLBLRRi.js +204 -0
  24. package/build/server/assets/index-CETb4fkq.js +1164 -0
  25. package/build/server/assets/index-CvyMHP_b.js +1262 -0
  26. package/build/server/assets/{mermaid-3ZIDBTTL-Cc8IPTBj.js → mermaid-3ZIDBTTL-Bca_z0-z.js} +17 -9
  27. package/build/server/assets/{token-DHnArVm7.js → token-BcUtceXk.js} +5 -2
  28. package/build/server/assets/{token-util-B3uKeZ0s.js → token-util-BgQCuyAc.js} +5 -2
  29. package/build/server/assets/websocket-server-D2905vlr.js +3669 -0
  30. package/build/server/assets/wrapper-BxY6HvLW.js +69 -0
  31. package/build/server/assets/ws-transport-nlG6b7qI.js +551 -0
  32. package/build/server/assets/zstd-browser-decoder-Ce8lEOjC.js +72 -0
  33. package/build/server/index.js +50 -2
  34. package/handler.d.ts +22 -0
  35. package/handler.js +186 -0
  36. package/package.json +27 -13
  37. package/registry.d.ts +29 -0
  38. package/registry.js +89 -0
  39. package/build/client/assets/encryption-CEh0YXii.js +0 -28
  40. package/build/client/assets/index-B4xuge0I.js +0 -249
  41. package/build/client/assets/manifest-e4c1c787.js +0 -1
  42. package/build/client/assets/mermaid-3ZIDBTTL-DKxHcEOp.css +0 -1
  43. package/build/client/assets/root-C0Tu5TVN.css +0 -1
  44. package/build/client/assets/server-build-DqaxIrF0.css +0 -1
  45. package/build/client/assets/worker-CqHKTA7D.js +0 -115
  46. package/build/server/assets/app-L1V62FgT.js +0 -9213
  47. package/build/server/assets/index-BwtNigf1.js +0 -80
  48. package/build/server/assets/index-meg9qk8y.js +0 -1282
@@ -0,0 +1,1164 @@
1
+ import { createRequire as __wkfCreateRequire } from "node:module";
2
+ if (typeof require === "undefined") {
3
+ globalThis.require = __wkfCreateRequire(import.meta.url);
4
+ }
5
+ const VERSION = "1.9.1";
6
+ const re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
7
+ function _makeCompatibilityCheck(ownVersion) {
8
+ const acceptedVersions = /* @__PURE__ */ new Set([ownVersion]);
9
+ const rejectedVersions = /* @__PURE__ */ new Set();
10
+ const myVersionMatch = ownVersion.match(re);
11
+ if (!myVersionMatch) {
12
+ return () => false;
13
+ }
14
+ const ownVersionParsed = {
15
+ major: +myVersionMatch[1],
16
+ minor: +myVersionMatch[2],
17
+ patch: +myVersionMatch[3],
18
+ prerelease: myVersionMatch[4]
19
+ };
20
+ if (ownVersionParsed.prerelease != null) {
21
+ return function isExactmatch(globalVersion) {
22
+ return globalVersion === ownVersion;
23
+ };
24
+ }
25
+ function _reject(v) {
26
+ rejectedVersions.add(v);
27
+ return false;
28
+ }
29
+ function _accept(v) {
30
+ acceptedVersions.add(v);
31
+ return true;
32
+ }
33
+ return function isCompatible2(globalVersion) {
34
+ if (acceptedVersions.has(globalVersion)) {
35
+ return true;
36
+ }
37
+ if (rejectedVersions.has(globalVersion)) {
38
+ return false;
39
+ }
40
+ const globalVersionMatch = globalVersion.match(re);
41
+ if (!globalVersionMatch) {
42
+ return _reject(globalVersion);
43
+ }
44
+ const globalVersionParsed = {
45
+ major: +globalVersionMatch[1],
46
+ minor: +globalVersionMatch[2],
47
+ patch: +globalVersionMatch[3],
48
+ prerelease: globalVersionMatch[4]
49
+ };
50
+ if (globalVersionParsed.prerelease != null) {
51
+ return _reject(globalVersion);
52
+ }
53
+ if (ownVersionParsed.major !== globalVersionParsed.major) {
54
+ return _reject(globalVersion);
55
+ }
56
+ if (ownVersionParsed.major === 0) {
57
+ if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
58
+ return _accept(globalVersion);
59
+ }
60
+ return _reject(globalVersion);
61
+ }
62
+ if (ownVersionParsed.minor <= globalVersionParsed.minor) {
63
+ return _accept(globalVersion);
64
+ }
65
+ return _reject(globalVersion);
66
+ };
67
+ }
68
+ const isCompatible = _makeCompatibilityCheck(VERSION);
69
+ const major = VERSION.split(".")[0];
70
+ const GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
71
+ const _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
72
+ function registerGlobal(type, instance, diag2, allowOverride = false) {
73
+ var _a;
74
+ const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {
75
+ version: VERSION
76
+ };
77
+ if (!allowOverride && api[type]) {
78
+ const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
79
+ diag2.error(err.stack || err.message);
80
+ return false;
81
+ }
82
+ if (api.version !== VERSION) {
83
+ const err = new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${VERSION}`);
84
+ diag2.error(err.stack || err.message);
85
+ return false;
86
+ }
87
+ api[type] = instance;
88
+ diag2.debug(`@opentelemetry/api: Registered a global for ${type} v${VERSION}.`);
89
+ return true;
90
+ }
91
+ function getGlobal(type) {
92
+ var _a, _b;
93
+ const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;
94
+ if (!globalVersion || !isCompatible(globalVersion)) {
95
+ return;
96
+ }
97
+ return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
98
+ }
99
+ function unregisterGlobal(type, diag2) {
100
+ diag2.debug(`@opentelemetry/api: Unregistering a global for ${type} v${VERSION}.`);
101
+ const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
102
+ if (api) {
103
+ delete api[type];
104
+ }
105
+ }
106
+ class DiagComponentLogger {
107
+ constructor(props) {
108
+ this._namespace = props.namespace || "DiagComponentLogger";
109
+ }
110
+ debug(...args) {
111
+ return logProxy("debug", this._namespace, args);
112
+ }
113
+ error(...args) {
114
+ return logProxy("error", this._namespace, args);
115
+ }
116
+ info(...args) {
117
+ return logProxy("info", this._namespace, args);
118
+ }
119
+ warn(...args) {
120
+ return logProxy("warn", this._namespace, args);
121
+ }
122
+ verbose(...args) {
123
+ return logProxy("verbose", this._namespace, args);
124
+ }
125
+ }
126
+ function logProxy(funcName, namespace, args) {
127
+ const logger = getGlobal("diag");
128
+ if (!logger) {
129
+ return;
130
+ }
131
+ return logger[funcName](namespace, ...args);
132
+ }
133
+ var DiagLogLevel;
134
+ (function(DiagLogLevel2) {
135
+ DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
136
+ DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
137
+ DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
138
+ DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
139
+ DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
140
+ DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
141
+ DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
142
+ })(DiagLogLevel || (DiagLogLevel = {}));
143
+ function createLogLevelDiagLogger(maxLevel, logger) {
144
+ if (maxLevel < DiagLogLevel.NONE) {
145
+ maxLevel = DiagLogLevel.NONE;
146
+ } else if (maxLevel > DiagLogLevel.ALL) {
147
+ maxLevel = DiagLogLevel.ALL;
148
+ }
149
+ logger = logger || {};
150
+ function _filterFunc(funcName, theLevel) {
151
+ const theFunc = logger[funcName];
152
+ if (typeof theFunc === "function" && maxLevel >= theLevel) {
153
+ return theFunc.bind(logger);
154
+ }
155
+ return function() {
156
+ };
157
+ }
158
+ return {
159
+ error: _filterFunc("error", DiagLogLevel.ERROR),
160
+ warn: _filterFunc("warn", DiagLogLevel.WARN),
161
+ info: _filterFunc("info", DiagLogLevel.INFO),
162
+ debug: _filterFunc("debug", DiagLogLevel.DEBUG),
163
+ verbose: _filterFunc("verbose", DiagLogLevel.VERBOSE)
164
+ };
165
+ }
166
+ const API_NAME$4 = "diag";
167
+ class DiagAPI {
168
+ /** Get the singleton instance of the DiagAPI API */
169
+ static instance() {
170
+ if (!this._instance) {
171
+ this._instance = new DiagAPI();
172
+ }
173
+ return this._instance;
174
+ }
175
+ /**
176
+ * Private internal constructor
177
+ * @private
178
+ */
179
+ constructor() {
180
+ function _logProxy(funcName) {
181
+ return function(...args) {
182
+ const logger = getGlobal("diag");
183
+ if (!logger)
184
+ return;
185
+ return logger[funcName](...args);
186
+ };
187
+ }
188
+ const self2 = this;
189
+ const setLogger = (logger, optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }) => {
190
+ var _a, _b, _c;
191
+ if (logger === self2) {
192
+ const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
193
+ self2.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
194
+ return false;
195
+ }
196
+ if (typeof optionsOrLogLevel === "number") {
197
+ optionsOrLogLevel = {
198
+ logLevel: optionsOrLogLevel
199
+ };
200
+ }
201
+ const oldLogger = getGlobal("diag");
202
+ const newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);
203
+ if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
204
+ const stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : "<failed to generate stacktrace>";
205
+ oldLogger.warn(`Current logger will be overwritten from ${stack}`);
206
+ newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
207
+ }
208
+ return registerGlobal("diag", newLogger, self2, true);
209
+ };
210
+ self2.setLogger = setLogger;
211
+ self2.disable = () => {
212
+ unregisterGlobal(API_NAME$4, self2);
213
+ };
214
+ self2.createComponentLogger = (options) => {
215
+ return new DiagComponentLogger(options);
216
+ };
217
+ self2.verbose = _logProxy("verbose");
218
+ self2.debug = _logProxy("debug");
219
+ self2.info = _logProxy("info");
220
+ self2.warn = _logProxy("warn");
221
+ self2.error = _logProxy("error");
222
+ }
223
+ }
224
+ class BaggageImpl {
225
+ constructor(entries) {
226
+ this._entries = entries ? new Map(entries) : /* @__PURE__ */ new Map();
227
+ }
228
+ getEntry(key) {
229
+ const entry = this._entries.get(key);
230
+ if (!entry) {
231
+ return void 0;
232
+ }
233
+ return Object.assign({}, entry);
234
+ }
235
+ getAllEntries() {
236
+ return Array.from(this._entries.entries());
237
+ }
238
+ setEntry(key, entry) {
239
+ const newBaggage = new BaggageImpl(this._entries);
240
+ newBaggage._entries.set(key, entry);
241
+ return newBaggage;
242
+ }
243
+ removeEntry(key) {
244
+ const newBaggage = new BaggageImpl(this._entries);
245
+ newBaggage._entries.delete(key);
246
+ return newBaggage;
247
+ }
248
+ removeEntries(...keys) {
249
+ const newBaggage = new BaggageImpl(this._entries);
250
+ for (const key of keys) {
251
+ newBaggage._entries.delete(key);
252
+ }
253
+ return newBaggage;
254
+ }
255
+ clear() {
256
+ return new BaggageImpl();
257
+ }
258
+ }
259
+ const baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
260
+ const diag$1 = DiagAPI.instance();
261
+ function createBaggage(entries = {}) {
262
+ return new BaggageImpl(new Map(Object.entries(entries)));
263
+ }
264
+ function baggageEntryMetadataFromString(str) {
265
+ if (typeof str !== "string") {
266
+ diag$1.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
267
+ str = "";
268
+ }
269
+ return {
270
+ __TYPE__: baggageEntryMetadataSymbol,
271
+ toString() {
272
+ return str;
273
+ }
274
+ };
275
+ }
276
+ function createContextKey(description) {
277
+ return Symbol.for(description);
278
+ }
279
+ class BaseContext {
280
+ /**
281
+ * Construct a new context which inherits values from an optional parent context.
282
+ *
283
+ * @param parentContext a context from which to inherit values
284
+ */
285
+ constructor(parentContext) {
286
+ const self2 = this;
287
+ self2._currentContext = parentContext ? new Map(parentContext) : /* @__PURE__ */ new Map();
288
+ self2.getValue = (key) => self2._currentContext.get(key);
289
+ self2.setValue = (key, value) => {
290
+ const context2 = new BaseContext(self2._currentContext);
291
+ context2._currentContext.set(key, value);
292
+ return context2;
293
+ };
294
+ self2.deleteValue = (key) => {
295
+ const context2 = new BaseContext(self2._currentContext);
296
+ context2._currentContext.delete(key);
297
+ return context2;
298
+ };
299
+ }
300
+ }
301
+ const ROOT_CONTEXT = new BaseContext();
302
+ const consoleMap = [
303
+ { n: "error", c: "error" },
304
+ { n: "warn", c: "warn" },
305
+ { n: "info", c: "info" },
306
+ { n: "debug", c: "debug" },
307
+ { n: "verbose", c: "trace" }
308
+ ];
309
+ const _originalConsoleMethods = {};
310
+ if (typeof console !== "undefined") {
311
+ const keys = [
312
+ "error",
313
+ "warn",
314
+ "info",
315
+ "debug",
316
+ "trace",
317
+ "log"
318
+ ];
319
+ for (const key of keys) {
320
+ if (typeof console[key] === "function") {
321
+ _originalConsoleMethods[key] = console[key];
322
+ }
323
+ }
324
+ }
325
+ class DiagConsoleLogger {
326
+ constructor() {
327
+ function _consoleFunc(funcName) {
328
+ return function(...args) {
329
+ let theFunc = _originalConsoleMethods[funcName];
330
+ if (typeof theFunc !== "function") {
331
+ theFunc = _originalConsoleMethods["log"];
332
+ }
333
+ if (typeof theFunc !== "function" && console) {
334
+ theFunc = console[funcName];
335
+ if (typeof theFunc !== "function") {
336
+ theFunc = console.log;
337
+ }
338
+ }
339
+ if (typeof theFunc === "function") {
340
+ return theFunc.apply(console, args);
341
+ }
342
+ };
343
+ }
344
+ for (let i = 0; i < consoleMap.length; i++) {
345
+ this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
346
+ }
347
+ }
348
+ }
349
+ class NoopMeter {
350
+ constructor() {
351
+ }
352
+ /**
353
+ * @see {@link Meter.createGauge}
354
+ */
355
+ createGauge(_name, _options) {
356
+ return NOOP_GAUGE_METRIC;
357
+ }
358
+ /**
359
+ * @see {@link Meter.createHistogram}
360
+ */
361
+ createHistogram(_name, _options) {
362
+ return NOOP_HISTOGRAM_METRIC;
363
+ }
364
+ /**
365
+ * @see {@link Meter.createCounter}
366
+ */
367
+ createCounter(_name, _options) {
368
+ return NOOP_COUNTER_METRIC;
369
+ }
370
+ /**
371
+ * @see {@link Meter.createUpDownCounter}
372
+ */
373
+ createUpDownCounter(_name, _options) {
374
+ return NOOP_UP_DOWN_COUNTER_METRIC;
375
+ }
376
+ /**
377
+ * @see {@link Meter.createObservableGauge}
378
+ */
379
+ createObservableGauge(_name, _options) {
380
+ return NOOP_OBSERVABLE_GAUGE_METRIC;
381
+ }
382
+ /**
383
+ * @see {@link Meter.createObservableCounter}
384
+ */
385
+ createObservableCounter(_name, _options) {
386
+ return NOOP_OBSERVABLE_COUNTER_METRIC;
387
+ }
388
+ /**
389
+ * @see {@link Meter.createObservableUpDownCounter}
390
+ */
391
+ createObservableUpDownCounter(_name, _options) {
392
+ return NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
393
+ }
394
+ /**
395
+ * @see {@link Meter.addBatchObservableCallback}
396
+ */
397
+ addBatchObservableCallback(_callback, _observables) {
398
+ }
399
+ /**
400
+ * @see {@link Meter.removeBatchObservableCallback}
401
+ */
402
+ removeBatchObservableCallback(_callback) {
403
+ }
404
+ }
405
+ class NoopMetric {
406
+ }
407
+ class NoopCounterMetric extends NoopMetric {
408
+ add(_value, _attributes) {
409
+ }
410
+ }
411
+ class NoopUpDownCounterMetric extends NoopMetric {
412
+ add(_value, _attributes) {
413
+ }
414
+ }
415
+ class NoopGaugeMetric extends NoopMetric {
416
+ record(_value, _attributes) {
417
+ }
418
+ }
419
+ class NoopHistogramMetric extends NoopMetric {
420
+ record(_value, _attributes) {
421
+ }
422
+ }
423
+ class NoopObservableMetric {
424
+ addCallback(_callback) {
425
+ }
426
+ removeCallback(_callback) {
427
+ }
428
+ }
429
+ class NoopObservableCounterMetric extends NoopObservableMetric {
430
+ }
431
+ class NoopObservableGaugeMetric extends NoopObservableMetric {
432
+ }
433
+ class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
434
+ }
435
+ const NOOP_METER = new NoopMeter();
436
+ const NOOP_COUNTER_METRIC = new NoopCounterMetric();
437
+ const NOOP_GAUGE_METRIC = new NoopGaugeMetric();
438
+ const NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();
439
+ const NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();
440
+ const NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric();
441
+ const NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric();
442
+ const NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric();
443
+ function createNoopMeter() {
444
+ return NOOP_METER;
445
+ }
446
+ var ValueType;
447
+ (function(ValueType2) {
448
+ ValueType2[ValueType2["INT"] = 0] = "INT";
449
+ ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
450
+ })(ValueType || (ValueType = {}));
451
+ const defaultTextMapGetter = {
452
+ get(carrier, key) {
453
+ if (carrier == null) {
454
+ return void 0;
455
+ }
456
+ return carrier[key];
457
+ },
458
+ keys(carrier) {
459
+ if (carrier == null) {
460
+ return [];
461
+ }
462
+ return Object.keys(carrier);
463
+ }
464
+ };
465
+ const defaultTextMapSetter = {
466
+ set(carrier, key, value) {
467
+ if (carrier == null) {
468
+ return;
469
+ }
470
+ carrier[key] = value;
471
+ }
472
+ };
473
+ class NoopContextManager {
474
+ active() {
475
+ return ROOT_CONTEXT;
476
+ }
477
+ with(_context, fn, thisArg, ...args) {
478
+ return fn.call(thisArg, ...args);
479
+ }
480
+ bind(_context, target) {
481
+ return target;
482
+ }
483
+ enable() {
484
+ return this;
485
+ }
486
+ disable() {
487
+ return this;
488
+ }
489
+ }
490
+ const API_NAME$3 = "context";
491
+ const NOOP_CONTEXT_MANAGER = new NoopContextManager();
492
+ class ContextAPI {
493
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
494
+ constructor() {
495
+ }
496
+ /** Get the singleton instance of the Context API */
497
+ static getInstance() {
498
+ if (!this._instance) {
499
+ this._instance = new ContextAPI();
500
+ }
501
+ return this._instance;
502
+ }
503
+ /**
504
+ * Set the current context manager.
505
+ *
506
+ * @returns true if the context manager was successfully registered, else false
507
+ */
508
+ setGlobalContextManager(contextManager) {
509
+ return registerGlobal(API_NAME$3, contextManager, DiagAPI.instance());
510
+ }
511
+ /**
512
+ * Get the currently active context
513
+ */
514
+ active() {
515
+ return this._getContextManager().active();
516
+ }
517
+ /**
518
+ * Execute a function with an active context
519
+ *
520
+ * @param context context to be active during function execution
521
+ * @param fn function to execute in a context
522
+ * @param thisArg optional receiver to be used for calling fn
523
+ * @param args optional arguments forwarded to fn
524
+ */
525
+ with(context2, fn, thisArg, ...args) {
526
+ return this._getContextManager().with(context2, fn, thisArg, ...args);
527
+ }
528
+ /**
529
+ * Bind a context to a target function or event emitter
530
+ *
531
+ * @param context context to bind to the event emitter or function. Defaults to the currently active context
532
+ * @param target function or event emitter to bind
533
+ */
534
+ bind(context2, target) {
535
+ return this._getContextManager().bind(context2, target);
536
+ }
537
+ _getContextManager() {
538
+ return getGlobal(API_NAME$3) || NOOP_CONTEXT_MANAGER;
539
+ }
540
+ /** Disable and remove the global context manager */
541
+ disable() {
542
+ this._getContextManager().disable();
543
+ unregisterGlobal(API_NAME$3, DiagAPI.instance());
544
+ }
545
+ }
546
+ var TraceFlags;
547
+ (function(TraceFlags2) {
548
+ TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
549
+ TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
550
+ })(TraceFlags || (TraceFlags = {}));
551
+ const INVALID_SPANID = "0000000000000000";
552
+ const INVALID_TRACEID = "00000000000000000000000000000000";
553
+ const INVALID_SPAN_CONTEXT = {
554
+ traceId: INVALID_TRACEID,
555
+ spanId: INVALID_SPANID,
556
+ traceFlags: TraceFlags.NONE
557
+ };
558
+ class NonRecordingSpan {
559
+ constructor(spanContext = INVALID_SPAN_CONTEXT) {
560
+ this._spanContext = spanContext;
561
+ }
562
+ // Returns a SpanContext.
563
+ spanContext() {
564
+ return this._spanContext;
565
+ }
566
+ // By default does nothing
567
+ setAttribute(_key, _value) {
568
+ return this;
569
+ }
570
+ // By default does nothing
571
+ setAttributes(_attributes) {
572
+ return this;
573
+ }
574
+ // By default does nothing
575
+ addEvent(_name, _attributes) {
576
+ return this;
577
+ }
578
+ addLink(_link) {
579
+ return this;
580
+ }
581
+ addLinks(_links) {
582
+ return this;
583
+ }
584
+ // By default does nothing
585
+ setStatus(_status) {
586
+ return this;
587
+ }
588
+ // By default does nothing
589
+ updateName(_name) {
590
+ return this;
591
+ }
592
+ // By default does nothing
593
+ end(_endTime) {
594
+ }
595
+ // isRecording always returns false for NonRecordingSpan.
596
+ isRecording() {
597
+ return false;
598
+ }
599
+ // By default does nothing
600
+ recordException(_exception, _time) {
601
+ }
602
+ }
603
+ const SPAN_KEY = createContextKey("OpenTelemetry Context Key SPAN");
604
+ function getSpan(context2) {
605
+ return context2.getValue(SPAN_KEY) || void 0;
606
+ }
607
+ function getActiveSpan() {
608
+ return getSpan(ContextAPI.getInstance().active());
609
+ }
610
+ function setSpan(context2, span) {
611
+ return context2.setValue(SPAN_KEY, span);
612
+ }
613
+ function deleteSpan(context2) {
614
+ return context2.deleteValue(SPAN_KEY);
615
+ }
616
+ function setSpanContext(context2, spanContext) {
617
+ return setSpan(context2, new NonRecordingSpan(spanContext));
618
+ }
619
+ function getSpanContext(context2) {
620
+ var _a;
621
+ return (_a = getSpan(context2)) === null || _a === void 0 ? void 0 : _a.spanContext();
622
+ }
623
+ const isHex = new Uint8Array([
624
+ 0,
625
+ 0,
626
+ 0,
627
+ 0,
628
+ 0,
629
+ 0,
630
+ 0,
631
+ 0,
632
+ 0,
633
+ 0,
634
+ 0,
635
+ 0,
636
+ 0,
637
+ 0,
638
+ 0,
639
+ 0,
640
+ 0,
641
+ 0,
642
+ 0,
643
+ 0,
644
+ 0,
645
+ 0,
646
+ 0,
647
+ 0,
648
+ 0,
649
+ 0,
650
+ 0,
651
+ 0,
652
+ 0,
653
+ 0,
654
+ 0,
655
+ 0,
656
+ 0,
657
+ 0,
658
+ 0,
659
+ 0,
660
+ 0,
661
+ 0,
662
+ 0,
663
+ 0,
664
+ 0,
665
+ 0,
666
+ 0,
667
+ 0,
668
+ 0,
669
+ 0,
670
+ 0,
671
+ 0,
672
+ 1,
673
+ 1,
674
+ 1,
675
+ 1,
676
+ 1,
677
+ 1,
678
+ 1,
679
+ 1,
680
+ 1,
681
+ 1,
682
+ 0,
683
+ 0,
684
+ 0,
685
+ 0,
686
+ 0,
687
+ 0,
688
+ 0,
689
+ 1,
690
+ 1,
691
+ 1,
692
+ 1,
693
+ 1,
694
+ 1,
695
+ 0,
696
+ 0,
697
+ 0,
698
+ 0,
699
+ 0,
700
+ 0,
701
+ 0,
702
+ 0,
703
+ 0,
704
+ 0,
705
+ 0,
706
+ 0,
707
+ 0,
708
+ 0,
709
+ 0,
710
+ 0,
711
+ 0,
712
+ 0,
713
+ 0,
714
+ 0,
715
+ 0,
716
+ 0,
717
+ 0,
718
+ 0,
719
+ 0,
720
+ 0,
721
+ 1,
722
+ 1,
723
+ 1,
724
+ 1,
725
+ 1,
726
+ 1
727
+ ]);
728
+ function isValidHex(id, length) {
729
+ if (typeof id !== "string" || id.length !== length)
730
+ return false;
731
+ let r = 0;
732
+ for (let i = 0; i < id.length; i += 4) {
733
+ r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
734
+ }
735
+ return r === length;
736
+ }
737
+ function isValidTraceId(traceId) {
738
+ return isValidHex(traceId, 32) && traceId !== INVALID_TRACEID;
739
+ }
740
+ function isValidSpanId(spanId) {
741
+ return isValidHex(spanId, 16) && spanId !== INVALID_SPANID;
742
+ }
743
+ function isSpanContextValid(spanContext) {
744
+ return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
745
+ }
746
+ function wrapSpanContext(spanContext) {
747
+ return new NonRecordingSpan(spanContext);
748
+ }
749
+ const contextApi = ContextAPI.getInstance();
750
+ class NoopTracer {
751
+ // startSpan starts a noop span.
752
+ startSpan(name, options, context2 = contextApi.active()) {
753
+ const root = Boolean(options === null || options === void 0 ? void 0 : options.root);
754
+ if (root) {
755
+ return new NonRecordingSpan();
756
+ }
757
+ const parentFromContext = context2 && getSpanContext(context2);
758
+ if (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext)) {
759
+ return new NonRecordingSpan(parentFromContext);
760
+ } else {
761
+ return new NonRecordingSpan();
762
+ }
763
+ }
764
+ startActiveSpan(name, arg2, arg3, arg4) {
765
+ let opts;
766
+ let ctx;
767
+ let fn;
768
+ if (arguments.length < 2) {
769
+ return;
770
+ } else if (arguments.length === 2) {
771
+ fn = arg2;
772
+ } else if (arguments.length === 3) {
773
+ opts = arg2;
774
+ fn = arg3;
775
+ } else {
776
+ opts = arg2;
777
+ ctx = arg3;
778
+ fn = arg4;
779
+ }
780
+ const parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
781
+ const span = this.startSpan(name, opts, parentContext);
782
+ const contextWithSpanSet = setSpan(parentContext, span);
783
+ return contextApi.with(contextWithSpanSet, fn, void 0, span);
784
+ }
785
+ }
786
+ function isSpanContext(spanContext) {
787
+ return spanContext !== null && typeof spanContext === "object" && "spanId" in spanContext && typeof spanContext["spanId"] === "string" && "traceId" in spanContext && typeof spanContext["traceId"] === "string" && "traceFlags" in spanContext && typeof spanContext["traceFlags"] === "number";
788
+ }
789
+ const NOOP_TRACER = new NoopTracer();
790
+ class ProxyTracer {
791
+ constructor(provider, name, version, options) {
792
+ this._provider = provider;
793
+ this.name = name;
794
+ this.version = version;
795
+ this.options = options;
796
+ }
797
+ startSpan(name, options, context2) {
798
+ return this._getTracer().startSpan(name, options, context2);
799
+ }
800
+ startActiveSpan(_name, _options, _context, _fn) {
801
+ const tracer = this._getTracer();
802
+ return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
803
+ }
804
+ /**
805
+ * Try to get a tracer from the proxy tracer provider.
806
+ * If the proxy tracer provider has no delegate, return a noop tracer.
807
+ */
808
+ _getTracer() {
809
+ if (this._delegate) {
810
+ return this._delegate;
811
+ }
812
+ const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
813
+ if (!tracer) {
814
+ return NOOP_TRACER;
815
+ }
816
+ this._delegate = tracer;
817
+ return this._delegate;
818
+ }
819
+ }
820
+ class NoopTracerProvider {
821
+ getTracer(_name, _version, _options) {
822
+ return new NoopTracer();
823
+ }
824
+ }
825
+ const NOOP_TRACER_PROVIDER = new NoopTracerProvider();
826
+ class ProxyTracerProvider {
827
+ /**
828
+ * Get a {@link ProxyTracer}
829
+ */
830
+ getTracer(name, version, options) {
831
+ var _a;
832
+ return (_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options);
833
+ }
834
+ getDelegate() {
835
+ var _a;
836
+ return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;
837
+ }
838
+ /**
839
+ * Set the delegate tracer provider
840
+ */
841
+ setDelegate(delegate) {
842
+ this._delegate = delegate;
843
+ }
844
+ getDelegateTracer(name, version, options) {
845
+ var _a;
846
+ return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
847
+ }
848
+ }
849
+ var SamplingDecision;
850
+ (function(SamplingDecision2) {
851
+ SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
852
+ SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
853
+ SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
854
+ })(SamplingDecision || (SamplingDecision = {}));
855
+ var SpanKind;
856
+ (function(SpanKind2) {
857
+ SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
858
+ SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
859
+ SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
860
+ SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
861
+ SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
862
+ })(SpanKind || (SpanKind = {}));
863
+ var SpanStatusCode;
864
+ (function(SpanStatusCode2) {
865
+ SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
866
+ SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
867
+ SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
868
+ })(SpanStatusCode || (SpanStatusCode = {}));
869
+ const VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
870
+ const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
871
+ const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
872
+ const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
873
+ const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
874
+ const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
875
+ function validateKey(key) {
876
+ return VALID_KEY_REGEX.test(key);
877
+ }
878
+ function validateValue(value) {
879
+ return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
880
+ }
881
+ const MAX_TRACE_STATE_ITEMS = 32;
882
+ const MAX_TRACE_STATE_LEN = 512;
883
+ const LIST_MEMBERS_SEPARATOR = ",";
884
+ const LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
885
+ class TraceStateImpl {
886
+ constructor(rawTraceState) {
887
+ this._internalState = /* @__PURE__ */ new Map();
888
+ if (rawTraceState)
889
+ this._parse(rawTraceState);
890
+ }
891
+ set(key, value) {
892
+ const traceState = this._clone();
893
+ if (traceState._internalState.has(key)) {
894
+ traceState._internalState.delete(key);
895
+ }
896
+ traceState._internalState.set(key, value);
897
+ return traceState;
898
+ }
899
+ unset(key) {
900
+ const traceState = this._clone();
901
+ traceState._internalState.delete(key);
902
+ return traceState;
903
+ }
904
+ get(key) {
905
+ return this._internalState.get(key);
906
+ }
907
+ serialize() {
908
+ return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
909
+ agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
910
+ return agg;
911
+ }, []).join(LIST_MEMBERS_SEPARATOR);
912
+ }
913
+ _parse(rawTraceState) {
914
+ if (rawTraceState.length > MAX_TRACE_STATE_LEN)
915
+ return;
916
+ this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
917
+ const listMember = part.trim();
918
+ const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
919
+ if (i !== -1) {
920
+ const key = listMember.slice(0, i);
921
+ const value = listMember.slice(i + 1, part.length);
922
+ if (validateKey(key) && validateValue(value)) {
923
+ agg.set(key, value);
924
+ }
925
+ }
926
+ return agg;
927
+ }, /* @__PURE__ */ new Map());
928
+ if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
929
+ this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
930
+ }
931
+ }
932
+ // @ts-expect-error TS6133 Accessed in tests only.
933
+ _keys() {
934
+ return Array.from(this._internalState.keys()).reverse();
935
+ }
936
+ _clone() {
937
+ const traceState = new TraceStateImpl();
938
+ traceState._internalState = new Map(this._internalState);
939
+ return traceState;
940
+ }
941
+ }
942
+ function createTraceState(rawTraceState) {
943
+ return new TraceStateImpl(rawTraceState);
944
+ }
945
+ const context = ContextAPI.getInstance();
946
+ const diag = DiagAPI.instance();
947
+ class NoopMeterProvider {
948
+ getMeter(_name, _version, _options) {
949
+ return NOOP_METER;
950
+ }
951
+ }
952
+ const NOOP_METER_PROVIDER = new NoopMeterProvider();
953
+ const API_NAME$2 = "metrics";
954
+ class MetricsAPI {
955
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
956
+ constructor() {
957
+ }
958
+ /** Get the singleton instance of the Metrics API */
959
+ static getInstance() {
960
+ if (!this._instance) {
961
+ this._instance = new MetricsAPI();
962
+ }
963
+ return this._instance;
964
+ }
965
+ /**
966
+ * Set the current global meter provider.
967
+ * Returns true if the meter provider was successfully registered, else false.
968
+ */
969
+ setGlobalMeterProvider(provider) {
970
+ return registerGlobal(API_NAME$2, provider, DiagAPI.instance());
971
+ }
972
+ /**
973
+ * Returns the global meter provider.
974
+ */
975
+ getMeterProvider() {
976
+ return getGlobal(API_NAME$2) || NOOP_METER_PROVIDER;
977
+ }
978
+ /**
979
+ * Returns a meter from the global meter provider.
980
+ */
981
+ getMeter(name, version, options) {
982
+ return this.getMeterProvider().getMeter(name, version, options);
983
+ }
984
+ /** Remove the global meter provider */
985
+ disable() {
986
+ unregisterGlobal(API_NAME$2, DiagAPI.instance());
987
+ }
988
+ }
989
+ const metrics = MetricsAPI.getInstance();
990
+ class NoopTextMapPropagator {
991
+ /** Noop inject function does nothing */
992
+ inject(_context, _carrier) {
993
+ }
994
+ /** Noop extract function does nothing and returns the input context */
995
+ extract(context2, _carrier) {
996
+ return context2;
997
+ }
998
+ fields() {
999
+ return [];
1000
+ }
1001
+ }
1002
+ const BAGGAGE_KEY = createContextKey("OpenTelemetry Baggage Key");
1003
+ function getBaggage(context2) {
1004
+ return context2.getValue(BAGGAGE_KEY) || void 0;
1005
+ }
1006
+ function getActiveBaggage() {
1007
+ return getBaggage(ContextAPI.getInstance().active());
1008
+ }
1009
+ function setBaggage(context2, baggage) {
1010
+ return context2.setValue(BAGGAGE_KEY, baggage);
1011
+ }
1012
+ function deleteBaggage(context2) {
1013
+ return context2.deleteValue(BAGGAGE_KEY);
1014
+ }
1015
+ const API_NAME$1 = "propagation";
1016
+ const NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator();
1017
+ class PropagationAPI {
1018
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
1019
+ constructor() {
1020
+ this.createBaggage = createBaggage;
1021
+ this.getBaggage = getBaggage;
1022
+ this.getActiveBaggage = getActiveBaggage;
1023
+ this.setBaggage = setBaggage;
1024
+ this.deleteBaggage = deleteBaggage;
1025
+ }
1026
+ /** Get the singleton instance of the Propagator API */
1027
+ static getInstance() {
1028
+ if (!this._instance) {
1029
+ this._instance = new PropagationAPI();
1030
+ }
1031
+ return this._instance;
1032
+ }
1033
+ /**
1034
+ * Set the current propagator.
1035
+ *
1036
+ * @returns true if the propagator was successfully registered, else false
1037
+ */
1038
+ setGlobalPropagator(propagator) {
1039
+ return registerGlobal(API_NAME$1, propagator, DiagAPI.instance());
1040
+ }
1041
+ /**
1042
+ * Inject context into a carrier to be propagated inter-process
1043
+ *
1044
+ * @param context Context carrying tracing data to inject
1045
+ * @param carrier carrier to inject context into
1046
+ * @param setter Function used to set values on the carrier
1047
+ */
1048
+ inject(context2, carrier, setter = defaultTextMapSetter) {
1049
+ return this._getGlobalPropagator().inject(context2, carrier, setter);
1050
+ }
1051
+ /**
1052
+ * Extract context from a carrier
1053
+ *
1054
+ * @param context Context which the newly created context will inherit from
1055
+ * @param carrier Carrier to extract context from
1056
+ * @param getter Function used to extract keys from a carrier
1057
+ */
1058
+ extract(context2, carrier, getter = defaultTextMapGetter) {
1059
+ return this._getGlobalPropagator().extract(context2, carrier, getter);
1060
+ }
1061
+ /**
1062
+ * Return a list of all fields which may be used by the propagator.
1063
+ */
1064
+ fields() {
1065
+ return this._getGlobalPropagator().fields();
1066
+ }
1067
+ /** Remove the global propagator */
1068
+ disable() {
1069
+ unregisterGlobal(API_NAME$1, DiagAPI.instance());
1070
+ }
1071
+ _getGlobalPropagator() {
1072
+ return getGlobal(API_NAME$1) || NOOP_TEXT_MAP_PROPAGATOR;
1073
+ }
1074
+ }
1075
+ const propagation = PropagationAPI.getInstance();
1076
+ const API_NAME = "trace";
1077
+ class TraceAPI {
1078
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
1079
+ constructor() {
1080
+ this._proxyTracerProvider = new ProxyTracerProvider();
1081
+ this.wrapSpanContext = wrapSpanContext;
1082
+ this.isSpanContextValid = isSpanContextValid;
1083
+ this.deleteSpan = deleteSpan;
1084
+ this.getSpan = getSpan;
1085
+ this.getActiveSpan = getActiveSpan;
1086
+ this.getSpanContext = getSpanContext;
1087
+ this.setSpan = setSpan;
1088
+ this.setSpanContext = setSpanContext;
1089
+ }
1090
+ /** Get the singleton instance of the Trace API */
1091
+ static getInstance() {
1092
+ if (!this._instance) {
1093
+ this._instance = new TraceAPI();
1094
+ }
1095
+ return this._instance;
1096
+ }
1097
+ /**
1098
+ * Set the current global tracer.
1099
+ *
1100
+ * @returns true if the tracer provider was successfully registered, else false
1101
+ */
1102
+ setGlobalTracerProvider(provider) {
1103
+ const success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());
1104
+ if (success) {
1105
+ this._proxyTracerProvider.setDelegate(provider);
1106
+ }
1107
+ return success;
1108
+ }
1109
+ /**
1110
+ * Returns the global tracer provider.
1111
+ */
1112
+ getTracerProvider() {
1113
+ return getGlobal(API_NAME) || this._proxyTracerProvider;
1114
+ }
1115
+ /**
1116
+ * Returns a tracer from the global tracer provider.
1117
+ */
1118
+ getTracer(name, version) {
1119
+ return this.getTracerProvider().getTracer(name, version);
1120
+ }
1121
+ /** Remove the global tracer provider */
1122
+ disable() {
1123
+ unregisterGlobal(API_NAME, DiagAPI.instance());
1124
+ this._proxyTracerProvider = new ProxyTracerProvider();
1125
+ }
1126
+ }
1127
+ const trace = TraceAPI.getInstance();
1128
+ const index = {
1129
+ context,
1130
+ diag,
1131
+ metrics,
1132
+ propagation,
1133
+ trace
1134
+ };
1135
+ export {
1136
+ DiagConsoleLogger,
1137
+ DiagLogLevel,
1138
+ INVALID_SPANID,
1139
+ INVALID_SPAN_CONTEXT,
1140
+ INVALID_TRACEID,
1141
+ ProxyTracer,
1142
+ ProxyTracerProvider,
1143
+ ROOT_CONTEXT,
1144
+ SamplingDecision,
1145
+ SpanKind,
1146
+ SpanStatusCode,
1147
+ TraceFlags,
1148
+ ValueType,
1149
+ baggageEntryMetadataFromString,
1150
+ context,
1151
+ createContextKey,
1152
+ createNoopMeter,
1153
+ createTraceState,
1154
+ index as default,
1155
+ defaultTextMapGetter,
1156
+ defaultTextMapSetter,
1157
+ diag,
1158
+ isSpanContextValid,
1159
+ isValidSpanId,
1160
+ isValidTraceId,
1161
+ metrics,
1162
+ propagation,
1163
+ trace
1164
+ };