@probelabs/visor 0.1.102 → 0.1.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- process.env.VISOR_VERSION = '0.1.102';
2
+ process.env.VISOR_VERSION = '0.1.103';
3
3
  process.env.PROBE_VERSION = '0.6.0-rc154';
4
4
  /******/ (() => { // webpackBootstrap
5
5
  /******/ var __webpack_modules__ = ({
@@ -34747,6 +34747,2732 @@ exports.createExecContext = createExecContext;
34747
34747
  exports.isLisp = isLisp;
34748
34748
 
34749
34749
 
34750
+ /***/ }),
34751
+
34752
+ /***/ 29750:
34753
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
34754
+
34755
+ "use strict";
34756
+
34757
+ /*
34758
+ * Copyright The OpenTelemetry Authors
34759
+ *
34760
+ * Licensed under the Apache License, Version 2.0 (the "License");
34761
+ * you may not use this file except in compliance with the License.
34762
+ * You may obtain a copy of the License at
34763
+ *
34764
+ * https://www.apache.org/licenses/LICENSE-2.0
34765
+ *
34766
+ * Unless required by applicable law or agreed to in writing, software
34767
+ * distributed under the License is distributed on an "AS IS" BASIS,
34768
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34769
+ * See the License for the specific language governing permissions and
34770
+ * limitations under the License.
34771
+ */
34772
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
34773
+ exports.ContextAPI = void 0;
34774
+ const NoopContextManager_1 = __nccwpck_require__(99522);
34775
+ const global_utils_1 = __nccwpck_require__(39923);
34776
+ const diag_1 = __nccwpck_require__(1230);
34777
+ const API_NAME = 'context';
34778
+ const NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager();
34779
+ /**
34780
+ * Singleton object which represents the entry point to the OpenTelemetry Context API
34781
+ */
34782
+ class ContextAPI {
34783
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
34784
+ constructor() { }
34785
+ /** Get the singleton instance of the Context API */
34786
+ static getInstance() {
34787
+ if (!this._instance) {
34788
+ this._instance = new ContextAPI();
34789
+ }
34790
+ return this._instance;
34791
+ }
34792
+ /**
34793
+ * Set the current context manager.
34794
+ *
34795
+ * @returns true if the context manager was successfully registered, else false
34796
+ */
34797
+ setGlobalContextManager(contextManager) {
34798
+ return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
34799
+ }
34800
+ /**
34801
+ * Get the currently active context
34802
+ */
34803
+ active() {
34804
+ return this._getContextManager().active();
34805
+ }
34806
+ /**
34807
+ * Execute a function with an active context
34808
+ *
34809
+ * @param context context to be active during function execution
34810
+ * @param fn function to execute in a context
34811
+ * @param thisArg optional receiver to be used for calling fn
34812
+ * @param args optional arguments forwarded to fn
34813
+ */
34814
+ with(context, fn, thisArg, ...args) {
34815
+ return this._getContextManager().with(context, fn, thisArg, ...args);
34816
+ }
34817
+ /**
34818
+ * Bind a context to a target function or event emitter
34819
+ *
34820
+ * @param context context to bind to the event emitter or function. Defaults to the currently active context
34821
+ * @param target function or event emitter to bind
34822
+ */
34823
+ bind(context, target) {
34824
+ return this._getContextManager().bind(context, target);
34825
+ }
34826
+ _getContextManager() {
34827
+ return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
34828
+ }
34829
+ /** Disable and remove the global context manager */
34830
+ disable() {
34831
+ this._getContextManager().disable();
34832
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
34833
+ }
34834
+ }
34835
+ exports.ContextAPI = ContextAPI;
34836
+ //# sourceMappingURL=context.js.map
34837
+
34838
+ /***/ }),
34839
+
34840
+ /***/ 1230:
34841
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
34842
+
34843
+ "use strict";
34844
+
34845
+ /*
34846
+ * Copyright The OpenTelemetry Authors
34847
+ *
34848
+ * Licensed under the Apache License, Version 2.0 (the "License");
34849
+ * you may not use this file except in compliance with the License.
34850
+ * You may obtain a copy of the License at
34851
+ *
34852
+ * https://www.apache.org/licenses/LICENSE-2.0
34853
+ *
34854
+ * Unless required by applicable law or agreed to in writing, software
34855
+ * distributed under the License is distributed on an "AS IS" BASIS,
34856
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34857
+ * See the License for the specific language governing permissions and
34858
+ * limitations under the License.
34859
+ */
34860
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
34861
+ exports.DiagAPI = void 0;
34862
+ const ComponentLogger_1 = __nccwpck_require__(37723);
34863
+ const logLevelLogger_1 = __nccwpck_require__(83514);
34864
+ const types_1 = __nccwpck_require__(2573);
34865
+ const global_utils_1 = __nccwpck_require__(39923);
34866
+ const API_NAME = 'diag';
34867
+ /**
34868
+ * Singleton object which represents the entry point to the OpenTelemetry internal
34869
+ * diagnostic API
34870
+ */
34871
+ class DiagAPI {
34872
+ /**
34873
+ * Private internal constructor
34874
+ * @private
34875
+ */
34876
+ constructor() {
34877
+ function _logProxy(funcName) {
34878
+ return function (...args) {
34879
+ const logger = (0, global_utils_1.getGlobal)('diag');
34880
+ // shortcut if logger not set
34881
+ if (!logger)
34882
+ return;
34883
+ return logger[funcName](...args);
34884
+ };
34885
+ }
34886
+ // Using self local variable for minification purposes as 'this' cannot be minified
34887
+ const self = this;
34888
+ // DiagAPI specific functions
34889
+ const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
34890
+ var _a, _b, _c;
34891
+ if (logger === self) {
34892
+ // There isn't much we can do here.
34893
+ // Logging to the console might break the user application.
34894
+ // Try to log to self. If a logger was previously registered it will receive the log.
34895
+ const err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation');
34896
+ self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
34897
+ return false;
34898
+ }
34899
+ if (typeof optionsOrLogLevel === 'number') {
34900
+ optionsOrLogLevel = {
34901
+ logLevel: optionsOrLogLevel,
34902
+ };
34903
+ }
34904
+ const oldLogger = (0, global_utils_1.getGlobal)('diag');
34905
+ const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : types_1.DiagLogLevel.INFO, logger);
34906
+ // There already is an logger registered. We'll let it know before overwriting it.
34907
+ if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
34908
+ const stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : '<failed to generate stacktrace>';
34909
+ oldLogger.warn(`Current logger will be overwritten from ${stack}`);
34910
+ newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
34911
+ }
34912
+ return (0, global_utils_1.registerGlobal)('diag', newLogger, self, true);
34913
+ };
34914
+ self.setLogger = setLogger;
34915
+ self.disable = () => {
34916
+ (0, global_utils_1.unregisterGlobal)(API_NAME, self);
34917
+ };
34918
+ self.createComponentLogger = (options) => {
34919
+ return new ComponentLogger_1.DiagComponentLogger(options);
34920
+ };
34921
+ self.verbose = _logProxy('verbose');
34922
+ self.debug = _logProxy('debug');
34923
+ self.info = _logProxy('info');
34924
+ self.warn = _logProxy('warn');
34925
+ self.error = _logProxy('error');
34926
+ }
34927
+ /** Get the singleton instance of the DiagAPI API */
34928
+ static instance() {
34929
+ if (!this._instance) {
34930
+ this._instance = new DiagAPI();
34931
+ }
34932
+ return this._instance;
34933
+ }
34934
+ }
34935
+ exports.DiagAPI = DiagAPI;
34936
+ //# sourceMappingURL=diag.js.map
34937
+
34938
+ /***/ }),
34939
+
34940
+ /***/ 18692:
34941
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
34942
+
34943
+ "use strict";
34944
+
34945
+ /*
34946
+ * Copyright The OpenTelemetry Authors
34947
+ *
34948
+ * Licensed under the Apache License, Version 2.0 (the "License");
34949
+ * you may not use this file except in compliance with the License.
34950
+ * You may obtain a copy of the License at
34951
+ *
34952
+ * https://www.apache.org/licenses/LICENSE-2.0
34953
+ *
34954
+ * Unless required by applicable law or agreed to in writing, software
34955
+ * distributed under the License is distributed on an "AS IS" BASIS,
34956
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34957
+ * See the License for the specific language governing permissions and
34958
+ * limitations under the License.
34959
+ */
34960
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
34961
+ exports.MetricsAPI = void 0;
34962
+ const NoopMeterProvider_1 = __nccwpck_require__(12896);
34963
+ const global_utils_1 = __nccwpck_require__(39923);
34964
+ const diag_1 = __nccwpck_require__(1230);
34965
+ const API_NAME = 'metrics';
34966
+ /**
34967
+ * Singleton object which represents the entry point to the OpenTelemetry Metrics API
34968
+ */
34969
+ class MetricsAPI {
34970
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
34971
+ constructor() { }
34972
+ /** Get the singleton instance of the Metrics API */
34973
+ static getInstance() {
34974
+ if (!this._instance) {
34975
+ this._instance = new MetricsAPI();
34976
+ }
34977
+ return this._instance;
34978
+ }
34979
+ /**
34980
+ * Set the current global meter provider.
34981
+ * Returns true if the meter provider was successfully registered, else false.
34982
+ */
34983
+ setGlobalMeterProvider(provider) {
34984
+ return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
34985
+ }
34986
+ /**
34987
+ * Returns the global meter provider.
34988
+ */
34989
+ getMeterProvider() {
34990
+ return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
34991
+ }
34992
+ /**
34993
+ * Returns a meter from the global meter provider.
34994
+ */
34995
+ getMeter(name, version, options) {
34996
+ return this.getMeterProvider().getMeter(name, version, options);
34997
+ }
34998
+ /** Remove the global meter provider */
34999
+ disable() {
35000
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
35001
+ }
35002
+ }
35003
+ exports.MetricsAPI = MetricsAPI;
35004
+ //# sourceMappingURL=metrics.js.map
35005
+
35006
+ /***/ }),
35007
+
35008
+ /***/ 7:
35009
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
35010
+
35011
+ "use strict";
35012
+
35013
+ /*
35014
+ * Copyright The OpenTelemetry Authors
35015
+ *
35016
+ * Licensed under the Apache License, Version 2.0 (the "License");
35017
+ * you may not use this file except in compliance with the License.
35018
+ * You may obtain a copy of the License at
35019
+ *
35020
+ * https://www.apache.org/licenses/LICENSE-2.0
35021
+ *
35022
+ * Unless required by applicable law or agreed to in writing, software
35023
+ * distributed under the License is distributed on an "AS IS" BASIS,
35024
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35025
+ * See the License for the specific language governing permissions and
35026
+ * limitations under the License.
35027
+ */
35028
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35029
+ exports.PropagationAPI = void 0;
35030
+ const global_utils_1 = __nccwpck_require__(39923);
35031
+ const NoopTextMapPropagator_1 = __nccwpck_require__(54353);
35032
+ const TextMapPropagator_1 = __nccwpck_require__(77865);
35033
+ const context_helpers_1 = __nccwpck_require__(30052);
35034
+ const utils_1 = __nccwpck_require__(38558);
35035
+ const diag_1 = __nccwpck_require__(1230);
35036
+ const API_NAME = 'propagation';
35037
+ const NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator();
35038
+ /**
35039
+ * Singleton object which represents the entry point to the OpenTelemetry Propagation API
35040
+ */
35041
+ class PropagationAPI {
35042
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
35043
+ constructor() {
35044
+ this.createBaggage = utils_1.createBaggage;
35045
+ this.getBaggage = context_helpers_1.getBaggage;
35046
+ this.getActiveBaggage = context_helpers_1.getActiveBaggage;
35047
+ this.setBaggage = context_helpers_1.setBaggage;
35048
+ this.deleteBaggage = context_helpers_1.deleteBaggage;
35049
+ }
35050
+ /** Get the singleton instance of the Propagator API */
35051
+ static getInstance() {
35052
+ if (!this._instance) {
35053
+ this._instance = new PropagationAPI();
35054
+ }
35055
+ return this._instance;
35056
+ }
35057
+ /**
35058
+ * Set the current propagator.
35059
+ *
35060
+ * @returns true if the propagator was successfully registered, else false
35061
+ */
35062
+ setGlobalPropagator(propagator) {
35063
+ return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
35064
+ }
35065
+ /**
35066
+ * Inject context into a carrier to be propagated inter-process
35067
+ *
35068
+ * @param context Context carrying tracing data to inject
35069
+ * @param carrier carrier to inject context into
35070
+ * @param setter Function used to set values on the carrier
35071
+ */
35072
+ inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
35073
+ return this._getGlobalPropagator().inject(context, carrier, setter);
35074
+ }
35075
+ /**
35076
+ * Extract context from a carrier
35077
+ *
35078
+ * @param context Context which the newly created context will inherit from
35079
+ * @param carrier Carrier to extract context from
35080
+ * @param getter Function used to extract keys from a carrier
35081
+ */
35082
+ extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
35083
+ return this._getGlobalPropagator().extract(context, carrier, getter);
35084
+ }
35085
+ /**
35086
+ * Return a list of all fields which may be used by the propagator.
35087
+ */
35088
+ fields() {
35089
+ return this._getGlobalPropagator().fields();
35090
+ }
35091
+ /** Remove the global propagator */
35092
+ disable() {
35093
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
35094
+ }
35095
+ _getGlobalPropagator() {
35096
+ return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
35097
+ }
35098
+ }
35099
+ exports.PropagationAPI = PropagationAPI;
35100
+ //# sourceMappingURL=propagation.js.map
35101
+
35102
+ /***/ }),
35103
+
35104
+ /***/ 24508:
35105
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
35106
+
35107
+ "use strict";
35108
+
35109
+ /*
35110
+ * Copyright The OpenTelemetry Authors
35111
+ *
35112
+ * Licensed under the Apache License, Version 2.0 (the "License");
35113
+ * you may not use this file except in compliance with the License.
35114
+ * You may obtain a copy of the License at
35115
+ *
35116
+ * https://www.apache.org/licenses/LICENSE-2.0
35117
+ *
35118
+ * Unless required by applicable law or agreed to in writing, software
35119
+ * distributed under the License is distributed on an "AS IS" BASIS,
35120
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35121
+ * See the License for the specific language governing permissions and
35122
+ * limitations under the License.
35123
+ */
35124
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35125
+ exports.TraceAPI = void 0;
35126
+ const global_utils_1 = __nccwpck_require__(39923);
35127
+ const ProxyTracerProvider_1 = __nccwpck_require__(20312);
35128
+ const spancontext_utils_1 = __nccwpck_require__(60639);
35129
+ const context_utils_1 = __nccwpck_require__(52771);
35130
+ const diag_1 = __nccwpck_require__(1230);
35131
+ const API_NAME = 'trace';
35132
+ /**
35133
+ * Singleton object which represents the entry point to the OpenTelemetry Tracing API
35134
+ */
35135
+ class TraceAPI {
35136
+ /** Empty private constructor prevents end users from constructing a new instance of the API */
35137
+ constructor() {
35138
+ this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();
35139
+ this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
35140
+ this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
35141
+ this.deleteSpan = context_utils_1.deleteSpan;
35142
+ this.getSpan = context_utils_1.getSpan;
35143
+ this.getActiveSpan = context_utils_1.getActiveSpan;
35144
+ this.getSpanContext = context_utils_1.getSpanContext;
35145
+ this.setSpan = context_utils_1.setSpan;
35146
+ this.setSpanContext = context_utils_1.setSpanContext;
35147
+ }
35148
+ /** Get the singleton instance of the Trace API */
35149
+ static getInstance() {
35150
+ if (!this._instance) {
35151
+ this._instance = new TraceAPI();
35152
+ }
35153
+ return this._instance;
35154
+ }
35155
+ /**
35156
+ * Set the current global tracer.
35157
+ *
35158
+ * @returns true if the tracer provider was successfully registered, else false
35159
+ */
35160
+ setGlobalTracerProvider(provider) {
35161
+ const success = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
35162
+ if (success) {
35163
+ this._proxyTracerProvider.setDelegate(provider);
35164
+ }
35165
+ return success;
35166
+ }
35167
+ /**
35168
+ * Returns the global tracer provider.
35169
+ */
35170
+ getTracerProvider() {
35171
+ return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
35172
+ }
35173
+ /**
35174
+ * Returns a tracer from the global tracer provider.
35175
+ */
35176
+ getTracer(name, version) {
35177
+ return this.getTracerProvider().getTracer(name, version);
35178
+ }
35179
+ /** Remove the global tracer provider */
35180
+ disable() {
35181
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
35182
+ this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();
35183
+ }
35184
+ }
35185
+ exports.TraceAPI = TraceAPI;
35186
+ //# sourceMappingURL=trace.js.map
35187
+
35188
+ /***/ }),
35189
+
35190
+ /***/ 30052:
35191
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
35192
+
35193
+ "use strict";
35194
+
35195
+ /*
35196
+ * Copyright The OpenTelemetry Authors
35197
+ *
35198
+ * Licensed under the Apache License, Version 2.0 (the "License");
35199
+ * you may not use this file except in compliance with the License.
35200
+ * You may obtain a copy of the License at
35201
+ *
35202
+ * https://www.apache.org/licenses/LICENSE-2.0
35203
+ *
35204
+ * Unless required by applicable law or agreed to in writing, software
35205
+ * distributed under the License is distributed on an "AS IS" BASIS,
35206
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35207
+ * See the License for the specific language governing permissions and
35208
+ * limitations under the License.
35209
+ */
35210
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35211
+ exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = void 0;
35212
+ const context_1 = __nccwpck_require__(29750);
35213
+ const context_2 = __nccwpck_require__(37977);
35214
+ /**
35215
+ * Baggage key
35216
+ */
35217
+ const BAGGAGE_KEY = (0, context_2.createContextKey)('OpenTelemetry Baggage Key');
35218
+ /**
35219
+ * Retrieve the current baggage from the given context
35220
+ *
35221
+ * @param {Context} Context that manage all context values
35222
+ * @returns {Baggage} Extracted baggage from the context
35223
+ */
35224
+ function getBaggage(context) {
35225
+ return context.getValue(BAGGAGE_KEY) || undefined;
35226
+ }
35227
+ exports.getBaggage = getBaggage;
35228
+ /**
35229
+ * Retrieve the current baggage from the active/current context
35230
+ *
35231
+ * @returns {Baggage} Extracted baggage from the context
35232
+ */
35233
+ function getActiveBaggage() {
35234
+ return getBaggage(context_1.ContextAPI.getInstance().active());
35235
+ }
35236
+ exports.getActiveBaggage = getActiveBaggage;
35237
+ /**
35238
+ * Store a baggage in the given context
35239
+ *
35240
+ * @param {Context} Context that manage all context values
35241
+ * @param {Baggage} baggage that will be set in the actual context
35242
+ */
35243
+ function setBaggage(context, baggage) {
35244
+ return context.setValue(BAGGAGE_KEY, baggage);
35245
+ }
35246
+ exports.setBaggage = setBaggage;
35247
+ /**
35248
+ * Delete the baggage stored in the given context
35249
+ *
35250
+ * @param {Context} Context that manage all context values
35251
+ */
35252
+ function deleteBaggage(context) {
35253
+ return context.deleteValue(BAGGAGE_KEY);
35254
+ }
35255
+ exports.deleteBaggage = deleteBaggage;
35256
+ //# sourceMappingURL=context-helpers.js.map
35257
+
35258
+ /***/ }),
35259
+
35260
+ /***/ 33274:
35261
+ /***/ ((__unused_webpack_module, exports) => {
35262
+
35263
+ "use strict";
35264
+
35265
+ /*
35266
+ * Copyright The OpenTelemetry Authors
35267
+ *
35268
+ * Licensed under the Apache License, Version 2.0 (the "License");
35269
+ * you may not use this file except in compliance with the License.
35270
+ * You may obtain a copy of the License at
35271
+ *
35272
+ * https://www.apache.org/licenses/LICENSE-2.0
35273
+ *
35274
+ * Unless required by applicable law or agreed to in writing, software
35275
+ * distributed under the License is distributed on an "AS IS" BASIS,
35276
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35277
+ * See the License for the specific language governing permissions and
35278
+ * limitations under the License.
35279
+ */
35280
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35281
+ exports.BaggageImpl = void 0;
35282
+ class BaggageImpl {
35283
+ constructor(entries) {
35284
+ this._entries = entries ? new Map(entries) : new Map();
35285
+ }
35286
+ getEntry(key) {
35287
+ const entry = this._entries.get(key);
35288
+ if (!entry) {
35289
+ return undefined;
35290
+ }
35291
+ return Object.assign({}, entry);
35292
+ }
35293
+ getAllEntries() {
35294
+ return Array.from(this._entries.entries()).map(([k, v]) => [k, v]);
35295
+ }
35296
+ setEntry(key, entry) {
35297
+ const newBaggage = new BaggageImpl(this._entries);
35298
+ newBaggage._entries.set(key, entry);
35299
+ return newBaggage;
35300
+ }
35301
+ removeEntry(key) {
35302
+ const newBaggage = new BaggageImpl(this._entries);
35303
+ newBaggage._entries.delete(key);
35304
+ return newBaggage;
35305
+ }
35306
+ removeEntries(...keys) {
35307
+ const newBaggage = new BaggageImpl(this._entries);
35308
+ for (const key of keys) {
35309
+ newBaggage._entries.delete(key);
35310
+ }
35311
+ return newBaggage;
35312
+ }
35313
+ clear() {
35314
+ return new BaggageImpl();
35315
+ }
35316
+ }
35317
+ exports.BaggageImpl = BaggageImpl;
35318
+ //# sourceMappingURL=baggage-impl.js.map
35319
+
35320
+ /***/ }),
35321
+
35322
+ /***/ 3997:
35323
+ /***/ ((__unused_webpack_module, exports) => {
35324
+
35325
+ "use strict";
35326
+
35327
+ /*
35328
+ * Copyright The OpenTelemetry Authors
35329
+ *
35330
+ * Licensed under the Apache License, Version 2.0 (the "License");
35331
+ * you may not use this file except in compliance with the License.
35332
+ * You may obtain a copy of the License at
35333
+ *
35334
+ * https://www.apache.org/licenses/LICENSE-2.0
35335
+ *
35336
+ * Unless required by applicable law or agreed to in writing, software
35337
+ * distributed under the License is distributed on an "AS IS" BASIS,
35338
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35339
+ * See the License for the specific language governing permissions and
35340
+ * limitations under the License.
35341
+ */
35342
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35343
+ exports.baggageEntryMetadataSymbol = void 0;
35344
+ /**
35345
+ * Symbol used to make BaggageEntryMetadata an opaque type
35346
+ */
35347
+ exports.baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata');
35348
+ //# sourceMappingURL=symbol.js.map
35349
+
35350
+ /***/ }),
35351
+
35352
+ /***/ 38558:
35353
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
35354
+
35355
+ "use strict";
35356
+
35357
+ /*
35358
+ * Copyright The OpenTelemetry Authors
35359
+ *
35360
+ * Licensed under the Apache License, Version 2.0 (the "License");
35361
+ * you may not use this file except in compliance with the License.
35362
+ * You may obtain a copy of the License at
35363
+ *
35364
+ * https://www.apache.org/licenses/LICENSE-2.0
35365
+ *
35366
+ * Unless required by applicable law or agreed to in writing, software
35367
+ * distributed under the License is distributed on an "AS IS" BASIS,
35368
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35369
+ * See the License for the specific language governing permissions and
35370
+ * limitations under the License.
35371
+ */
35372
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35373
+ exports.baggageEntryMetadataFromString = exports.createBaggage = void 0;
35374
+ const diag_1 = __nccwpck_require__(1230);
35375
+ const baggage_impl_1 = __nccwpck_require__(33274);
35376
+ const symbol_1 = __nccwpck_require__(3997);
35377
+ const diag = diag_1.DiagAPI.instance();
35378
+ /**
35379
+ * Create a new Baggage with optional entries
35380
+ *
35381
+ * @param entries An array of baggage entries the new baggage should contain
35382
+ */
35383
+ function createBaggage(entries = {}) {
35384
+ return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
35385
+ }
35386
+ exports.createBaggage = createBaggage;
35387
+ /**
35388
+ * Create a serializable BaggageEntryMetadata object from a string.
35389
+ *
35390
+ * @param str string metadata. Format is currently not defined by the spec and has no special meaning.
35391
+ *
35392
+ */
35393
+ function baggageEntryMetadataFromString(str) {
35394
+ if (typeof str !== 'string') {
35395
+ diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
35396
+ str = '';
35397
+ }
35398
+ return {
35399
+ __TYPE__: symbol_1.baggageEntryMetadataSymbol,
35400
+ toString() {
35401
+ return str;
35402
+ },
35403
+ };
35404
+ }
35405
+ exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
35406
+ //# sourceMappingURL=utils.js.map
35407
+
35408
+ /***/ }),
35409
+
35410
+ /***/ 70244:
35411
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
35412
+
35413
+ "use strict";
35414
+
35415
+ /*
35416
+ * Copyright The OpenTelemetry Authors
35417
+ *
35418
+ * Licensed under the Apache License, Version 2.0 (the "License");
35419
+ * you may not use this file except in compliance with the License.
35420
+ * You may obtain a copy of the License at
35421
+ *
35422
+ * https://www.apache.org/licenses/LICENSE-2.0
35423
+ *
35424
+ * Unless required by applicable law or agreed to in writing, software
35425
+ * distributed under the License is distributed on an "AS IS" BASIS,
35426
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35427
+ * See the License for the specific language governing permissions and
35428
+ * limitations under the License.
35429
+ */
35430
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35431
+ exports.context = void 0;
35432
+ // Split module-level variable definition into separate files to allow
35433
+ // tree-shaking on each api instance.
35434
+ const context_1 = __nccwpck_require__(29750);
35435
+ /** Entrypoint for context API */
35436
+ exports.context = context_1.ContextAPI.getInstance();
35437
+ //# sourceMappingURL=context-api.js.map
35438
+
35439
+ /***/ }),
35440
+
35441
+ /***/ 99522:
35442
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
35443
+
35444
+ "use strict";
35445
+
35446
+ /*
35447
+ * Copyright The OpenTelemetry Authors
35448
+ *
35449
+ * Licensed under the Apache License, Version 2.0 (the "License");
35450
+ * you may not use this file except in compliance with the License.
35451
+ * You may obtain a copy of the License at
35452
+ *
35453
+ * https://www.apache.org/licenses/LICENSE-2.0
35454
+ *
35455
+ * Unless required by applicable law or agreed to in writing, software
35456
+ * distributed under the License is distributed on an "AS IS" BASIS,
35457
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35458
+ * See the License for the specific language governing permissions and
35459
+ * limitations under the License.
35460
+ */
35461
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35462
+ exports.NoopContextManager = void 0;
35463
+ const context_1 = __nccwpck_require__(37977);
35464
+ class NoopContextManager {
35465
+ active() {
35466
+ return context_1.ROOT_CONTEXT;
35467
+ }
35468
+ with(_context, fn, thisArg, ...args) {
35469
+ return fn.call(thisArg, ...args);
35470
+ }
35471
+ bind(_context, target) {
35472
+ return target;
35473
+ }
35474
+ enable() {
35475
+ return this;
35476
+ }
35477
+ disable() {
35478
+ return this;
35479
+ }
35480
+ }
35481
+ exports.NoopContextManager = NoopContextManager;
35482
+ //# sourceMappingURL=NoopContextManager.js.map
35483
+
35484
+ /***/ }),
35485
+
35486
+ /***/ 37977:
35487
+ /***/ ((__unused_webpack_module, exports) => {
35488
+
35489
+ "use strict";
35490
+
35491
+ /*
35492
+ * Copyright The OpenTelemetry Authors
35493
+ *
35494
+ * Licensed under the Apache License, Version 2.0 (the "License");
35495
+ * you may not use this file except in compliance with the License.
35496
+ * You may obtain a copy of the License at
35497
+ *
35498
+ * https://www.apache.org/licenses/LICENSE-2.0
35499
+ *
35500
+ * Unless required by applicable law or agreed to in writing, software
35501
+ * distributed under the License is distributed on an "AS IS" BASIS,
35502
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35503
+ * See the License for the specific language governing permissions and
35504
+ * limitations under the License.
35505
+ */
35506
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35507
+ exports.ROOT_CONTEXT = exports.createContextKey = void 0;
35508
+ /** Get a key to uniquely identify a context value */
35509
+ function createContextKey(description) {
35510
+ // The specification states that for the same input, multiple calls should
35511
+ // return different keys. Due to the nature of the JS dependency management
35512
+ // system, this creates problems where multiple versions of some package
35513
+ // could hold different keys for the same property.
35514
+ //
35515
+ // Therefore, we use Symbol.for which returns the same key for the same input.
35516
+ return Symbol.for(description);
35517
+ }
35518
+ exports.createContextKey = createContextKey;
35519
+ class BaseContext {
35520
+ /**
35521
+ * Construct a new context which inherits values from an optional parent context.
35522
+ *
35523
+ * @param parentContext a context from which to inherit values
35524
+ */
35525
+ constructor(parentContext) {
35526
+ // for minification
35527
+ const self = this;
35528
+ self._currentContext = parentContext ? new Map(parentContext) : new Map();
35529
+ self.getValue = (key) => self._currentContext.get(key);
35530
+ self.setValue = (key, value) => {
35531
+ const context = new BaseContext(self._currentContext);
35532
+ context._currentContext.set(key, value);
35533
+ return context;
35534
+ };
35535
+ self.deleteValue = (key) => {
35536
+ const context = new BaseContext(self._currentContext);
35537
+ context._currentContext.delete(key);
35538
+ return context;
35539
+ };
35540
+ }
35541
+ }
35542
+ /** The root context is used as the default parent context when there is no active context */
35543
+ exports.ROOT_CONTEXT = new BaseContext();
35544
+ //# sourceMappingURL=context.js.map
35545
+
35546
+ /***/ }),
35547
+
35548
+ /***/ 11414:
35549
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
35550
+
35551
+ "use strict";
35552
+
35553
+ /*
35554
+ * Copyright The OpenTelemetry Authors
35555
+ *
35556
+ * Licensed under the Apache License, Version 2.0 (the "License");
35557
+ * you may not use this file except in compliance with the License.
35558
+ * You may obtain a copy of the License at
35559
+ *
35560
+ * https://www.apache.org/licenses/LICENSE-2.0
35561
+ *
35562
+ * Unless required by applicable law or agreed to in writing, software
35563
+ * distributed under the License is distributed on an "AS IS" BASIS,
35564
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35565
+ * See the License for the specific language governing permissions and
35566
+ * limitations under the License.
35567
+ */
35568
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35569
+ exports.diag = void 0;
35570
+ // Split module-level variable definition into separate files to allow
35571
+ // tree-shaking on each api instance.
35572
+ const diag_1 = __nccwpck_require__(1230);
35573
+ /**
35574
+ * Entrypoint for Diag API.
35575
+ * Defines Diagnostic handler used for internal diagnostic logging operations.
35576
+ * The default provides a Noop DiagLogger implementation which may be changed via the
35577
+ * diag.setLogger(logger: DiagLogger) function.
35578
+ */
35579
+ exports.diag = diag_1.DiagAPI.instance();
35580
+ //# sourceMappingURL=diag-api.js.map
35581
+
35582
+ /***/ }),
35583
+
35584
+ /***/ 37723:
35585
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
35586
+
35587
+ "use strict";
35588
+
35589
+ /*
35590
+ * Copyright The OpenTelemetry Authors
35591
+ *
35592
+ * Licensed under the Apache License, Version 2.0 (the "License");
35593
+ * you may not use this file except in compliance with the License.
35594
+ * You may obtain a copy of the License at
35595
+ *
35596
+ * https://www.apache.org/licenses/LICENSE-2.0
35597
+ *
35598
+ * Unless required by applicable law or agreed to in writing, software
35599
+ * distributed under the License is distributed on an "AS IS" BASIS,
35600
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35601
+ * See the License for the specific language governing permissions and
35602
+ * limitations under the License.
35603
+ */
35604
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35605
+ exports.DiagComponentLogger = void 0;
35606
+ const global_utils_1 = __nccwpck_require__(39923);
35607
+ /**
35608
+ * Component Logger which is meant to be used as part of any component which
35609
+ * will add automatically additional namespace in front of the log message.
35610
+ * It will then forward all message to global diag logger
35611
+ * @example
35612
+ * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });
35613
+ * cLogger.debug('test');
35614
+ * // @opentelemetry/instrumentation-http test
35615
+ */
35616
+ class DiagComponentLogger {
35617
+ constructor(props) {
35618
+ this._namespace = props.namespace || 'DiagComponentLogger';
35619
+ }
35620
+ debug(...args) {
35621
+ return logProxy('debug', this._namespace, args);
35622
+ }
35623
+ error(...args) {
35624
+ return logProxy('error', this._namespace, args);
35625
+ }
35626
+ info(...args) {
35627
+ return logProxy('info', this._namespace, args);
35628
+ }
35629
+ warn(...args) {
35630
+ return logProxy('warn', this._namespace, args);
35631
+ }
35632
+ verbose(...args) {
35633
+ return logProxy('verbose', this._namespace, args);
35634
+ }
35635
+ }
35636
+ exports.DiagComponentLogger = DiagComponentLogger;
35637
+ function logProxy(funcName, namespace, args) {
35638
+ const logger = (0, global_utils_1.getGlobal)('diag');
35639
+ // shortcut if logger not set
35640
+ if (!logger) {
35641
+ return;
35642
+ }
35643
+ args.unshift(namespace);
35644
+ return logger[funcName](...args);
35645
+ }
35646
+ //# sourceMappingURL=ComponentLogger.js.map
35647
+
35648
+ /***/ }),
35649
+
35650
+ /***/ 66769:
35651
+ /***/ ((__unused_webpack_module, exports) => {
35652
+
35653
+ "use strict";
35654
+
35655
+ /*
35656
+ * Copyright The OpenTelemetry Authors
35657
+ *
35658
+ * Licensed under the Apache License, Version 2.0 (the "License");
35659
+ * you may not use this file except in compliance with the License.
35660
+ * You may obtain a copy of the License at
35661
+ *
35662
+ * https://www.apache.org/licenses/LICENSE-2.0
35663
+ *
35664
+ * Unless required by applicable law or agreed to in writing, software
35665
+ * distributed under the License is distributed on an "AS IS" BASIS,
35666
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35667
+ * See the License for the specific language governing permissions and
35668
+ * limitations under the License.
35669
+ */
35670
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35671
+ exports.DiagConsoleLogger = void 0;
35672
+ const consoleMap = [
35673
+ { n: 'error', c: 'error' },
35674
+ { n: 'warn', c: 'warn' },
35675
+ { n: 'info', c: 'info' },
35676
+ { n: 'debug', c: 'debug' },
35677
+ { n: 'verbose', c: 'trace' },
35678
+ ];
35679
+ /**
35680
+ * A simple Immutable Console based diagnostic logger which will output any messages to the Console.
35681
+ * If you want to limit the amount of logging to a specific level or lower use the
35682
+ * {@link createLogLevelDiagLogger}
35683
+ */
35684
+ class DiagConsoleLogger {
35685
+ constructor() {
35686
+ function _consoleFunc(funcName) {
35687
+ return function (...args) {
35688
+ if (console) {
35689
+ // Some environments only expose the console when the F12 developer console is open
35690
+ // eslint-disable-next-line no-console
35691
+ let theFunc = console[funcName];
35692
+ if (typeof theFunc !== 'function') {
35693
+ // Not all environments support all functions
35694
+ // eslint-disable-next-line no-console
35695
+ theFunc = console.log;
35696
+ }
35697
+ // One last final check
35698
+ if (typeof theFunc === 'function') {
35699
+ return theFunc.apply(console, args);
35700
+ }
35701
+ }
35702
+ };
35703
+ }
35704
+ for (let i = 0; i < consoleMap.length; i++) {
35705
+ this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
35706
+ }
35707
+ }
35708
+ }
35709
+ exports.DiagConsoleLogger = DiagConsoleLogger;
35710
+ //# sourceMappingURL=consoleLogger.js.map
35711
+
35712
+ /***/ }),
35713
+
35714
+ /***/ 83514:
35715
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
35716
+
35717
+ "use strict";
35718
+
35719
+ /*
35720
+ * Copyright The OpenTelemetry Authors
35721
+ *
35722
+ * Licensed under the Apache License, Version 2.0 (the "License");
35723
+ * you may not use this file except in compliance with the License.
35724
+ * You may obtain a copy of the License at
35725
+ *
35726
+ * https://www.apache.org/licenses/LICENSE-2.0
35727
+ *
35728
+ * Unless required by applicable law or agreed to in writing, software
35729
+ * distributed under the License is distributed on an "AS IS" BASIS,
35730
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35731
+ * See the License for the specific language governing permissions and
35732
+ * limitations under the License.
35733
+ */
35734
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35735
+ exports.createLogLevelDiagLogger = void 0;
35736
+ const types_1 = __nccwpck_require__(2573);
35737
+ function createLogLevelDiagLogger(maxLevel, logger) {
35738
+ if (maxLevel < types_1.DiagLogLevel.NONE) {
35739
+ maxLevel = types_1.DiagLogLevel.NONE;
35740
+ }
35741
+ else if (maxLevel > types_1.DiagLogLevel.ALL) {
35742
+ maxLevel = types_1.DiagLogLevel.ALL;
35743
+ }
35744
+ // In case the logger is null or undefined
35745
+ logger = logger || {};
35746
+ function _filterFunc(funcName, theLevel) {
35747
+ const theFunc = logger[funcName];
35748
+ if (typeof theFunc === 'function' && maxLevel >= theLevel) {
35749
+ return theFunc.bind(logger);
35750
+ }
35751
+ return function () { };
35752
+ }
35753
+ return {
35754
+ error: _filterFunc('error', types_1.DiagLogLevel.ERROR),
35755
+ warn: _filterFunc('warn', types_1.DiagLogLevel.WARN),
35756
+ info: _filterFunc('info', types_1.DiagLogLevel.INFO),
35757
+ debug: _filterFunc('debug', types_1.DiagLogLevel.DEBUG),
35758
+ verbose: _filterFunc('verbose', types_1.DiagLogLevel.VERBOSE),
35759
+ };
35760
+ }
35761
+ exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
35762
+ //# sourceMappingURL=logLevelLogger.js.map
35763
+
35764
+ /***/ }),
35765
+
35766
+ /***/ 2573:
35767
+ /***/ ((__unused_webpack_module, exports) => {
35768
+
35769
+ "use strict";
35770
+
35771
+ /*
35772
+ * Copyright The OpenTelemetry Authors
35773
+ *
35774
+ * Licensed under the Apache License, Version 2.0 (the "License");
35775
+ * you may not use this file except in compliance with the License.
35776
+ * You may obtain a copy of the License at
35777
+ *
35778
+ * https://www.apache.org/licenses/LICENSE-2.0
35779
+ *
35780
+ * Unless required by applicable law or agreed to in writing, software
35781
+ * distributed under the License is distributed on an "AS IS" BASIS,
35782
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35783
+ * See the License for the specific language governing permissions and
35784
+ * limitations under the License.
35785
+ */
35786
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35787
+ exports.DiagLogLevel = void 0;
35788
+ /**
35789
+ * Defines the available internal logging levels for the diagnostic logger, the numeric values
35790
+ * of the levels are defined to match the original values from the initial LogLevel to avoid
35791
+ * compatibility/migration issues for any implementation that assume the numeric ordering.
35792
+ */
35793
+ var DiagLogLevel;
35794
+ (function (DiagLogLevel) {
35795
+ /** Diagnostic Logging level setting to disable all logging (except and forced logs) */
35796
+ DiagLogLevel[DiagLogLevel["NONE"] = 0] = "NONE";
35797
+ /** Identifies an error scenario */
35798
+ DiagLogLevel[DiagLogLevel["ERROR"] = 30] = "ERROR";
35799
+ /** Identifies a warning scenario */
35800
+ DiagLogLevel[DiagLogLevel["WARN"] = 50] = "WARN";
35801
+ /** General informational log message */
35802
+ DiagLogLevel[DiagLogLevel["INFO"] = 60] = "INFO";
35803
+ /** General debug log message */
35804
+ DiagLogLevel[DiagLogLevel["DEBUG"] = 70] = "DEBUG";
35805
+ /**
35806
+ * Detailed trace level logging should only be used for development, should only be set
35807
+ * in a development environment.
35808
+ */
35809
+ DiagLogLevel[DiagLogLevel["VERBOSE"] = 80] = "VERBOSE";
35810
+ /** Used to set the logging level to include all logging */
35811
+ DiagLogLevel[DiagLogLevel["ALL"] = 9999] = "ALL";
35812
+ })(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
35813
+ //# sourceMappingURL=types.js.map
35814
+
35815
+ /***/ }),
35816
+
35817
+ /***/ 63914:
35818
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
35819
+
35820
+ "use strict";
35821
+
35822
+ /*
35823
+ * Copyright The OpenTelemetry Authors
35824
+ *
35825
+ * Licensed under the Apache License, Version 2.0 (the "License");
35826
+ * you may not use this file except in compliance with the License.
35827
+ * You may obtain a copy of the License at
35828
+ *
35829
+ * https://www.apache.org/licenses/LICENSE-2.0
35830
+ *
35831
+ * Unless required by applicable law or agreed to in writing, software
35832
+ * distributed under the License is distributed on an "AS IS" BASIS,
35833
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35834
+ * See the License for the specific language governing permissions and
35835
+ * limitations under the License.
35836
+ */
35837
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35838
+ exports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = void 0;
35839
+ var utils_1 = __nccwpck_require__(38558);
35840
+ Object.defineProperty(exports, "baggageEntryMetadataFromString", ({ enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } }));
35841
+ // Context APIs
35842
+ var context_1 = __nccwpck_require__(37977);
35843
+ Object.defineProperty(exports, "createContextKey", ({ enumerable: true, get: function () { return context_1.createContextKey; } }));
35844
+ Object.defineProperty(exports, "ROOT_CONTEXT", ({ enumerable: true, get: function () { return context_1.ROOT_CONTEXT; } }));
35845
+ // Diag APIs
35846
+ var consoleLogger_1 = __nccwpck_require__(66769);
35847
+ Object.defineProperty(exports, "DiagConsoleLogger", ({ enumerable: true, get: function () { return consoleLogger_1.DiagConsoleLogger; } }));
35848
+ var types_1 = __nccwpck_require__(2573);
35849
+ Object.defineProperty(exports, "DiagLogLevel", ({ enumerable: true, get: function () { return types_1.DiagLogLevel; } }));
35850
+ // Metrics APIs
35851
+ var NoopMeter_1 = __nccwpck_require__(7017);
35852
+ Object.defineProperty(exports, "createNoopMeter", ({ enumerable: true, get: function () { return NoopMeter_1.createNoopMeter; } }));
35853
+ var Metric_1 = __nccwpck_require__(73814);
35854
+ Object.defineProperty(exports, "ValueType", ({ enumerable: true, get: function () { return Metric_1.ValueType; } }));
35855
+ // Propagation APIs
35856
+ var TextMapPropagator_1 = __nccwpck_require__(77865);
35857
+ Object.defineProperty(exports, "defaultTextMapGetter", ({ enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapGetter; } }));
35858
+ Object.defineProperty(exports, "defaultTextMapSetter", ({ enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapSetter; } }));
35859
+ var ProxyTracer_1 = __nccwpck_require__(4833);
35860
+ Object.defineProperty(exports, "ProxyTracer", ({ enumerable: true, get: function () { return ProxyTracer_1.ProxyTracer; } }));
35861
+ var ProxyTracerProvider_1 = __nccwpck_require__(20312);
35862
+ Object.defineProperty(exports, "ProxyTracerProvider", ({ enumerable: true, get: function () { return ProxyTracerProvider_1.ProxyTracerProvider; } }));
35863
+ var SamplingResult_1 = __nccwpck_require__(80434);
35864
+ Object.defineProperty(exports, "SamplingDecision", ({ enumerable: true, get: function () { return SamplingResult_1.SamplingDecision; } }));
35865
+ var span_kind_1 = __nccwpck_require__(42347);
35866
+ Object.defineProperty(exports, "SpanKind", ({ enumerable: true, get: function () { return span_kind_1.SpanKind; } }));
35867
+ var status_1 = __nccwpck_require__(61524);
35868
+ Object.defineProperty(exports, "SpanStatusCode", ({ enumerable: true, get: function () { return status_1.SpanStatusCode; } }));
35869
+ var trace_flags_1 = __nccwpck_require__(47221);
35870
+ Object.defineProperty(exports, "TraceFlags", ({ enumerable: true, get: function () { return trace_flags_1.TraceFlags; } }));
35871
+ var utils_2 = __nccwpck_require__(90969);
35872
+ Object.defineProperty(exports, "createTraceState", ({ enumerable: true, get: function () { return utils_2.createTraceState; } }));
35873
+ var spancontext_utils_1 = __nccwpck_require__(60639);
35874
+ Object.defineProperty(exports, "isSpanContextValid", ({ enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } }));
35875
+ Object.defineProperty(exports, "isValidTraceId", ({ enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } }));
35876
+ Object.defineProperty(exports, "isValidSpanId", ({ enumerable: true, get: function () { return spancontext_utils_1.isValidSpanId; } }));
35877
+ var invalid_span_constants_1 = __nccwpck_require__(57088);
35878
+ Object.defineProperty(exports, "INVALID_SPANID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPANID; } }));
35879
+ Object.defineProperty(exports, "INVALID_TRACEID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_TRACEID; } }));
35880
+ Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPAN_CONTEXT; } }));
35881
+ // Split module-level variable definition into separate files to allow
35882
+ // tree-shaking on each api instance.
35883
+ const context_api_1 = __nccwpck_require__(70244);
35884
+ Object.defineProperty(exports, "context", ({ enumerable: true, get: function () { return context_api_1.context; } }));
35885
+ const diag_api_1 = __nccwpck_require__(11414);
35886
+ Object.defineProperty(exports, "diag", ({ enumerable: true, get: function () { return diag_api_1.diag; } }));
35887
+ const metrics_api_1 = __nccwpck_require__(2053);
35888
+ Object.defineProperty(exports, "metrics", ({ enumerable: true, get: function () { return metrics_api_1.metrics; } }));
35889
+ const propagation_api_1 = __nccwpck_require__(16389);
35890
+ Object.defineProperty(exports, "propagation", ({ enumerable: true, get: function () { return propagation_api_1.propagation; } }));
35891
+ const trace_api_1 = __nccwpck_require__(56542);
35892
+ Object.defineProperty(exports, "trace", ({ enumerable: true, get: function () { return trace_api_1.trace; } }));
35893
+ // Default export.
35894
+ exports["default"] = {
35895
+ context: context_api_1.context,
35896
+ diag: diag_api_1.diag,
35897
+ metrics: metrics_api_1.metrics,
35898
+ propagation: propagation_api_1.propagation,
35899
+ trace: trace_api_1.trace,
35900
+ };
35901
+ //# sourceMappingURL=index.js.map
35902
+
35903
+ /***/ }),
35904
+
35905
+ /***/ 39923:
35906
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
35907
+
35908
+ "use strict";
35909
+
35910
+ /*
35911
+ * Copyright The OpenTelemetry Authors
35912
+ *
35913
+ * Licensed under the Apache License, Version 2.0 (the "License");
35914
+ * you may not use this file except in compliance with the License.
35915
+ * You may obtain a copy of the License at
35916
+ *
35917
+ * https://www.apache.org/licenses/LICENSE-2.0
35918
+ *
35919
+ * Unless required by applicable law or agreed to in writing, software
35920
+ * distributed under the License is distributed on an "AS IS" BASIS,
35921
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35922
+ * See the License for the specific language governing permissions and
35923
+ * limitations under the License.
35924
+ */
35925
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35926
+ exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0;
35927
+ const platform_1 = __nccwpck_require__(69932);
35928
+ const version_1 = __nccwpck_require__(59390);
35929
+ const semver_1 = __nccwpck_require__(45088);
35930
+ const major = version_1.VERSION.split('.')[0];
35931
+ const GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
35932
+ const _global = platform_1._globalThis;
35933
+ function registerGlobal(type, instance, diag, allowOverride = false) {
35934
+ var _a;
35935
+ const api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {
35936
+ version: version_1.VERSION,
35937
+ });
35938
+ if (!allowOverride && api[type]) {
35939
+ // already registered an API of this type
35940
+ const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
35941
+ diag.error(err.stack || err.message);
35942
+ return false;
35943
+ }
35944
+ if (api.version !== version_1.VERSION) {
35945
+ // All registered APIs must be of the same version exactly
35946
+ const err = new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
35947
+ diag.error(err.stack || err.message);
35948
+ return false;
35949
+ }
35950
+ api[type] = instance;
35951
+ diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
35952
+ return true;
35953
+ }
35954
+ exports.registerGlobal = registerGlobal;
35955
+ function getGlobal(type) {
35956
+ var _a, _b;
35957
+ const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;
35958
+ if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
35959
+ return;
35960
+ }
35961
+ return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
35962
+ }
35963
+ exports.getGlobal = getGlobal;
35964
+ function unregisterGlobal(type, diag) {
35965
+ diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
35966
+ const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
35967
+ if (api) {
35968
+ delete api[type];
35969
+ }
35970
+ }
35971
+ exports.unregisterGlobal = unregisterGlobal;
35972
+ //# sourceMappingURL=global-utils.js.map
35973
+
35974
+ /***/ }),
35975
+
35976
+ /***/ 45088:
35977
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
35978
+
35979
+ "use strict";
35980
+
35981
+ /*
35982
+ * Copyright The OpenTelemetry Authors
35983
+ *
35984
+ * Licensed under the Apache License, Version 2.0 (the "License");
35985
+ * you may not use this file except in compliance with the License.
35986
+ * You may obtain a copy of the License at
35987
+ *
35988
+ * https://www.apache.org/licenses/LICENSE-2.0
35989
+ *
35990
+ * Unless required by applicable law or agreed to in writing, software
35991
+ * distributed under the License is distributed on an "AS IS" BASIS,
35992
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35993
+ * See the License for the specific language governing permissions and
35994
+ * limitations under the License.
35995
+ */
35996
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35997
+ exports.isCompatible = exports._makeCompatibilityCheck = void 0;
35998
+ const version_1 = __nccwpck_require__(59390);
35999
+ const re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
36000
+ /**
36001
+ * Create a function to test an API version to see if it is compatible with the provided ownVersion.
36002
+ *
36003
+ * The returned function has the following semantics:
36004
+ * - Exact match is always compatible
36005
+ * - Major versions must match exactly
36006
+ * - 1.x package cannot use global 2.x package
36007
+ * - 2.x package cannot use global 1.x package
36008
+ * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API
36009
+ * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
36010
+ * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
36011
+ * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
36012
+ * - Patch and build tag differences are not considered at this time
36013
+ *
36014
+ * @param ownVersion version which should be checked against
36015
+ */
36016
+ function _makeCompatibilityCheck(ownVersion) {
36017
+ const acceptedVersions = new Set([ownVersion]);
36018
+ const rejectedVersions = new Set();
36019
+ const myVersionMatch = ownVersion.match(re);
36020
+ if (!myVersionMatch) {
36021
+ // we cannot guarantee compatibility so we always return noop
36022
+ return () => false;
36023
+ }
36024
+ const ownVersionParsed = {
36025
+ major: +myVersionMatch[1],
36026
+ minor: +myVersionMatch[2],
36027
+ patch: +myVersionMatch[3],
36028
+ prerelease: myVersionMatch[4],
36029
+ };
36030
+ // if ownVersion has a prerelease tag, versions must match exactly
36031
+ if (ownVersionParsed.prerelease != null) {
36032
+ return function isExactmatch(globalVersion) {
36033
+ return globalVersion === ownVersion;
36034
+ };
36035
+ }
36036
+ function _reject(v) {
36037
+ rejectedVersions.add(v);
36038
+ return false;
36039
+ }
36040
+ function _accept(v) {
36041
+ acceptedVersions.add(v);
36042
+ return true;
36043
+ }
36044
+ return function isCompatible(globalVersion) {
36045
+ if (acceptedVersions.has(globalVersion)) {
36046
+ return true;
36047
+ }
36048
+ if (rejectedVersions.has(globalVersion)) {
36049
+ return false;
36050
+ }
36051
+ const globalVersionMatch = globalVersion.match(re);
36052
+ if (!globalVersionMatch) {
36053
+ // cannot parse other version
36054
+ // we cannot guarantee compatibility so we always noop
36055
+ return _reject(globalVersion);
36056
+ }
36057
+ const globalVersionParsed = {
36058
+ major: +globalVersionMatch[1],
36059
+ minor: +globalVersionMatch[2],
36060
+ patch: +globalVersionMatch[3],
36061
+ prerelease: globalVersionMatch[4],
36062
+ };
36063
+ // if globalVersion has a prerelease tag, versions must match exactly
36064
+ if (globalVersionParsed.prerelease != null) {
36065
+ return _reject(globalVersion);
36066
+ }
36067
+ // major versions must match
36068
+ if (ownVersionParsed.major !== globalVersionParsed.major) {
36069
+ return _reject(globalVersion);
36070
+ }
36071
+ if (ownVersionParsed.major === 0) {
36072
+ if (ownVersionParsed.minor === globalVersionParsed.minor &&
36073
+ ownVersionParsed.patch <= globalVersionParsed.patch) {
36074
+ return _accept(globalVersion);
36075
+ }
36076
+ return _reject(globalVersion);
36077
+ }
36078
+ if (ownVersionParsed.minor <= globalVersionParsed.minor) {
36079
+ return _accept(globalVersion);
36080
+ }
36081
+ return _reject(globalVersion);
36082
+ };
36083
+ }
36084
+ exports._makeCompatibilityCheck = _makeCompatibilityCheck;
36085
+ /**
36086
+ * Test an API version to see if it is compatible with this API.
36087
+ *
36088
+ * - Exact match is always compatible
36089
+ * - Major versions must match exactly
36090
+ * - 1.x package cannot use global 2.x package
36091
+ * - 2.x package cannot use global 1.x package
36092
+ * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API
36093
+ * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
36094
+ * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
36095
+ * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
36096
+ * - Patch and build tag differences are not considered at this time
36097
+ *
36098
+ * @param version version of the API requesting an instance of the global API
36099
+ */
36100
+ exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
36101
+ //# sourceMappingURL=semver.js.map
36102
+
36103
+ /***/ }),
36104
+
36105
+ /***/ 2053:
36106
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
36107
+
36108
+ "use strict";
36109
+
36110
+ /*
36111
+ * Copyright The OpenTelemetry Authors
36112
+ *
36113
+ * Licensed under the Apache License, Version 2.0 (the "License");
36114
+ * you may not use this file except in compliance with the License.
36115
+ * You may obtain a copy of the License at
36116
+ *
36117
+ * https://www.apache.org/licenses/LICENSE-2.0
36118
+ *
36119
+ * Unless required by applicable law or agreed to in writing, software
36120
+ * distributed under the License is distributed on an "AS IS" BASIS,
36121
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36122
+ * See the License for the specific language governing permissions and
36123
+ * limitations under the License.
36124
+ */
36125
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36126
+ exports.metrics = void 0;
36127
+ // Split module-level variable definition into separate files to allow
36128
+ // tree-shaking on each api instance.
36129
+ const metrics_1 = __nccwpck_require__(18692);
36130
+ /** Entrypoint for metrics API */
36131
+ exports.metrics = metrics_1.MetricsAPI.getInstance();
36132
+ //# sourceMappingURL=metrics-api.js.map
36133
+
36134
+ /***/ }),
36135
+
36136
+ /***/ 73814:
36137
+ /***/ ((__unused_webpack_module, exports) => {
36138
+
36139
+ "use strict";
36140
+
36141
+ /*
36142
+ * Copyright The OpenTelemetry Authors
36143
+ *
36144
+ * Licensed under the Apache License, Version 2.0 (the "License");
36145
+ * you may not use this file except in compliance with the License.
36146
+ * You may obtain a copy of the License at
36147
+ *
36148
+ * https://www.apache.org/licenses/LICENSE-2.0
36149
+ *
36150
+ * Unless required by applicable law or agreed to in writing, software
36151
+ * distributed under the License is distributed on an "AS IS" BASIS,
36152
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36153
+ * See the License for the specific language governing permissions and
36154
+ * limitations under the License.
36155
+ */
36156
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36157
+ exports.ValueType = void 0;
36158
+ /** The Type of value. It describes how the data is reported. */
36159
+ var ValueType;
36160
+ (function (ValueType) {
36161
+ ValueType[ValueType["INT"] = 0] = "INT";
36162
+ ValueType[ValueType["DOUBLE"] = 1] = "DOUBLE";
36163
+ })(ValueType = exports.ValueType || (exports.ValueType = {}));
36164
+ //# sourceMappingURL=Metric.js.map
36165
+
36166
+ /***/ }),
36167
+
36168
+ /***/ 7017:
36169
+ /***/ ((__unused_webpack_module, exports) => {
36170
+
36171
+ "use strict";
36172
+
36173
+ /*
36174
+ * Copyright The OpenTelemetry Authors
36175
+ *
36176
+ * Licensed under the Apache License, Version 2.0 (the "License");
36177
+ * you may not use this file except in compliance with the License.
36178
+ * You may obtain a copy of the License at
36179
+ *
36180
+ * https://www.apache.org/licenses/LICENSE-2.0
36181
+ *
36182
+ * Unless required by applicable law or agreed to in writing, software
36183
+ * distributed under the License is distributed on an "AS IS" BASIS,
36184
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36185
+ * See the License for the specific language governing permissions and
36186
+ * limitations under the License.
36187
+ */
36188
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36189
+ exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_GAUGE_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopGaugeMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = void 0;
36190
+ /**
36191
+ * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses
36192
+ * constant NoopMetrics for all of its methods.
36193
+ */
36194
+ class NoopMeter {
36195
+ constructor() { }
36196
+ /**
36197
+ * @see {@link Meter.createGauge}
36198
+ */
36199
+ createGauge(_name, _options) {
36200
+ return exports.NOOP_GAUGE_METRIC;
36201
+ }
36202
+ /**
36203
+ * @see {@link Meter.createHistogram}
36204
+ */
36205
+ createHistogram(_name, _options) {
36206
+ return exports.NOOP_HISTOGRAM_METRIC;
36207
+ }
36208
+ /**
36209
+ * @see {@link Meter.createCounter}
36210
+ */
36211
+ createCounter(_name, _options) {
36212
+ return exports.NOOP_COUNTER_METRIC;
36213
+ }
36214
+ /**
36215
+ * @see {@link Meter.createUpDownCounter}
36216
+ */
36217
+ createUpDownCounter(_name, _options) {
36218
+ return exports.NOOP_UP_DOWN_COUNTER_METRIC;
36219
+ }
36220
+ /**
36221
+ * @see {@link Meter.createObservableGauge}
36222
+ */
36223
+ createObservableGauge(_name, _options) {
36224
+ return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
36225
+ }
36226
+ /**
36227
+ * @see {@link Meter.createObservableCounter}
36228
+ */
36229
+ createObservableCounter(_name, _options) {
36230
+ return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
36231
+ }
36232
+ /**
36233
+ * @see {@link Meter.createObservableUpDownCounter}
36234
+ */
36235
+ createObservableUpDownCounter(_name, _options) {
36236
+ return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
36237
+ }
36238
+ /**
36239
+ * @see {@link Meter.addBatchObservableCallback}
36240
+ */
36241
+ addBatchObservableCallback(_callback, _observables) { }
36242
+ /**
36243
+ * @see {@link Meter.removeBatchObservableCallback}
36244
+ */
36245
+ removeBatchObservableCallback(_callback) { }
36246
+ }
36247
+ exports.NoopMeter = NoopMeter;
36248
+ class NoopMetric {
36249
+ }
36250
+ exports.NoopMetric = NoopMetric;
36251
+ class NoopCounterMetric extends NoopMetric {
36252
+ add(_value, _attributes) { }
36253
+ }
36254
+ exports.NoopCounterMetric = NoopCounterMetric;
36255
+ class NoopUpDownCounterMetric extends NoopMetric {
36256
+ add(_value, _attributes) { }
36257
+ }
36258
+ exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
36259
+ class NoopGaugeMetric extends NoopMetric {
36260
+ record(_value, _attributes) { }
36261
+ }
36262
+ exports.NoopGaugeMetric = NoopGaugeMetric;
36263
+ class NoopHistogramMetric extends NoopMetric {
36264
+ record(_value, _attributes) { }
36265
+ }
36266
+ exports.NoopHistogramMetric = NoopHistogramMetric;
36267
+ class NoopObservableMetric {
36268
+ addCallback(_callback) { }
36269
+ removeCallback(_callback) { }
36270
+ }
36271
+ exports.NoopObservableMetric = NoopObservableMetric;
36272
+ class NoopObservableCounterMetric extends NoopObservableMetric {
36273
+ }
36274
+ exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
36275
+ class NoopObservableGaugeMetric extends NoopObservableMetric {
36276
+ }
36277
+ exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
36278
+ class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
36279
+ }
36280
+ exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
36281
+ exports.NOOP_METER = new NoopMeter();
36282
+ // Synchronous instruments
36283
+ exports.NOOP_COUNTER_METRIC = new NoopCounterMetric();
36284
+ exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric();
36285
+ exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();
36286
+ exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();
36287
+ // Asynchronous instruments
36288
+ exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric();
36289
+ exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric();
36290
+ exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric();
36291
+ /**
36292
+ * Create a no-op Meter
36293
+ */
36294
+ function createNoopMeter() {
36295
+ return exports.NOOP_METER;
36296
+ }
36297
+ exports.createNoopMeter = createNoopMeter;
36298
+ //# sourceMappingURL=NoopMeter.js.map
36299
+
36300
+ /***/ }),
36301
+
36302
+ /***/ 12896:
36303
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
36304
+
36305
+ "use strict";
36306
+
36307
+ /*
36308
+ * Copyright The OpenTelemetry Authors
36309
+ *
36310
+ * Licensed under the Apache License, Version 2.0 (the "License");
36311
+ * you may not use this file except in compliance with the License.
36312
+ * You may obtain a copy of the License at
36313
+ *
36314
+ * https://www.apache.org/licenses/LICENSE-2.0
36315
+ *
36316
+ * Unless required by applicable law or agreed to in writing, software
36317
+ * distributed under the License is distributed on an "AS IS" BASIS,
36318
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36319
+ * See the License for the specific language governing permissions and
36320
+ * limitations under the License.
36321
+ */
36322
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36323
+ exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = void 0;
36324
+ const NoopMeter_1 = __nccwpck_require__(7017);
36325
+ /**
36326
+ * An implementation of the {@link MeterProvider} which returns an impotent Meter
36327
+ * for all calls to `getMeter`
36328
+ */
36329
+ class NoopMeterProvider {
36330
+ getMeter(_name, _version, _options) {
36331
+ return NoopMeter_1.NOOP_METER;
36332
+ }
36333
+ }
36334
+ exports.NoopMeterProvider = NoopMeterProvider;
36335
+ exports.NOOP_METER_PROVIDER = new NoopMeterProvider();
36336
+ //# sourceMappingURL=NoopMeterProvider.js.map
36337
+
36338
+ /***/ }),
36339
+
36340
+ /***/ 69932:
36341
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
36342
+
36343
+ "use strict";
36344
+
36345
+ /*
36346
+ * Copyright The OpenTelemetry Authors
36347
+ *
36348
+ * Licensed under the Apache License, Version 2.0 (the "License");
36349
+ * you may not use this file except in compliance with the License.
36350
+ * You may obtain a copy of the License at
36351
+ *
36352
+ * https://www.apache.org/licenses/LICENSE-2.0
36353
+ *
36354
+ * Unless required by applicable law or agreed to in writing, software
36355
+ * distributed under the License is distributed on an "AS IS" BASIS,
36356
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36357
+ * See the License for the specific language governing permissions and
36358
+ * limitations under the License.
36359
+ */
36360
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
36361
+ if (k2 === undefined) k2 = k;
36362
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
36363
+ }) : (function(o, m, k, k2) {
36364
+ if (k2 === undefined) k2 = k;
36365
+ o[k2] = m[k];
36366
+ }));
36367
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36368
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
36369
+ };
36370
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36371
+ __exportStar(__nccwpck_require__(92921), exports);
36372
+ //# sourceMappingURL=index.js.map
36373
+
36374
+ /***/ }),
36375
+
36376
+ /***/ 10114:
36377
+ /***/ ((__unused_webpack_module, exports) => {
36378
+
36379
+ "use strict";
36380
+
36381
+ /*
36382
+ * Copyright The OpenTelemetry Authors
36383
+ *
36384
+ * Licensed under the Apache License, Version 2.0 (the "License");
36385
+ * you may not use this file except in compliance with the License.
36386
+ * You may obtain a copy of the License at
36387
+ *
36388
+ * https://www.apache.org/licenses/LICENSE-2.0
36389
+ *
36390
+ * Unless required by applicable law or agreed to in writing, software
36391
+ * distributed under the License is distributed on an "AS IS" BASIS,
36392
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36393
+ * See the License for the specific language governing permissions and
36394
+ * limitations under the License.
36395
+ */
36396
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36397
+ exports._globalThis = void 0;
36398
+ /** only globals that common to node and browsers are allowed */
36399
+ // eslint-disable-next-line node/no-unsupported-features/es-builtins
36400
+ exports._globalThis = typeof globalThis === 'object' ? globalThis : global;
36401
+ //# sourceMappingURL=globalThis.js.map
36402
+
36403
+ /***/ }),
36404
+
36405
+ /***/ 92921:
36406
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
36407
+
36408
+ "use strict";
36409
+
36410
+ /*
36411
+ * Copyright The OpenTelemetry Authors
36412
+ *
36413
+ * Licensed under the Apache License, Version 2.0 (the "License");
36414
+ * you may not use this file except in compliance with the License.
36415
+ * You may obtain a copy of the License at
36416
+ *
36417
+ * https://www.apache.org/licenses/LICENSE-2.0
36418
+ *
36419
+ * Unless required by applicable law or agreed to in writing, software
36420
+ * distributed under the License is distributed on an "AS IS" BASIS,
36421
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36422
+ * See the License for the specific language governing permissions and
36423
+ * limitations under the License.
36424
+ */
36425
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
36426
+ if (k2 === undefined) k2 = k;
36427
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
36428
+ }) : (function(o, m, k, k2) {
36429
+ if (k2 === undefined) k2 = k;
36430
+ o[k2] = m[k];
36431
+ }));
36432
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36433
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
36434
+ };
36435
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36436
+ __exportStar(__nccwpck_require__(10114), exports);
36437
+ //# sourceMappingURL=index.js.map
36438
+
36439
+ /***/ }),
36440
+
36441
+ /***/ 16389:
36442
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
36443
+
36444
+ "use strict";
36445
+
36446
+ /*
36447
+ * Copyright The OpenTelemetry Authors
36448
+ *
36449
+ * Licensed under the Apache License, Version 2.0 (the "License");
36450
+ * you may not use this file except in compliance with the License.
36451
+ * You may obtain a copy of the License at
36452
+ *
36453
+ * https://www.apache.org/licenses/LICENSE-2.0
36454
+ *
36455
+ * Unless required by applicable law or agreed to in writing, software
36456
+ * distributed under the License is distributed on an "AS IS" BASIS,
36457
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36458
+ * See the License for the specific language governing permissions and
36459
+ * limitations under the License.
36460
+ */
36461
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36462
+ exports.propagation = void 0;
36463
+ // Split module-level variable definition into separate files to allow
36464
+ // tree-shaking on each api instance.
36465
+ const propagation_1 = __nccwpck_require__(7);
36466
+ /** Entrypoint for propagation API */
36467
+ exports.propagation = propagation_1.PropagationAPI.getInstance();
36468
+ //# sourceMappingURL=propagation-api.js.map
36469
+
36470
+ /***/ }),
36471
+
36472
+ /***/ 54353:
36473
+ /***/ ((__unused_webpack_module, exports) => {
36474
+
36475
+ "use strict";
36476
+
36477
+ /*
36478
+ * Copyright The OpenTelemetry Authors
36479
+ *
36480
+ * Licensed under the Apache License, Version 2.0 (the "License");
36481
+ * you may not use this file except in compliance with the License.
36482
+ * You may obtain a copy of the License at
36483
+ *
36484
+ * https://www.apache.org/licenses/LICENSE-2.0
36485
+ *
36486
+ * Unless required by applicable law or agreed to in writing, software
36487
+ * distributed under the License is distributed on an "AS IS" BASIS,
36488
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36489
+ * See the License for the specific language governing permissions and
36490
+ * limitations under the License.
36491
+ */
36492
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36493
+ exports.NoopTextMapPropagator = void 0;
36494
+ /**
36495
+ * No-op implementations of {@link TextMapPropagator}.
36496
+ */
36497
+ class NoopTextMapPropagator {
36498
+ /** Noop inject function does nothing */
36499
+ inject(_context, _carrier) { }
36500
+ /** Noop extract function does nothing and returns the input context */
36501
+ extract(context, _carrier) {
36502
+ return context;
36503
+ }
36504
+ fields() {
36505
+ return [];
36506
+ }
36507
+ }
36508
+ exports.NoopTextMapPropagator = NoopTextMapPropagator;
36509
+ //# sourceMappingURL=NoopTextMapPropagator.js.map
36510
+
36511
+ /***/ }),
36512
+
36513
+ /***/ 77865:
36514
+ /***/ ((__unused_webpack_module, exports) => {
36515
+
36516
+ "use strict";
36517
+
36518
+ /*
36519
+ * Copyright The OpenTelemetry Authors
36520
+ *
36521
+ * Licensed under the Apache License, Version 2.0 (the "License");
36522
+ * you may not use this file except in compliance with the License.
36523
+ * You may obtain a copy of the License at
36524
+ *
36525
+ * https://www.apache.org/licenses/LICENSE-2.0
36526
+ *
36527
+ * Unless required by applicable law or agreed to in writing, software
36528
+ * distributed under the License is distributed on an "AS IS" BASIS,
36529
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36530
+ * See the License for the specific language governing permissions and
36531
+ * limitations under the License.
36532
+ */
36533
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36534
+ exports.defaultTextMapSetter = exports.defaultTextMapGetter = void 0;
36535
+ exports.defaultTextMapGetter = {
36536
+ get(carrier, key) {
36537
+ if (carrier == null) {
36538
+ return undefined;
36539
+ }
36540
+ return carrier[key];
36541
+ },
36542
+ keys(carrier) {
36543
+ if (carrier == null) {
36544
+ return [];
36545
+ }
36546
+ return Object.keys(carrier);
36547
+ },
36548
+ };
36549
+ exports.defaultTextMapSetter = {
36550
+ set(carrier, key, value) {
36551
+ if (carrier == null) {
36552
+ return;
36553
+ }
36554
+ carrier[key] = value;
36555
+ },
36556
+ };
36557
+ //# sourceMappingURL=TextMapPropagator.js.map
36558
+
36559
+ /***/ }),
36560
+
36561
+ /***/ 56542:
36562
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
36563
+
36564
+ "use strict";
36565
+
36566
+ /*
36567
+ * Copyright The OpenTelemetry Authors
36568
+ *
36569
+ * Licensed under the Apache License, Version 2.0 (the "License");
36570
+ * you may not use this file except in compliance with the License.
36571
+ * You may obtain a copy of the License at
36572
+ *
36573
+ * https://www.apache.org/licenses/LICENSE-2.0
36574
+ *
36575
+ * Unless required by applicable law or agreed to in writing, software
36576
+ * distributed under the License is distributed on an "AS IS" BASIS,
36577
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36578
+ * See the License for the specific language governing permissions and
36579
+ * limitations under the License.
36580
+ */
36581
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36582
+ exports.trace = void 0;
36583
+ // Split module-level variable definition into separate files to allow
36584
+ // tree-shaking on each api instance.
36585
+ const trace_1 = __nccwpck_require__(24508);
36586
+ /** Entrypoint for trace API */
36587
+ exports.trace = trace_1.TraceAPI.getInstance();
36588
+ //# sourceMappingURL=trace-api.js.map
36589
+
36590
+ /***/ }),
36591
+
36592
+ /***/ 47168:
36593
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
36594
+
36595
+ "use strict";
36596
+
36597
+ /*
36598
+ * Copyright The OpenTelemetry Authors
36599
+ *
36600
+ * Licensed under the Apache License, Version 2.0 (the "License");
36601
+ * you may not use this file except in compliance with the License.
36602
+ * You may obtain a copy of the License at
36603
+ *
36604
+ * https://www.apache.org/licenses/LICENSE-2.0
36605
+ *
36606
+ * Unless required by applicable law or agreed to in writing, software
36607
+ * distributed under the License is distributed on an "AS IS" BASIS,
36608
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36609
+ * See the License for the specific language governing permissions and
36610
+ * limitations under the License.
36611
+ */
36612
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36613
+ exports.NonRecordingSpan = void 0;
36614
+ const invalid_span_constants_1 = __nccwpck_require__(57088);
36615
+ /**
36616
+ * The NonRecordingSpan is the default {@link Span} that is used when no Span
36617
+ * implementation is available. All operations are no-op including context
36618
+ * propagation.
36619
+ */
36620
+ class NonRecordingSpan {
36621
+ constructor(_spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
36622
+ this._spanContext = _spanContext;
36623
+ }
36624
+ // Returns a SpanContext.
36625
+ spanContext() {
36626
+ return this._spanContext;
36627
+ }
36628
+ // By default does nothing
36629
+ setAttribute(_key, _value) {
36630
+ return this;
36631
+ }
36632
+ // By default does nothing
36633
+ setAttributes(_attributes) {
36634
+ return this;
36635
+ }
36636
+ // By default does nothing
36637
+ addEvent(_name, _attributes) {
36638
+ return this;
36639
+ }
36640
+ addLink(_link) {
36641
+ return this;
36642
+ }
36643
+ addLinks(_links) {
36644
+ return this;
36645
+ }
36646
+ // By default does nothing
36647
+ setStatus(_status) {
36648
+ return this;
36649
+ }
36650
+ // By default does nothing
36651
+ updateName(_name) {
36652
+ return this;
36653
+ }
36654
+ // By default does nothing
36655
+ end(_endTime) { }
36656
+ // isRecording always returns false for NonRecordingSpan.
36657
+ isRecording() {
36658
+ return false;
36659
+ }
36660
+ // By default does nothing
36661
+ recordException(_exception, _time) { }
36662
+ }
36663
+ exports.NonRecordingSpan = NonRecordingSpan;
36664
+ //# sourceMappingURL=NonRecordingSpan.js.map
36665
+
36666
+ /***/ }),
36667
+
36668
+ /***/ 9051:
36669
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
36670
+
36671
+ "use strict";
36672
+
36673
+ /*
36674
+ * Copyright The OpenTelemetry Authors
36675
+ *
36676
+ * Licensed under the Apache License, Version 2.0 (the "License");
36677
+ * you may not use this file except in compliance with the License.
36678
+ * You may obtain a copy of the License at
36679
+ *
36680
+ * https://www.apache.org/licenses/LICENSE-2.0
36681
+ *
36682
+ * Unless required by applicable law or agreed to in writing, software
36683
+ * distributed under the License is distributed on an "AS IS" BASIS,
36684
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36685
+ * See the License for the specific language governing permissions and
36686
+ * limitations under the License.
36687
+ */
36688
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36689
+ exports.NoopTracer = void 0;
36690
+ const context_1 = __nccwpck_require__(29750);
36691
+ const context_utils_1 = __nccwpck_require__(52771);
36692
+ const NonRecordingSpan_1 = __nccwpck_require__(47168);
36693
+ const spancontext_utils_1 = __nccwpck_require__(60639);
36694
+ const contextApi = context_1.ContextAPI.getInstance();
36695
+ /**
36696
+ * No-op implementations of {@link Tracer}.
36697
+ */
36698
+ class NoopTracer {
36699
+ // startSpan starts a noop span.
36700
+ startSpan(name, options, context = contextApi.active()) {
36701
+ const root = Boolean(options === null || options === void 0 ? void 0 : options.root);
36702
+ if (root) {
36703
+ return new NonRecordingSpan_1.NonRecordingSpan();
36704
+ }
36705
+ const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
36706
+ if (isSpanContext(parentFromContext) &&
36707
+ (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
36708
+ return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
36709
+ }
36710
+ else {
36711
+ return new NonRecordingSpan_1.NonRecordingSpan();
36712
+ }
36713
+ }
36714
+ startActiveSpan(name, arg2, arg3, arg4) {
36715
+ let opts;
36716
+ let ctx;
36717
+ let fn;
36718
+ if (arguments.length < 2) {
36719
+ return;
36720
+ }
36721
+ else if (arguments.length === 2) {
36722
+ fn = arg2;
36723
+ }
36724
+ else if (arguments.length === 3) {
36725
+ opts = arg2;
36726
+ fn = arg3;
36727
+ }
36728
+ else {
36729
+ opts = arg2;
36730
+ ctx = arg3;
36731
+ fn = arg4;
36732
+ }
36733
+ const parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
36734
+ const span = this.startSpan(name, opts, parentContext);
36735
+ const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
36736
+ return contextApi.with(contextWithSpanSet, fn, undefined, span);
36737
+ }
36738
+ }
36739
+ exports.NoopTracer = NoopTracer;
36740
+ function isSpanContext(spanContext) {
36741
+ return (typeof spanContext === 'object' &&
36742
+ typeof spanContext['spanId'] === 'string' &&
36743
+ typeof spanContext['traceId'] === 'string' &&
36744
+ typeof spanContext['traceFlags'] === 'number');
36745
+ }
36746
+ //# sourceMappingURL=NoopTracer.js.map
36747
+
36748
+ /***/ }),
36749
+
36750
+ /***/ 94602:
36751
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
36752
+
36753
+ "use strict";
36754
+
36755
+ /*
36756
+ * Copyright The OpenTelemetry Authors
36757
+ *
36758
+ * Licensed under the Apache License, Version 2.0 (the "License");
36759
+ * you may not use this file except in compliance with the License.
36760
+ * You may obtain a copy of the License at
36761
+ *
36762
+ * https://www.apache.org/licenses/LICENSE-2.0
36763
+ *
36764
+ * Unless required by applicable law or agreed to in writing, software
36765
+ * distributed under the License is distributed on an "AS IS" BASIS,
36766
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36767
+ * See the License for the specific language governing permissions and
36768
+ * limitations under the License.
36769
+ */
36770
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36771
+ exports.NoopTracerProvider = void 0;
36772
+ const NoopTracer_1 = __nccwpck_require__(9051);
36773
+ /**
36774
+ * An implementation of the {@link TracerProvider} which returns an impotent
36775
+ * Tracer for all calls to `getTracer`.
36776
+ *
36777
+ * All operations are no-op.
36778
+ */
36779
+ class NoopTracerProvider {
36780
+ getTracer(_name, _version, _options) {
36781
+ return new NoopTracer_1.NoopTracer();
36782
+ }
36783
+ }
36784
+ exports.NoopTracerProvider = NoopTracerProvider;
36785
+ //# sourceMappingURL=NoopTracerProvider.js.map
36786
+
36787
+ /***/ }),
36788
+
36789
+ /***/ 4833:
36790
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
36791
+
36792
+ "use strict";
36793
+
36794
+ /*
36795
+ * Copyright The OpenTelemetry Authors
36796
+ *
36797
+ * Licensed under the Apache License, Version 2.0 (the "License");
36798
+ * you may not use this file except in compliance with the License.
36799
+ * You may obtain a copy of the License at
36800
+ *
36801
+ * https://www.apache.org/licenses/LICENSE-2.0
36802
+ *
36803
+ * Unless required by applicable law or agreed to in writing, software
36804
+ * distributed under the License is distributed on an "AS IS" BASIS,
36805
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36806
+ * See the License for the specific language governing permissions and
36807
+ * limitations under the License.
36808
+ */
36809
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36810
+ exports.ProxyTracer = void 0;
36811
+ const NoopTracer_1 = __nccwpck_require__(9051);
36812
+ const NOOP_TRACER = new NoopTracer_1.NoopTracer();
36813
+ /**
36814
+ * Proxy tracer provided by the proxy tracer provider
36815
+ */
36816
+ class ProxyTracer {
36817
+ constructor(_provider, name, version, options) {
36818
+ this._provider = _provider;
36819
+ this.name = name;
36820
+ this.version = version;
36821
+ this.options = options;
36822
+ }
36823
+ startSpan(name, options, context) {
36824
+ return this._getTracer().startSpan(name, options, context);
36825
+ }
36826
+ startActiveSpan(_name, _options, _context, _fn) {
36827
+ const tracer = this._getTracer();
36828
+ return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
36829
+ }
36830
+ /**
36831
+ * Try to get a tracer from the proxy tracer provider.
36832
+ * If the proxy tracer provider has no delegate, return a noop tracer.
36833
+ */
36834
+ _getTracer() {
36835
+ if (this._delegate) {
36836
+ return this._delegate;
36837
+ }
36838
+ const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
36839
+ if (!tracer) {
36840
+ return NOOP_TRACER;
36841
+ }
36842
+ this._delegate = tracer;
36843
+ return this._delegate;
36844
+ }
36845
+ }
36846
+ exports.ProxyTracer = ProxyTracer;
36847
+ //# sourceMappingURL=ProxyTracer.js.map
36848
+
36849
+ /***/ }),
36850
+
36851
+ /***/ 20312:
36852
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
36853
+
36854
+ "use strict";
36855
+
36856
+ /*
36857
+ * Copyright The OpenTelemetry Authors
36858
+ *
36859
+ * Licensed under the Apache License, Version 2.0 (the "License");
36860
+ * you may not use this file except in compliance with the License.
36861
+ * You may obtain a copy of the License at
36862
+ *
36863
+ * https://www.apache.org/licenses/LICENSE-2.0
36864
+ *
36865
+ * Unless required by applicable law or agreed to in writing, software
36866
+ * distributed under the License is distributed on an "AS IS" BASIS,
36867
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36868
+ * See the License for the specific language governing permissions and
36869
+ * limitations under the License.
36870
+ */
36871
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36872
+ exports.ProxyTracerProvider = void 0;
36873
+ const ProxyTracer_1 = __nccwpck_require__(4833);
36874
+ const NoopTracerProvider_1 = __nccwpck_require__(94602);
36875
+ const NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider();
36876
+ /**
36877
+ * Tracer provider which provides {@link ProxyTracer}s.
36878
+ *
36879
+ * Before a delegate is set, tracers provided are NoOp.
36880
+ * When a delegate is set, traces are provided from the delegate.
36881
+ * When a delegate is set after tracers have already been provided,
36882
+ * all tracers already provided will use the provided delegate implementation.
36883
+ */
36884
+ class ProxyTracerProvider {
36885
+ /**
36886
+ * Get a {@link ProxyTracer}
36887
+ */
36888
+ getTracer(name, version, options) {
36889
+ var _a;
36890
+ return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options));
36891
+ }
36892
+ getDelegate() {
36893
+ var _a;
36894
+ return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;
36895
+ }
36896
+ /**
36897
+ * Set the delegate tracer provider
36898
+ */
36899
+ setDelegate(delegate) {
36900
+ this._delegate = delegate;
36901
+ }
36902
+ getDelegateTracer(name, version, options) {
36903
+ var _a;
36904
+ return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
36905
+ }
36906
+ }
36907
+ exports.ProxyTracerProvider = ProxyTracerProvider;
36908
+ //# sourceMappingURL=ProxyTracerProvider.js.map
36909
+
36910
+ /***/ }),
36911
+
36912
+ /***/ 80434:
36913
+ /***/ ((__unused_webpack_module, exports) => {
36914
+
36915
+ "use strict";
36916
+
36917
+ /*
36918
+ * Copyright The OpenTelemetry Authors
36919
+ *
36920
+ * Licensed under the Apache License, Version 2.0 (the "License");
36921
+ * you may not use this file except in compliance with the License.
36922
+ * You may obtain a copy of the License at
36923
+ *
36924
+ * https://www.apache.org/licenses/LICENSE-2.0
36925
+ *
36926
+ * Unless required by applicable law or agreed to in writing, software
36927
+ * distributed under the License is distributed on an "AS IS" BASIS,
36928
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36929
+ * See the License for the specific language governing permissions and
36930
+ * limitations under the License.
36931
+ */
36932
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36933
+ exports.SamplingDecision = void 0;
36934
+ /**
36935
+ * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.
36936
+ * A sampling decision that determines how a {@link Span} will be recorded
36937
+ * and collected.
36938
+ */
36939
+ var SamplingDecision;
36940
+ (function (SamplingDecision) {
36941
+ /**
36942
+ * `Span.isRecording() === false`, span will not be recorded and all events
36943
+ * and attributes will be dropped.
36944
+ */
36945
+ SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD";
36946
+ /**
36947
+ * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}
36948
+ * MUST NOT be set.
36949
+ */
36950
+ SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD";
36951
+ /**
36952
+ * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}
36953
+ * MUST be set.
36954
+ */
36955
+ SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
36956
+ })(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
36957
+ //# sourceMappingURL=SamplingResult.js.map
36958
+
36959
+ /***/ }),
36960
+
36961
+ /***/ 52771:
36962
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
36963
+
36964
+ "use strict";
36965
+
36966
+ /*
36967
+ * Copyright The OpenTelemetry Authors
36968
+ *
36969
+ * Licensed under the Apache License, Version 2.0 (the "License");
36970
+ * you may not use this file except in compliance with the License.
36971
+ * You may obtain a copy of the License at
36972
+ *
36973
+ * https://www.apache.org/licenses/LICENSE-2.0
36974
+ *
36975
+ * Unless required by applicable law or agreed to in writing, software
36976
+ * distributed under the License is distributed on an "AS IS" BASIS,
36977
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36978
+ * See the License for the specific language governing permissions and
36979
+ * limitations under the License.
36980
+ */
36981
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
36982
+ exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = void 0;
36983
+ const context_1 = __nccwpck_require__(37977);
36984
+ const NonRecordingSpan_1 = __nccwpck_require__(47168);
36985
+ const context_2 = __nccwpck_require__(29750);
36986
+ /**
36987
+ * span key
36988
+ */
36989
+ const SPAN_KEY = (0, context_1.createContextKey)('OpenTelemetry Context Key SPAN');
36990
+ /**
36991
+ * Return the span if one exists
36992
+ *
36993
+ * @param context context to get span from
36994
+ */
36995
+ function getSpan(context) {
36996
+ return context.getValue(SPAN_KEY) || undefined;
36997
+ }
36998
+ exports.getSpan = getSpan;
36999
+ /**
37000
+ * Gets the span from the current context, if one exists.
37001
+ */
37002
+ function getActiveSpan() {
37003
+ return getSpan(context_2.ContextAPI.getInstance().active());
37004
+ }
37005
+ exports.getActiveSpan = getActiveSpan;
37006
+ /**
37007
+ * Set the span on a context
37008
+ *
37009
+ * @param context context to use as parent
37010
+ * @param span span to set active
37011
+ */
37012
+ function setSpan(context, span) {
37013
+ return context.setValue(SPAN_KEY, span);
37014
+ }
37015
+ exports.setSpan = setSpan;
37016
+ /**
37017
+ * Remove current span stored in the context
37018
+ *
37019
+ * @param context context to delete span from
37020
+ */
37021
+ function deleteSpan(context) {
37022
+ return context.deleteValue(SPAN_KEY);
37023
+ }
37024
+ exports.deleteSpan = deleteSpan;
37025
+ /**
37026
+ * Wrap span context in a NoopSpan and set as span in a new
37027
+ * context
37028
+ *
37029
+ * @param context context to set active span on
37030
+ * @param spanContext span context to be wrapped
37031
+ */
37032
+ function setSpanContext(context, spanContext) {
37033
+ return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
37034
+ }
37035
+ exports.setSpanContext = setSpanContext;
37036
+ /**
37037
+ * Get the span context of the span if it exists.
37038
+ *
37039
+ * @param context context to get values from
37040
+ */
37041
+ function getSpanContext(context) {
37042
+ var _a;
37043
+ return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();
37044
+ }
37045
+ exports.getSpanContext = getSpanContext;
37046
+ //# sourceMappingURL=context-utils.js.map
37047
+
37048
+ /***/ }),
37049
+
37050
+ /***/ 77903:
37051
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
37052
+
37053
+ "use strict";
37054
+
37055
+ /*
37056
+ * Copyright The OpenTelemetry Authors
37057
+ *
37058
+ * Licensed under the Apache License, Version 2.0 (the "License");
37059
+ * you may not use this file except in compliance with the License.
37060
+ * You may obtain a copy of the License at
37061
+ *
37062
+ * https://www.apache.org/licenses/LICENSE-2.0
37063
+ *
37064
+ * Unless required by applicable law or agreed to in writing, software
37065
+ * distributed under the License is distributed on an "AS IS" BASIS,
37066
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37067
+ * See the License for the specific language governing permissions and
37068
+ * limitations under the License.
37069
+ */
37070
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
37071
+ exports.TraceStateImpl = void 0;
37072
+ const tracestate_validators_1 = __nccwpck_require__(95618);
37073
+ const MAX_TRACE_STATE_ITEMS = 32;
37074
+ const MAX_TRACE_STATE_LEN = 512;
37075
+ const LIST_MEMBERS_SEPARATOR = ',';
37076
+ const LIST_MEMBER_KEY_VALUE_SPLITTER = '=';
37077
+ /**
37078
+ * TraceState must be a class and not a simple object type because of the spec
37079
+ * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).
37080
+ *
37081
+ * Here is the list of allowed mutations:
37082
+ * - New key-value pair should be added into the beginning of the list
37083
+ * - The value of any key can be updated. Modified keys MUST be moved to the
37084
+ * beginning of the list.
37085
+ */
37086
+ class TraceStateImpl {
37087
+ constructor(rawTraceState) {
37088
+ this._internalState = new Map();
37089
+ if (rawTraceState)
37090
+ this._parse(rawTraceState);
37091
+ }
37092
+ set(key, value) {
37093
+ // TODO: Benchmark the different approaches(map vs list) and
37094
+ // use the faster one.
37095
+ const traceState = this._clone();
37096
+ if (traceState._internalState.has(key)) {
37097
+ traceState._internalState.delete(key);
37098
+ }
37099
+ traceState._internalState.set(key, value);
37100
+ return traceState;
37101
+ }
37102
+ unset(key) {
37103
+ const traceState = this._clone();
37104
+ traceState._internalState.delete(key);
37105
+ return traceState;
37106
+ }
37107
+ get(key) {
37108
+ return this._internalState.get(key);
37109
+ }
37110
+ serialize() {
37111
+ return this._keys()
37112
+ .reduce((agg, key) => {
37113
+ agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
37114
+ return agg;
37115
+ }, [])
37116
+ .join(LIST_MEMBERS_SEPARATOR);
37117
+ }
37118
+ _parse(rawTraceState) {
37119
+ if (rawTraceState.length > MAX_TRACE_STATE_LEN)
37120
+ return;
37121
+ this._internalState = rawTraceState
37122
+ .split(LIST_MEMBERS_SEPARATOR)
37123
+ .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning
37124
+ .reduce((agg, part) => {
37125
+ const listMember = part.trim(); // Optional Whitespace (OWS) handling
37126
+ const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
37127
+ if (i !== -1) {
37128
+ const key = listMember.slice(0, i);
37129
+ const value = listMember.slice(i + 1, part.length);
37130
+ if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
37131
+ agg.set(key, value);
37132
+ }
37133
+ else {
37134
+ // TODO: Consider to add warning log
37135
+ }
37136
+ }
37137
+ return agg;
37138
+ }, new Map());
37139
+ // Because of the reverse() requirement, trunc must be done after map is created
37140
+ if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
37141
+ this._internalState = new Map(Array.from(this._internalState.entries())
37142
+ .reverse() // Use reverse same as original tracestate parse chain
37143
+ .slice(0, MAX_TRACE_STATE_ITEMS));
37144
+ }
37145
+ }
37146
+ _keys() {
37147
+ return Array.from(this._internalState.keys()).reverse();
37148
+ }
37149
+ _clone() {
37150
+ const traceState = new TraceStateImpl();
37151
+ traceState._internalState = new Map(this._internalState);
37152
+ return traceState;
37153
+ }
37154
+ }
37155
+ exports.TraceStateImpl = TraceStateImpl;
37156
+ //# sourceMappingURL=tracestate-impl.js.map
37157
+
37158
+ /***/ }),
37159
+
37160
+ /***/ 95618:
37161
+ /***/ ((__unused_webpack_module, exports) => {
37162
+
37163
+ "use strict";
37164
+
37165
+ /*
37166
+ * Copyright The OpenTelemetry Authors
37167
+ *
37168
+ * Licensed under the Apache License, Version 2.0 (the "License");
37169
+ * you may not use this file except in compliance with the License.
37170
+ * You may obtain a copy of the License at
37171
+ *
37172
+ * https://www.apache.org/licenses/LICENSE-2.0
37173
+ *
37174
+ * Unless required by applicable law or agreed to in writing, software
37175
+ * distributed under the License is distributed on an "AS IS" BASIS,
37176
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37177
+ * See the License for the specific language governing permissions and
37178
+ * limitations under the License.
37179
+ */
37180
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
37181
+ exports.validateValue = exports.validateKey = void 0;
37182
+ const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';
37183
+ const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
37184
+ const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
37185
+ const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
37186
+ const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
37187
+ const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
37188
+ /**
37189
+ * Key is opaque string up to 256 characters printable. It MUST begin with a
37190
+ * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
37191
+ * underscores _, dashes -, asterisks *, and forward slashes /.
37192
+ * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the
37193
+ * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
37194
+ * see https://www.w3.org/TR/trace-context/#key
37195
+ */
37196
+ function validateKey(key) {
37197
+ return VALID_KEY_REGEX.test(key);
37198
+ }
37199
+ exports.validateKey = validateKey;
37200
+ /**
37201
+ * Value is opaque string up to 256 characters printable ASCII RFC0020
37202
+ * characters (i.e., the range 0x20 to 0x7E) except comma , and =.
37203
+ */
37204
+ function validateValue(value) {
37205
+ return (VALID_VALUE_BASE_REGEX.test(value) &&
37206
+ !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));
37207
+ }
37208
+ exports.validateValue = validateValue;
37209
+ //# sourceMappingURL=tracestate-validators.js.map
37210
+
37211
+ /***/ }),
37212
+
37213
+ /***/ 90969:
37214
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
37215
+
37216
+ "use strict";
37217
+
37218
+ /*
37219
+ * Copyright The OpenTelemetry Authors
37220
+ *
37221
+ * Licensed under the Apache License, Version 2.0 (the "License");
37222
+ * you may not use this file except in compliance with the License.
37223
+ * You may obtain a copy of the License at
37224
+ *
37225
+ * https://www.apache.org/licenses/LICENSE-2.0
37226
+ *
37227
+ * Unless required by applicable law or agreed to in writing, software
37228
+ * distributed under the License is distributed on an "AS IS" BASIS,
37229
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37230
+ * See the License for the specific language governing permissions and
37231
+ * limitations under the License.
37232
+ */
37233
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
37234
+ exports.createTraceState = void 0;
37235
+ const tracestate_impl_1 = __nccwpck_require__(77903);
37236
+ function createTraceState(rawTraceState) {
37237
+ return new tracestate_impl_1.TraceStateImpl(rawTraceState);
37238
+ }
37239
+ exports.createTraceState = createTraceState;
37240
+ //# sourceMappingURL=utils.js.map
37241
+
37242
+ /***/ }),
37243
+
37244
+ /***/ 57088:
37245
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
37246
+
37247
+ "use strict";
37248
+
37249
+ /*
37250
+ * Copyright The OpenTelemetry Authors
37251
+ *
37252
+ * Licensed under the Apache License, Version 2.0 (the "License");
37253
+ * you may not use this file except in compliance with the License.
37254
+ * You may obtain a copy of the License at
37255
+ *
37256
+ * https://www.apache.org/licenses/LICENSE-2.0
37257
+ *
37258
+ * Unless required by applicable law or agreed to in writing, software
37259
+ * distributed under the License is distributed on an "AS IS" BASIS,
37260
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37261
+ * See the License for the specific language governing permissions and
37262
+ * limitations under the License.
37263
+ */
37264
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
37265
+ exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0;
37266
+ const trace_flags_1 = __nccwpck_require__(47221);
37267
+ exports.INVALID_SPANID = '0000000000000000';
37268
+ exports.INVALID_TRACEID = '00000000000000000000000000000000';
37269
+ exports.INVALID_SPAN_CONTEXT = {
37270
+ traceId: exports.INVALID_TRACEID,
37271
+ spanId: exports.INVALID_SPANID,
37272
+ traceFlags: trace_flags_1.TraceFlags.NONE,
37273
+ };
37274
+ //# sourceMappingURL=invalid-span-constants.js.map
37275
+
37276
+ /***/ }),
37277
+
37278
+ /***/ 42347:
37279
+ /***/ ((__unused_webpack_module, exports) => {
37280
+
37281
+ "use strict";
37282
+
37283
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
37284
+ exports.SpanKind = void 0;
37285
+ /*
37286
+ * Copyright The OpenTelemetry Authors
37287
+ *
37288
+ * Licensed under the Apache License, Version 2.0 (the "License");
37289
+ * you may not use this file except in compliance with the License.
37290
+ * You may obtain a copy of the License at
37291
+ *
37292
+ * https://www.apache.org/licenses/LICENSE-2.0
37293
+ *
37294
+ * Unless required by applicable law or agreed to in writing, software
37295
+ * distributed under the License is distributed on an "AS IS" BASIS,
37296
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37297
+ * See the License for the specific language governing permissions and
37298
+ * limitations under the License.
37299
+ */
37300
+ var SpanKind;
37301
+ (function (SpanKind) {
37302
+ /** Default value. Indicates that the span is used internally. */
37303
+ SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL";
37304
+ /**
37305
+ * Indicates that the span covers server-side handling of an RPC or other
37306
+ * remote request.
37307
+ */
37308
+ SpanKind[SpanKind["SERVER"] = 1] = "SERVER";
37309
+ /**
37310
+ * Indicates that the span covers the client-side wrapper around an RPC or
37311
+ * other remote request.
37312
+ */
37313
+ SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT";
37314
+ /**
37315
+ * Indicates that the span describes producer sending a message to a
37316
+ * broker. Unlike client and server, there is no direct critical path latency
37317
+ * relationship between producer and consumer spans.
37318
+ */
37319
+ SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER";
37320
+ /**
37321
+ * Indicates that the span describes consumer receiving a message from a
37322
+ * broker. Unlike client and server, there is no direct critical path latency
37323
+ * relationship between producer and consumer spans.
37324
+ */
37325
+ SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER";
37326
+ })(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
37327
+ //# sourceMappingURL=span_kind.js.map
37328
+
37329
+ /***/ }),
37330
+
37331
+ /***/ 60639:
37332
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
37333
+
37334
+ "use strict";
37335
+
37336
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
37337
+ exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0;
37338
+ /*
37339
+ * Copyright The OpenTelemetry Authors
37340
+ *
37341
+ * Licensed under the Apache License, Version 2.0 (the "License");
37342
+ * you may not use this file except in compliance with the License.
37343
+ * You may obtain a copy of the License at
37344
+ *
37345
+ * https://www.apache.org/licenses/LICENSE-2.0
37346
+ *
37347
+ * Unless required by applicable law or agreed to in writing, software
37348
+ * distributed under the License is distributed on an "AS IS" BASIS,
37349
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37350
+ * See the License for the specific language governing permissions and
37351
+ * limitations under the License.
37352
+ */
37353
+ const invalid_span_constants_1 = __nccwpck_require__(57088);
37354
+ const NonRecordingSpan_1 = __nccwpck_require__(47168);
37355
+ const VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;
37356
+ const VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;
37357
+ function isValidTraceId(traceId) {
37358
+ return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
37359
+ }
37360
+ exports.isValidTraceId = isValidTraceId;
37361
+ function isValidSpanId(spanId) {
37362
+ return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID;
37363
+ }
37364
+ exports.isValidSpanId = isValidSpanId;
37365
+ /**
37366
+ * Returns true if this {@link SpanContext} is valid.
37367
+ * @return true if this {@link SpanContext} is valid.
37368
+ */
37369
+ function isSpanContextValid(spanContext) {
37370
+ return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));
37371
+ }
37372
+ exports.isSpanContextValid = isSpanContextValid;
37373
+ /**
37374
+ * Wrap the given {@link SpanContext} in a new non-recording {@link Span}
37375
+ *
37376
+ * @param spanContext span context to be wrapped
37377
+ * @returns a new non-recording {@link Span} with the provided context
37378
+ */
37379
+ function wrapSpanContext(spanContext) {
37380
+ return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
37381
+ }
37382
+ exports.wrapSpanContext = wrapSpanContext;
37383
+ //# sourceMappingURL=spancontext-utils.js.map
37384
+
37385
+ /***/ }),
37386
+
37387
+ /***/ 61524:
37388
+ /***/ ((__unused_webpack_module, exports) => {
37389
+
37390
+ "use strict";
37391
+
37392
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
37393
+ exports.SpanStatusCode = void 0;
37394
+ /**
37395
+ * An enumeration of status codes.
37396
+ */
37397
+ var SpanStatusCode;
37398
+ (function (SpanStatusCode) {
37399
+ /**
37400
+ * The default status.
37401
+ */
37402
+ SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET";
37403
+ /**
37404
+ * The operation has been validated by an Application developer or
37405
+ * Operator to have completed successfully.
37406
+ */
37407
+ SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK";
37408
+ /**
37409
+ * The operation contains an error.
37410
+ */
37411
+ SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR";
37412
+ })(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
37413
+ //# sourceMappingURL=status.js.map
37414
+
37415
+ /***/ }),
37416
+
37417
+ /***/ 47221:
37418
+ /***/ ((__unused_webpack_module, exports) => {
37419
+
37420
+ "use strict";
37421
+
37422
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
37423
+ exports.TraceFlags = void 0;
37424
+ /*
37425
+ * Copyright The OpenTelemetry Authors
37426
+ *
37427
+ * Licensed under the Apache License, Version 2.0 (the "License");
37428
+ * you may not use this file except in compliance with the License.
37429
+ * You may obtain a copy of the License at
37430
+ *
37431
+ * https://www.apache.org/licenses/LICENSE-2.0
37432
+ *
37433
+ * Unless required by applicable law or agreed to in writing, software
37434
+ * distributed under the License is distributed on an "AS IS" BASIS,
37435
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37436
+ * See the License for the specific language governing permissions and
37437
+ * limitations under the License.
37438
+ */
37439
+ var TraceFlags;
37440
+ (function (TraceFlags) {
37441
+ /** Represents no flag set. */
37442
+ TraceFlags[TraceFlags["NONE"] = 0] = "NONE";
37443
+ /** Bit to represent whether trace is sampled in trace flags. */
37444
+ TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED";
37445
+ })(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
37446
+ //# sourceMappingURL=trace_flags.js.map
37447
+
37448
+ /***/ }),
37449
+
37450
+ /***/ 59390:
37451
+ /***/ ((__unused_webpack_module, exports) => {
37452
+
37453
+ "use strict";
37454
+
37455
+ /*
37456
+ * Copyright The OpenTelemetry Authors
37457
+ *
37458
+ * Licensed under the Apache License, Version 2.0 (the "License");
37459
+ * you may not use this file except in compliance with the License.
37460
+ * You may obtain a copy of the License at
37461
+ *
37462
+ * https://www.apache.org/licenses/LICENSE-2.0
37463
+ *
37464
+ * Unless required by applicable law or agreed to in writing, software
37465
+ * distributed under the License is distributed on an "AS IS" BASIS,
37466
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37467
+ * See the License for the specific language governing permissions and
37468
+ * limitations under the License.
37469
+ */
37470
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
37471
+ exports.VERSION = void 0;
37472
+ // this is autogenerated file, see scripts/version-update.js
37473
+ exports.VERSION = '1.9.0';
37474
+ //# sourceMappingURL=version.js.map
37475
+
34750
37476
  /***/ }),
34751
37477
 
34752
37478
  /***/ 95214:
@@ -38176,7 +40902,7 @@ function getBaseTelemetryAttributes({
38176
40902
  }
38177
40903
 
38178
40904
  // src/telemetry/get-tracer.ts
38179
- var import_api = __nccwpck_require__(2239);
40905
+ var import_api = __nccwpck_require__(63914);
38180
40906
 
38181
40907
  // src/telemetry/noop-tracer.ts
38182
40908
  var noopTracer = {
@@ -38251,7 +40977,7 @@ function getTracer({
38251
40977
  }
38252
40978
 
38253
40979
  // src/telemetry/record-span.ts
38254
- var import_api2 = __nccwpck_require__(2239);
40980
+ var import_api2 = __nccwpck_require__(63914);
38255
40981
  function recordSpan({
38256
40982
  name: name17,
38257
40983
  tracer,
@@ -129849,7 +132575,7 @@ async function markCheckAsFailed(checkService, owner, repo, checkRunId, checkNam
129849
132575
  // Allow forcing the entrypoint under Jest via VISOR_E2E_FORCE_RUN=true
129850
132576
  if (process.env.VISOR_E2E_FORCE_RUN === 'true' ||
129851
132577
  (process.env.NODE_ENV !== 'test' && process.env.JEST_WORKER_ID === undefined)) {
129852
- (() => {
132578
+ (async () => {
129853
132579
  // Explicit, argument-driven mode selection. No auto-detection of GitHub Actions.
129854
132580
  // Priority order: --mode flag > VISOR_MODE env > INPUT_MODE env > default 'cli'.
129855
132581
  const argv = process.argv;
@@ -129870,21 +132596,31 @@ if (process.env.VISOR_E2E_FORCE_RUN === 'true' ||
129870
132596
  .toLowerCase();
129871
132597
  const isGitHubMode = mode === 'github-actions' || mode === 'github';
129872
132598
  if (isGitHubMode) {
129873
- // Run in GitHub Action mode explicitly
129874
- run();
132599
+ // Run in GitHub Action mode explicitly and await completion to avoid early exit
132600
+ try {
132601
+ await run();
132602
+ }
132603
+ catch (error) {
132604
+ console.error('GitHub Action execution failed:', error);
132605
+ // Prefer failing the action explicitly if available
132606
+ try {
132607
+ const { setFailed } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(37484)));
132608
+ setFailed(error instanceof Error ? error.message : String(error));
132609
+ }
132610
+ catch { }
132611
+ process.exit(1);
132612
+ }
129875
132613
  }
129876
132614
  else {
129877
132615
  // Default to CLI mode
129878
- Promise.resolve().then(() => __importStar(__nccwpck_require__(10091))).then(({ main }) => {
129879
- main().catch(error => {
129880
- console.error('CLI execution failed:', error);
129881
- process.exit(1);
129882
- });
129883
- })
129884
- .catch(error => {
129885
- console.error('Failed to import CLI module:', error);
132616
+ try {
132617
+ const { main } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(10091)));
132618
+ await main();
132619
+ }
132620
+ catch (error) {
132621
+ console.error('CLI execution failed:', error);
129886
132622
  process.exit(1);
129887
- });
132623
+ }
129888
132624
  }
129889
132625
  })();
129890
132626
  }
@@ -141592,14 +144328,6 @@ module.exports = webpackEmptyContext;
141592
144328
 
141593
144329
  /***/ }),
141594
144330
 
141595
- /***/ 2239:
141596
- /***/ ((module) => {
141597
-
141598
- "use strict";
141599
- module.exports = require("@opentelemetry/api");
141600
-
141601
- /***/ }),
141602
-
141603
144331
  /***/ 42613:
141604
144332
  /***/ ((module) => {
141605
144333
 
@@ -268989,7 +271717,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"application/1d-interleaved-parityfec
268989
271717
  /***/ ((module) => {
268990
271718
 
268991
271719
  "use strict";
268992
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@probelabs/visor","version":"0.1.102","main":"dist/index.js","bin":{"visor":"./dist/index.js"},"exports":{".":{"require":"./dist/index.js","import":"./dist/index.js"},"./sdk":{"types":"./dist/sdk/sdk.d.ts","import":"./dist/sdk/sdk.mjs","require":"./dist/sdk/sdk.js"},"./cli":{"require":"./dist/index.js"}},"files":["dist/","defaults/","action.yml","README.md","LICENSE"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build:cli":"ncc build src/index.ts -o dist --external @opentelemetry/api --external @opentelemetry/core --external @opentelemetry/exporter-trace-otlp-grpc --external @opentelemetry/exporter-trace-otlp-http --external @opentelemetry/instrumentation --external @opentelemetry/resources --external @opentelemetry/sdk-metrics --external @opentelemetry/sdk-node --external @opentelemetry/sdk-trace-base --external @opentelemetry/semantic-conventions --external @opentelemetry/context-async-hooks --external @opentelemetry/exporter-metrics-otlp-http --external @opentelemetry/auto-instrumentations-node && cp -r defaults dist/ && cp -r output dist/ && cp -r src/debug-visualizer/ui dist/debug-visualizer/ && node scripts/inject-version.js && echo \'#!/usr/bin/env node\' | cat - dist/index.js > temp && mv temp dist/index.js && chmod +x dist/index.js","build:sdk":"tsup src/sdk.ts --dts --sourcemap --format esm,cjs --out-dir dist/sdk","build":"npm run build:cli && npm run build:sdk","test":"jest","prepublishOnly":"npm run build","test:watch":"jest --watch","test:coverage":"jest --coverage","lint":"eslint src tests --ext .ts","lint:fix":"eslint src tests --ext .ts --fix","format":"prettier --write src tests","format:check":"prettier --check src tests","clean":"","prebuild":"npm run clean && node scripts/generate-config-schema.js","pretest":"node scripts/generate-config-schema.js && npm run build:cli","prepare":"husky","pre-commit":"lint-staged","deploy:site":"cd site && npx wrangler pages deploy . --project-name=visor-site --commit-dirty=true","deploy:worker":"npx wrangler deploy","deploy":"npm run deploy:site && npm run deploy:worker","release":"./scripts/release.sh","release:patch":"./scripts/release.sh patch","release:minor":"./scripts/release.sh minor","release:major":"./scripts/release.sh major","release:prerelease":"./scripts/release.sh prerelease","docs:validate":"node scripts/validate-readme-links.js","workshop:setup":"npm install -D reveal-md@6.1.2","workshop:serve":"cd workshop && reveal-md slides.md -w","workshop:export":"reveal-md workshop/slides.md --static workshop/build","workshop:pdf":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter","workshop:pdf:ci":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter --puppeteer-launch-args=\\"--no-sandbox --disable-dev-shm-usage\\"","workshop:pdf:a4":"reveal-md workshop/slides.md --print workshop/Visor-Workshop-A4.pdf --print-size A4","workshop:build":"npm run workshop:export && npm run workshop:pdf"},"keywords":["code-review","ai","github-action","cli","pr-review","visor"],"author":"Probe Labs","license":"MIT","description":"AI-powered code review tool for GitHub Pull Requests - CLI and GitHub Action","repository":{"type":"git","url":"git+https://github.com/probelabs/visor.git"},"bugs":{"url":"https://github.com/probelabs/visor/issues"},"homepage":"https://github.com/probelabs/visor#readme","dependencies":{"@actions/core":"^1.11.1","@modelcontextprotocol/sdk":"^1.20.1","@nyariv/sandboxjs":"^0.8.25","@octokit/action":"^8.0.2","@octokit/auth-app":"^8.1.0","@octokit/core":"^7.0.3","@octokit/rest":"^22.0.0","@probelabs/probe":"^0.6.0-rc154","@types/commander":"^2.12.0","@types/uuid":"^10.0.0","ajv":"^8.17.1","ajv-formats":"^3.0.1","cli-table3":"^0.6.5","commander":"^14.0.0","dotenv":"^17.2.3","ignore":"^7.0.5","js-yaml":"^4.1.0","liquidjs":"^10.21.1","node-cron":"^3.0.3","open":"^9.1.0","simple-git":"^3.28.0","uuid":"^11.1.0","ws":"^8.18.3"},"optionalDependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-trace-otlp-grpc":"^0.203.0","@opentelemetry/exporter-trace-otlp-http":"^0.203.0","@opentelemetry/instrumentation":"^0.203.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-node":"^0.203.0","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/semantic-conventions":"^1.30.1"},"devDependencies":{"@eslint/js":"^9.34.0","@kie/act-js":"^2.6.2","@kie/mock-github":"^2.0.1","@types/jest":"^30.0.0","@types/js-yaml":"^4.0.9","@types/node":"^24.3.0","@types/node-cron":"^3.0.11","@types/ws":"^8.18.1","@typescript-eslint/eslint-plugin":"^8.42.0","@typescript-eslint/parser":"^8.42.0","@vercel/ncc":"^0.38.4","eslint":"^9.34.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","husky":"^9.1.7","jest":"^30.1.3","lint-staged":"^16.1.6","prettier":"^3.6.2","reveal-md":"^6.1.2","ts-jest":"^29.4.1","ts-json-schema-generator":"^1.5.1","ts-node":"^10.9.2","tsup":"^8.5.0","typescript":"^5.9.2","wrangler":"^3.0.0"},"peerDependencies":{"@anthropic/claude-code-sdk":"^1.0.0"},"peerDependenciesMeta":{"@anthropic/claude-code-sdk":{"optional":true}},"directories":{"test":"tests"},"lint-staged":{"src/**/*.{ts,js}":["eslint --fix","prettier --write"],"tests/**/*.{ts,js}":["eslint --fix","prettier --write"],"*.{json,md,yml,yaml}":["prettier --write"]}}');
271720
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@probelabs/visor","version":"0.1.103","main":"dist/index.js","bin":{"visor":"./dist/index.js"},"exports":{".":{"require":"./dist/index.js","import":"./dist/index.js"},"./sdk":{"types":"./dist/sdk/sdk.d.ts","import":"./dist/sdk/sdk.mjs","require":"./dist/sdk/sdk.js"},"./cli":{"require":"./dist/index.js"}},"files":["dist/","defaults/","action.yml","README.md","LICENSE"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build:cli":"ncc build src/index.ts -o dist && cp -r defaults dist/ && cp -r output dist/ && cp -r src/debug-visualizer/ui dist/debug-visualizer/ && node scripts/inject-version.js && echo \'#!/usr/bin/env node\' | cat - dist/index.js > temp && mv temp dist/index.js && chmod +x dist/index.js","build:sdk":"tsup src/sdk.ts --dts --sourcemap --format esm,cjs --out-dir dist/sdk","build":"npm run build:cli && npm run build:sdk","test":"jest","prepublishOnly":"npm run build","test:watch":"jest --watch","test:coverage":"jest --coverage","lint":"eslint src tests --ext .ts","lint:fix":"eslint src tests --ext .ts --fix","format":"prettier --write src tests","format:check":"prettier --check src tests","clean":"","prebuild":"npm run clean && node scripts/generate-config-schema.js","pretest":"node scripts/generate-config-schema.js && npm run build:cli","prepare":"husky","pre-commit":"lint-staged","deploy:site":"cd site && npx wrangler pages deploy . --project-name=visor-site --commit-dirty=true","deploy:worker":"npx wrangler deploy","deploy":"npm run deploy:site && npm run deploy:worker","release":"./scripts/release.sh","release:patch":"./scripts/release.sh patch","release:minor":"./scripts/release.sh minor","release:major":"./scripts/release.sh major","release:prerelease":"./scripts/release.sh prerelease","docs:validate":"node scripts/validate-readme-links.js","workshop:setup":"npm install -D reveal-md@6.1.2","workshop:serve":"cd workshop && reveal-md slides.md -w","workshop:export":"reveal-md workshop/slides.md --static workshop/build","workshop:pdf":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter","workshop:pdf:ci":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter --puppeteer-launch-args=\\"--no-sandbox --disable-dev-shm-usage\\"","workshop:pdf:a4":"reveal-md workshop/slides.md --print workshop/Visor-Workshop-A4.pdf --print-size A4","workshop:build":"npm run workshop:export && npm run workshop:pdf"},"keywords":["code-review","ai","github-action","cli","pr-review","visor"],"author":"Probe Labs","license":"MIT","description":"AI-powered code review tool for GitHub Pull Requests - CLI and GitHub Action","repository":{"type":"git","url":"git+https://github.com/probelabs/visor.git"},"bugs":{"url":"https://github.com/probelabs/visor/issues"},"homepage":"https://github.com/probelabs/visor#readme","dependencies":{"@actions/core":"^1.11.1","@modelcontextprotocol/sdk":"^1.20.1","@nyariv/sandboxjs":"^0.8.25","@octokit/action":"^8.0.2","@octokit/auth-app":"^8.1.0","@octokit/core":"^7.0.3","@octokit/rest":"^22.0.0","@probelabs/probe":"^0.6.0-rc154","@types/commander":"^2.12.0","@types/uuid":"^10.0.0","ajv":"^8.17.1","ajv-formats":"^3.0.1","cli-table3":"^0.6.5","commander":"^14.0.0","dotenv":"^17.2.3","ignore":"^7.0.5","js-yaml":"^4.1.0","liquidjs":"^10.21.1","node-cron":"^3.0.3","open":"^9.1.0","simple-git":"^3.28.0","uuid":"^11.1.0","ws":"^8.18.3"},"optionalDependencies":{"@opentelemetry/api":"^1.9.0","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-trace-otlp-grpc":"^0.203.0","@opentelemetry/exporter-trace-otlp-http":"^0.203.0","@opentelemetry/instrumentation":"^0.203.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-node":"^0.203.0","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/semantic-conventions":"^1.30.1"},"devDependencies":{"@eslint/js":"^9.34.0","@kie/act-js":"^2.6.2","@kie/mock-github":"^2.0.1","@types/jest":"^30.0.0","@types/js-yaml":"^4.0.9","@types/node":"^24.3.0","@types/node-cron":"^3.0.11","@types/ws":"^8.18.1","@typescript-eslint/eslint-plugin":"^8.42.0","@typescript-eslint/parser":"^8.42.0","@vercel/ncc":"^0.38.4","eslint":"^9.34.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","husky":"^9.1.7","jest":"^30.1.3","lint-staged":"^16.1.6","prettier":"^3.6.2","reveal-md":"^6.1.2","ts-jest":"^29.4.1","ts-json-schema-generator":"^1.5.1","ts-node":"^10.9.2","tsup":"^8.5.0","typescript":"^5.9.2","wrangler":"^3.0.0"},"peerDependencies":{"@anthropic/claude-code-sdk":"^1.0.0"},"peerDependenciesMeta":{"@anthropic/claude-code-sdk":{"optional":true}},"directories":{"test":"tests"},"lint-staged":{"src/**/*.{ts,js}":["eslint --fix","prettier --write"],"tests/**/*.{ts,js}":["eslint --fix","prettier --write"],"*.{json,md,yml,yaml}":["prettier --write"]}}');
268993
271721
 
268994
271722
  /***/ })
268995
271723