@azure/synapse-monitoring
Version:
A generated SDK for MonitoringClient.
1,305 lines (1,192 loc) • 96.9 kB
JavaScript
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var coreHttp = require('@azure/core-http');
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
}
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
function unwrapExports (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
var Logger = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(Logger);
var Time = createCommonjsModule(function (module, exports) {
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(Time);
var getter = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultGetter = void 0;
/**
* Default getter which just does a simple property access. Returns
* undefined if the key is not set.
*
* @param carrier
* @param key
*/
function defaultGetter(carrier, key) {
return carrier[key];
}
exports.defaultGetter = defaultGetter;
});
unwrapExports(getter);
var getter_1 = getter.defaultGetter;
var HttpTextPropagator = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(HttpTextPropagator);
var NoopHttpTextPropagator_1 = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.NOOP_HTTP_TEXT_PROPAGATOR = exports.NoopHttpTextPropagator = void 0;
/**
* No-op implementations of {@link HttpTextPropagator}.
*/
var NoopHttpTextPropagator = /** @class */ (function () {
function NoopHttpTextPropagator() {
}
/** Noop inject function does nothing */
NoopHttpTextPropagator.prototype.inject = function (context, carrier, setter) { };
/** Noop extract function does nothing and returns the input context */
NoopHttpTextPropagator.prototype.extract = function (context, carrier, getter) {
return context;
};
return NoopHttpTextPropagator;
}());
exports.NoopHttpTextPropagator = NoopHttpTextPropagator;
exports.NOOP_HTTP_TEXT_PROPAGATOR = new NoopHttpTextPropagator();
});
unwrapExports(NoopHttpTextPropagator_1);
var NoopHttpTextPropagator_2 = NoopHttpTextPropagator_1.NOOP_HTTP_TEXT_PROPAGATOR;
var NoopHttpTextPropagator_3 = NoopHttpTextPropagator_1.NoopHttpTextPropagator;
var setter = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultSetter = void 0;
/**
* Default setter which sets value via direct property access
*
* @param carrier
* @param key
*/
function defaultSetter(carrier, key, value) {
carrier[key] = value;
}
exports.defaultSetter = defaultSetter;
});
unwrapExports(setter);
var setter_1 = setter.defaultSetter;
var CorrelationContext = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(CorrelationContext);
var EntryValue = createCommonjsModule(function (module, exports) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.EntryTtl = void 0;
/**
* EntryTtl is an integer that represents number of hops an entry can propagate.
*
* For now, ONLY special values (0 and -1) are supported.
*/
var EntryTtl;
(function (EntryTtl) {
/**
* NO_PROPAGATION is considered to have local context and is used within the
* process it created.
*/
EntryTtl[EntryTtl["NO_PROPAGATION"] = 0] = "NO_PROPAGATION";
/** UNLIMITED_PROPAGATION can propagate unlimited hops. */
EntryTtl[EntryTtl["UNLIMITED_PROPAGATION"] = -1] = "UNLIMITED_PROPAGATION";
})(EntryTtl = exports.EntryTtl || (exports.EntryTtl = {}));
});
unwrapExports(EntryValue);
var EntryValue_1 = EntryValue.EntryTtl;
var BatchObserverResult = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(BatchObserverResult);
var BoundInstrument = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(BoundInstrument);
var Meter = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(Meter);
var MeterProvider = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(MeterProvider);
var Metric = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValueType = void 0;
/** The Type of value. It describes how the data is reported. */
var ValueType;
(function (ValueType) {
ValueType[ValueType["INT"] = 0] = "INT";
ValueType[ValueType["DOUBLE"] = 1] = "DOUBLE";
})(ValueType = exports.ValueType || (exports.ValueType = {}));
});
unwrapExports(Metric);
var Metric_1 = Metric.ValueType;
var NoopMeter_1 = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.NOOP_BATCH_OBSERVER_METRIC = exports.NOOP_SUM_OBSERVER_METRIC = exports.NOOP_UP_DOWN_SUM_OBSERVER_METRIC = exports.NOOP_VALUE_OBSERVER_METRIC = exports.NOOP_BOUND_BASE_OBSERVER = exports.NOOP_VALUE_RECORDER_METRIC = exports.NOOP_BOUND_VALUE_RECORDER = exports.NOOP_COUNTER_METRIC = exports.NOOP_BOUND_COUNTER = exports.NOOP_METER = exports.NoopBoundBaseObserver = exports.NoopBoundValueRecorder = exports.NoopBoundCounter = exports.NoopBatchObserverMetric = exports.NoopBaseObserverMetric = exports.NoopValueRecorderMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = void 0;
/**
* NoopMeter is a noop implementation of the {@link Meter} interface. It reuses
* constant NoopMetrics for all of its methods.
*/
var NoopMeter = /** @class */ (function () {
function NoopMeter() {
}
/**
* Returns constant noop value recorder.
* @param name the name of the metric.
* @param [options] the metric options.
*/
NoopMeter.prototype.createValueRecorder = function (name, options) {
return exports.NOOP_VALUE_RECORDER_METRIC;
};
/**
* Returns a constant noop counter.
* @param name the name of the metric.
* @param [options] the metric options.
*/
NoopMeter.prototype.createCounter = function (name, options) {
return exports.NOOP_COUNTER_METRIC;
};
/**
* Returns a constant noop UpDownCounter.
* @param name the name of the metric.
* @param [options] the metric options.
*/
NoopMeter.prototype.createUpDownCounter = function (name, options) {
return exports.NOOP_COUNTER_METRIC;
};
/**
* Returns constant noop value observer.
* @param name the name of the metric.
* @param [options] the metric options.
* @param [callback] the value observer callback
*/
NoopMeter.prototype.createValueObserver = function (name, options, callback) {
return exports.NOOP_VALUE_OBSERVER_METRIC;
};
/**
* Returns constant noop batch observer.
* @param name the name of the metric.
* @param callback the batch observer callback
*/
NoopMeter.prototype.createBatchObserver = function (name, callback) {
return exports.NOOP_BATCH_OBSERVER_METRIC;
};
return NoopMeter;
}());
exports.NoopMeter = NoopMeter;
var NoopMetric = /** @class */ (function () {
function NoopMetric(instrument) {
this._instrument = instrument;
}
/**
* Returns a Bound Instrument associated with specified Labels.
* It is recommended to keep a reference to the Bound Instrument instead of
* always calling this method for every operations.
* @param labels key-values pairs that are associated with a specific metric
* that you want to record.
*/
NoopMetric.prototype.bind = function (labels) {
return this._instrument;
};
/**
* Removes the Binding from the metric, if it is present.
* @param labels key-values pairs that are associated with a specific metric.
*/
NoopMetric.prototype.unbind = function (labels) {
return;
};
/**
* Clears all timeseries from the Metric.
*/
NoopMetric.prototype.clear = function () {
return;
};
return NoopMetric;
}());
exports.NoopMetric = NoopMetric;
var NoopCounterMetric = /** @class */ (function (_super) {
__extends(NoopCounterMetric, _super);
function NoopCounterMetric() {
return _super !== null && _super.apply(this, arguments) || this;
}
NoopCounterMetric.prototype.add = function (value, labels) {
this.bind(labels).add(value);
};
return NoopCounterMetric;
}(NoopMetric));
exports.NoopCounterMetric = NoopCounterMetric;
var NoopValueRecorderMetric = /** @class */ (function (_super) {
__extends(NoopValueRecorderMetric, _super);
function NoopValueRecorderMetric() {
return _super !== null && _super.apply(this, arguments) || this;
}
NoopValueRecorderMetric.prototype.record = function (value, labels, correlationContext, spanContext) {
if (typeof correlationContext === 'undefined') {
this.bind(labels).record(value);
}
else if (typeof spanContext === 'undefined') {
this.bind(labels).record(value, correlationContext);
}
else {
this.bind(labels).record(value, correlationContext, spanContext);
}
};
return NoopValueRecorderMetric;
}(NoopMetric));
exports.NoopValueRecorderMetric = NoopValueRecorderMetric;
var NoopBaseObserverMetric = /** @class */ (function (_super) {
__extends(NoopBaseObserverMetric, _super);
function NoopBaseObserverMetric() {
return _super !== null && _super.apply(this, arguments) || this;
}
NoopBaseObserverMetric.prototype.observation = function () {
return {
observer: this,
value: 0,
};
};
return NoopBaseObserverMetric;
}(NoopMetric));
exports.NoopBaseObserverMetric = NoopBaseObserverMetric;
var NoopBatchObserverMetric = /** @class */ (function (_super) {
__extends(NoopBatchObserverMetric, _super);
function NoopBatchObserverMetric() {
return _super !== null && _super.apply(this, arguments) || this;
}
return NoopBatchObserverMetric;
}(NoopMetric));
exports.NoopBatchObserverMetric = NoopBatchObserverMetric;
var NoopBoundCounter = /** @class */ (function () {
function NoopBoundCounter() {
}
NoopBoundCounter.prototype.add = function (value) {
return;
};
return NoopBoundCounter;
}());
exports.NoopBoundCounter = NoopBoundCounter;
var NoopBoundValueRecorder = /** @class */ (function () {
function NoopBoundValueRecorder() {
}
NoopBoundValueRecorder.prototype.record = function (value, correlationContext, spanContext) {
return;
};
return NoopBoundValueRecorder;
}());
exports.NoopBoundValueRecorder = NoopBoundValueRecorder;
var NoopBoundBaseObserver = /** @class */ (function () {
function NoopBoundBaseObserver() {
}
NoopBoundBaseObserver.prototype.update = function (value) { };
return NoopBoundBaseObserver;
}());
exports.NoopBoundBaseObserver = NoopBoundBaseObserver;
exports.NOOP_METER = new NoopMeter();
exports.NOOP_BOUND_COUNTER = new NoopBoundCounter();
exports.NOOP_COUNTER_METRIC = new NoopCounterMetric(exports.NOOP_BOUND_COUNTER);
exports.NOOP_BOUND_VALUE_RECORDER = new NoopBoundValueRecorder();
exports.NOOP_VALUE_RECORDER_METRIC = new NoopValueRecorderMetric(exports.NOOP_BOUND_VALUE_RECORDER);
exports.NOOP_BOUND_BASE_OBSERVER = new NoopBoundBaseObserver();
exports.NOOP_VALUE_OBSERVER_METRIC = new NoopBaseObserverMetric(exports.NOOP_BOUND_BASE_OBSERVER);
exports.NOOP_UP_DOWN_SUM_OBSERVER_METRIC = new NoopBaseObserverMetric(exports.NOOP_BOUND_BASE_OBSERVER);
exports.NOOP_SUM_OBSERVER_METRIC = new NoopBaseObserverMetric(exports.NOOP_BOUND_BASE_OBSERVER);
exports.NOOP_BATCH_OBSERVER_METRIC = new NoopBatchObserverMetric();
});
unwrapExports(NoopMeter_1);
var NoopMeter_2 = NoopMeter_1.NOOP_BATCH_OBSERVER_METRIC;
var NoopMeter_3 = NoopMeter_1.NOOP_SUM_OBSERVER_METRIC;
var NoopMeter_4 = NoopMeter_1.NOOP_UP_DOWN_SUM_OBSERVER_METRIC;
var NoopMeter_5 = NoopMeter_1.NOOP_VALUE_OBSERVER_METRIC;
var NoopMeter_6 = NoopMeter_1.NOOP_BOUND_BASE_OBSERVER;
var NoopMeter_7 = NoopMeter_1.NOOP_VALUE_RECORDER_METRIC;
var NoopMeter_8 = NoopMeter_1.NOOP_BOUND_VALUE_RECORDER;
var NoopMeter_9 = NoopMeter_1.NOOP_COUNTER_METRIC;
var NoopMeter_10 = NoopMeter_1.NOOP_BOUND_COUNTER;
var NoopMeter_11 = NoopMeter_1.NOOP_METER;
var NoopMeter_12 = NoopMeter_1.NoopBoundBaseObserver;
var NoopMeter_13 = NoopMeter_1.NoopBoundValueRecorder;
var NoopMeter_14 = NoopMeter_1.NoopBoundCounter;
var NoopMeter_15 = NoopMeter_1.NoopBatchObserverMetric;
var NoopMeter_16 = NoopMeter_1.NoopBaseObserverMetric;
var NoopMeter_17 = NoopMeter_1.NoopValueRecorderMetric;
var NoopMeter_18 = NoopMeter_1.NoopCounterMetric;
var NoopMeter_19 = NoopMeter_1.NoopMetric;
var NoopMeter_20 = NoopMeter_1.NoopMeter;
var NoopMeterProvider_1 = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = void 0;
/**
* An implementation of the {@link MeterProvider} which returns an impotent Meter
* for all calls to `getMeter`
*/
var NoopMeterProvider = /** @class */ (function () {
function NoopMeterProvider() {
}
NoopMeterProvider.prototype.getMeter = function (_name, _version) {
return NoopMeter_1.NOOP_METER;
};
return NoopMeterProvider;
}());
exports.NoopMeterProvider = NoopMeterProvider;
exports.NOOP_METER_PROVIDER = new NoopMeterProvider();
});
unwrapExports(NoopMeterProvider_1);
var NoopMeterProvider_2 = NoopMeterProvider_1.NOOP_METER_PROVIDER;
var NoopMeterProvider_3 = NoopMeterProvider_1.NoopMeterProvider;
var Observation = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(Observation);
var ObserverResult = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(ObserverResult);
var attributes = createCommonjsModule(function (module, exports) {
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(attributes);
var Event = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(Event);
var Plugin = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(Plugin);
var link_context = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(link_context);
var link = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(link);
var trace_flags = createCommonjsModule(function (module, exports) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.TraceFlags = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var TraceFlags;
(function (TraceFlags) {
/** Represents no flag set. */
TraceFlags[TraceFlags["NONE"] = 0] = "NONE";
/** Bit to represent whether trace is sampled in trace flags. */
TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED";
})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
});
unwrapExports(trace_flags);
var trace_flags_1 = trace_flags.TraceFlags;
var NoopSpan_1 = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.NOOP_SPAN = exports.NoopSpan = exports.INVALID_SPAN_ID = exports.INVALID_TRACE_ID = void 0;
exports.INVALID_TRACE_ID = '0';
exports.INVALID_SPAN_ID = '0';
var INVALID_SPAN_CONTEXT = {
traceId: exports.INVALID_TRACE_ID,
spanId: exports.INVALID_SPAN_ID,
traceFlags: trace_flags.TraceFlags.NONE,
};
/**
* The NoopSpan is the default {@link Span} that is used when no Span
* implementation is available. All operations are no-op including context
* propagation.
*/
var NoopSpan = /** @class */ (function () {
function NoopSpan(_spanContext) {
if (_spanContext === void 0) { _spanContext = INVALID_SPAN_CONTEXT; }
this._spanContext = _spanContext;
}
// Returns a SpanContext.
NoopSpan.prototype.context = function () {
return this._spanContext;
};
// By default does nothing
NoopSpan.prototype.setAttribute = function (key, value) {
return this;
};
// By default does nothing
NoopSpan.prototype.setAttributes = function (attributes) {
return this;
};
// By default does nothing
NoopSpan.prototype.addEvent = function (name, attributes) {
return this;
};
// By default does nothing
NoopSpan.prototype.setStatus = function (status) {
return this;
};
// By default does nothing
NoopSpan.prototype.updateName = function (name) {
return this;
};
// By default does nothing
NoopSpan.prototype.end = function (endTime) { };
// isRecording always returns false for noopSpan.
NoopSpan.prototype.isRecording = function () {
return false;
};
return NoopSpan;
}());
exports.NoopSpan = NoopSpan;
exports.NOOP_SPAN = new NoopSpan();
});
unwrapExports(NoopSpan_1);
var NoopSpan_2 = NoopSpan_1.NOOP_SPAN;
var NoopSpan_3 = NoopSpan_1.NoopSpan;
var NoopSpan_4 = NoopSpan_1.INVALID_SPAN_ID;
var NoopSpan_5 = NoopSpan_1.INVALID_TRACE_ID;
var NoopTracer_1 = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.NOOP_TRACER = exports.NoopTracer = void 0;
/**
* No-op implementations of {@link Tracer}.
*/
var NoopTracer = /** @class */ (function () {
function NoopTracer() {
}
NoopTracer.prototype.getCurrentSpan = function () {
return NoopSpan_1.NOOP_SPAN;
};
// startSpan starts a noop span.
NoopTracer.prototype.startSpan = function (name, options) {
return NoopSpan_1.NOOP_SPAN;
};
NoopTracer.prototype.withSpan = function (span, fn) {
return fn();
};
NoopTracer.prototype.bind = function (target, span) {
return target;
};
return NoopTracer;
}());
exports.NoopTracer = NoopTracer;
exports.NOOP_TRACER = new NoopTracer();
});
unwrapExports(NoopTracer_1);
var NoopTracer_2 = NoopTracer_1.NOOP_TRACER;
var NoopTracer_3 = NoopTracer_1.NoopTracer;
var NoopTracerProvider_1 = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.NOOP_TRACER_PROVIDER = exports.NoopTracerProvider = void 0;
/**
* An implementation of the {@link TracerProvider} which returns an impotent
* Tracer for all calls to `getTracer`.
*
* All operations are no-op.
*/
var NoopTracerProvider = /** @class */ (function () {
function NoopTracerProvider() {
}
NoopTracerProvider.prototype.getTracer = function (_name, _version) {
return NoopTracer_1.NOOP_TRACER;
};
return NoopTracerProvider;
}());
exports.NoopTracerProvider = NoopTracerProvider;
exports.NOOP_TRACER_PROVIDER = new NoopTracerProvider();
});
unwrapExports(NoopTracerProvider_1);
var NoopTracerProvider_2 = NoopTracerProvider_1.NOOP_TRACER_PROVIDER;
var NoopTracerProvider_3 = NoopTracerProvider_1.NoopTracerProvider;
var Sampler = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(Sampler);
var SamplingResult = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.SamplingDecision = void 0;
/**
* A sampling decision that determines how a {@link Span} will be recorded
* and collected.
*/
var SamplingDecision;
(function (SamplingDecision) {
/**
* `Span.isRecording() === false`, span will not be recorded and all events
* and attributes will be dropped.
*/
SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD";
/**
* `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}
* MUST NOT be set.
*/
SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD";
/**
* `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}
* MUST be set.
*/
SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
});
unwrapExports(SamplingResult);
var SamplingResult_1 = SamplingResult.SamplingDecision;
var span_context = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(span_context);
var span_kind = createCommonjsModule(function (module, exports) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpanKind = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var SpanKind;
(function (SpanKind) {
/** Default value. Indicates that the span is used internally. */
SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL";
/**
* Indicates that the span covers server-side handling of an RPC or other
* remote request.
*/
SpanKind[SpanKind["SERVER"] = 1] = "SERVER";
/**
* Indicates that the span covers the client-side wrapper around an RPC or
* other remote request.
*/
SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT";
/**
* Indicates that the span describes producer sending a message to a
* broker. Unlike client and server, there is no direct critical path latency
* relationship between producer and consumer spans.
*/
SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER";
/**
* Indicates that the span describes consumer receiving a message from a
* broker. Unlike client and server, there is no direct critical path latency
* relationship between producer and consumer spans.
*/
SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER";
})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
});
unwrapExports(span_kind);
var span_kind_1 = span_kind.SpanKind;
var span = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(span);
var SpanOptions = createCommonjsModule(function (module, exports) {
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
});
unwrapExports(SpanOptions);
var status = createCommonjsModule(function (module, exports) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.CanonicalCode = void 0;
/**
* An enumeration of canonical status codes.
*/
var CanonicalCode;
(function (CanonicalCode) {
/**
* Not an error; returned on success
*/
CanonicalCode[CanonicalCode["OK"] = 0] = "OK";
/**
* The operation was cancelled (typically by the caller).
*/
CanonicalCode[CanonicalCode["CANCELLED"] = 1] = "CANCELLED";
/**
* Unknown error. An example of where this error may be returned is
* if a status value received from another address space belongs to
* an error-space that is not known in this address space. Also
* errors raised by APIs that do not return enough error information
* may be converted to this error.
*/
CanonicalCode[CanonicalCode["UNKNOWN"] = 2] = "UNKNOWN";
/**
* Client specified an invalid argument. Note that this differs
* from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments
* that are problematic regardless of the state of the system
* (e.g., a malformed file name).
*/
CanonicalCode[CanonicalCode["INVALID_ARGUMENT"] = 3] = "INVALID_ARGUMENT";
/**
* Deadline expired before operation could complete. For operations
* that change the state of the system, this error may be returned
* even if the operation has completed successfully. For example, a
* successful response from a server could have been delayed long
* enough for the deadline to expire.
*/
CanonicalCode[CanonicalCode["DEADLINE_EXCEEDED"] = 4] = "DEADLINE_EXCEEDED";
/**
* Some requested entity (e.g., file or directory) was not found.
*/
CanonicalCode[CanonicalCode["NOT_FOUND"] = 5] = "NOT_FOUND";
/**
* Some entity that we attempted to create (e.g., file or directory)
* already exists.
*/
CanonicalCode[CanonicalCode["ALREADY_EXISTS"] = 6] = "ALREADY_EXISTS";
/**
* The caller does not have permission to execute the specified
* operation. PERMISSION_DENIED must not be used for rejections
* caused by exhausting some resource (use RESOURCE_EXHAUSTED
* instead for those errors). PERMISSION_DENIED must not be
* used if the caller can not be identified (use UNAUTHENTICATED
* instead for those errors).
*/
CanonicalCode[CanonicalCode["PERMISSION_DENIED"] = 7] = "PERMISSION_DENIED";
/**
* Some resource has been exhausted, perhaps a per-user quota, or
* perhaps the entire file system is out of space.
*/
CanonicalCode[CanonicalCode["RESOURCE_EXHAUSTED"] = 8] = "RESOURCE_EXHAUSTED";
/**
* Operation was rejected because the system is not in a state
* required for the operation's execution. For example, directory
* to be deleted may be non-empty, an rmdir operation is applied to
* a non-directory, etc.
*
* A litmus test that may help a service implementor in deciding
* between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
*
* - Use UNAVAILABLE if the client can retry just the failing call.
* - Use ABORTED if the client should retry at a higher-level
* (e.g., restarting a read-modify-write sequence).
* - Use FAILED_PRECONDITION if the client should not retry until
* the system state has been explicitly fixed. E.g., if an "rmdir"
* fails because the directory is non-empty, FAILED_PRECONDITION
* should be returned since the client should not retry unless
* they have first fixed up the directory by deleting files from it.
* - Use FAILED_PRECONDITION if the client performs conditional
* REST Get/Update/Delete on a resource and the resource on the
* server does not match the condition. E.g., conflicting
* read-modify-write on the same resource.
*/
CanonicalCode[CanonicalCode["FAILED_PRECONDITION"] = 9] = "FAILED_PRECONDITION";
/**
* The operation was aborted, typically due to a concurrency issue
* like sequencer check failures, transaction aborts, etc.
*
* See litmus test above for deciding between FAILED_PRECONDITION,
* ABORTED, and UNAVAILABLE.
*/
CanonicalCode[CanonicalCode["ABORTED"] = 10] = "ABORTED";
/**
* Operation was attempted past the valid range. E.g., seeking or
* reading past end of file.
*
* Unlike INVALID_ARGUMENT, this error indicates a problem that may
* be fixed if the system state changes. For example, a 32-bit file
* system will generate INVAL