@opentelemetry/api 0.10.1 → 0.10.2
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/build/src/api/context.js +23 -20
- package/build/src/api/context.js.map +1 -1
- package/build/src/api/global-utils.js +4 -2
- package/build/src/api/global-utils.js.map +1 -1
- package/build/src/api/metrics.js +17 -15
- package/build/src/api/metrics.js.map +1 -1
- package/build/src/api/propagation.js +27 -21
- package/build/src/api/propagation.js.map +1 -1
- package/build/src/api/trace.js +17 -15
- package/build/src/api/trace.js.map +1 -1
- package/build/src/context/propagation/NoopHttpTextPropagator.js +8 -5
- package/build/src/context/propagation/NoopHttpTextPropagator.js.map +1 -1
- package/build/src/index.js +4 -4
- package/build/src/index.js.map +1 -1
- package/build/src/metrics/NoopMeter.js +92 -47
- package/build/src/metrics/NoopMeter.js.map +1 -1
- package/build/src/metrics/NoopMeterProvider.js +8 -5
- package/build/src/metrics/NoopMeterProvider.js.map +1 -1
- package/build/src/trace/NoopSpan.js +22 -20
- package/build/src/trace/NoopSpan.js.map +1 -1
- package/build/src/trace/NoopTracer.js +14 -11
- package/build/src/trace/NoopTracer.js.map +1 -1
- package/build/src/trace/NoopTracerProvider.js +8 -5
- package/build/src/trace/NoopTracerProvider.js.map +1 -1
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +1 -1
- package/package.json +6 -6
package/build/src/api/context.js
CHANGED
|
@@ -16,66 +16,69 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.ContextAPI = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
var context_base_1 = require("@opentelemetry/context-base");
|
|
20
|
+
var global_utils_1 = require("./global-utils");
|
|
21
|
+
var NOOP_CONTEXT_MANAGER = new context_base_1.NoopContextManager();
|
|
22
22
|
/**
|
|
23
23
|
* Singleton object which represents the entry point to the OpenTelemetry Context API
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
var ContextAPI = /** @class */ (function () {
|
|
26
26
|
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
27
|
-
|
|
27
|
+
function ContextAPI() {
|
|
28
|
+
}
|
|
28
29
|
/** Get the singleton instance of the Context API */
|
|
29
|
-
|
|
30
|
+
ContextAPI.getInstance = function () {
|
|
30
31
|
if (!this._instance) {
|
|
31
32
|
this._instance = new ContextAPI();
|
|
32
33
|
}
|
|
33
34
|
return this._instance;
|
|
34
|
-
}
|
|
35
|
+
};
|
|
35
36
|
/**
|
|
36
37
|
* Set the current context manager. Returns the initialized context manager
|
|
37
38
|
*/
|
|
38
|
-
setGlobalContextManager(contextManager) {
|
|
39
|
+
ContextAPI.prototype.setGlobalContextManager = function (contextManager) {
|
|
39
40
|
if (global_utils_1._global[global_utils_1.GLOBAL_CONTEXT_MANAGER_API_KEY]) {
|
|
40
41
|
// global context manager has already been set
|
|
41
42
|
return this._getContextManager();
|
|
42
43
|
}
|
|
43
44
|
global_utils_1._global[global_utils_1.GLOBAL_CONTEXT_MANAGER_API_KEY] = global_utils_1.makeGetter(global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION, contextManager, NOOP_CONTEXT_MANAGER);
|
|
44
45
|
return contextManager;
|
|
45
|
-
}
|
|
46
|
+
};
|
|
46
47
|
/**
|
|
47
48
|
* Get the currently active context
|
|
48
49
|
*/
|
|
49
|
-
active() {
|
|
50
|
+
ContextAPI.prototype.active = function () {
|
|
50
51
|
return this._getContextManager().active();
|
|
51
|
-
}
|
|
52
|
+
};
|
|
52
53
|
/**
|
|
53
54
|
* Execute a function with an active context
|
|
54
55
|
*
|
|
55
56
|
* @param context context to be active during function execution
|
|
56
57
|
* @param fn function to execute in a context
|
|
57
58
|
*/
|
|
58
|
-
with(context, fn) {
|
|
59
|
+
ContextAPI.prototype.with = function (context, fn) {
|
|
59
60
|
return this._getContextManager().with(context, fn);
|
|
60
|
-
}
|
|
61
|
+
};
|
|
61
62
|
/**
|
|
62
63
|
* Bind a context to a target function or event emitter
|
|
63
64
|
*
|
|
64
65
|
* @param target function or event emitter to bind
|
|
65
66
|
* @param context context to bind to the event emitter or function. Defaults to the currently active context
|
|
66
67
|
*/
|
|
67
|
-
bind(target, context
|
|
68
|
+
ContextAPI.prototype.bind = function (target, context) {
|
|
69
|
+
if (context === void 0) { context = this.active(); }
|
|
68
70
|
return this._getContextManager().bind(target, context);
|
|
69
|
-
}
|
|
70
|
-
_getContextManager() {
|
|
71
|
+
};
|
|
72
|
+
ContextAPI.prototype._getContextManager = function () {
|
|
71
73
|
var _a, _b;
|
|
72
74
|
return ((_b = (_a = global_utils_1._global[global_utils_1.GLOBAL_CONTEXT_MANAGER_API_KEY]) === null || _a === void 0 ? void 0 : _a.call(global_utils_1._global, global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION)) !== null && _b !== void 0 ? _b : NOOP_CONTEXT_MANAGER);
|
|
73
|
-
}
|
|
75
|
+
};
|
|
74
76
|
/** Disable and remove the global context manager */
|
|
75
|
-
disable() {
|
|
77
|
+
ContextAPI.prototype.disable = function () {
|
|
76
78
|
this._getContextManager().disable();
|
|
77
79
|
delete global_utils_1._global[global_utils_1.GLOBAL_CONTEXT_MANAGER_API_KEY];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
+
};
|
|
81
|
+
return ContextAPI;
|
|
82
|
+
}());
|
|
80
83
|
exports.ContextAPI = ContextAPI;
|
|
81
84
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/api/context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/api/context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAIqC;AACrC,+CAKwB;AAExB,IAAM,oBAAoB,GAAG,IAAI,iCAAkB,EAAE,CAAC;AAEtD;;GAEG;AACH;IAGE,+FAA+F;IAC/F;IAAuB,CAAC;IAExB,oDAAoD;IACtC,sBAAW,GAAzB;QACE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,IAAI,UAAU,EAAE,CAAC;SACnC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,4CAAuB,GAA9B,UACE,cAA8B;QAE9B,IAAI,sBAAO,CAAC,6CAA8B,CAAC,EAAE;YAC3C,8CAA8C;YAC9C,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC;SAClC;QAED,sBAAO,CAAC,6CAA8B,CAAC,GAAG,yBAAU,CAClD,kDAAmC,EACnC,cAAc,EACd,oBAAoB,CACrB,CAAC;QAEF,OAAO,cAAc,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,2BAAM,GAAb;QACE,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,MAAM,EAAE,CAAC;IAC5C,CAAC;IAED;;;;;OAKG;IACI,yBAAI,GAAX,UACE,OAAgB,EAChB,EAAK;QAEL,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACrD,CAAC;IAED;;;;;OAKG;IACI,yBAAI,GAAX,UAAe,MAAS,EAAE,OAAgC;QAAhC,wBAAA,EAAA,UAAmB,IAAI,CAAC,MAAM,EAAE;QACxD,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAEO,uCAAkB,GAA1B;;QACE,OAAO,aACL,sBAAO,CAAC,6CAA8B,CAAC,+CAAvC,sBAAO,EACL,kDAAmC,oCAChC,oBAAoB,CAC1B,CAAC;IACJ,CAAC;IAED,oDAAoD;IAC7C,4BAAO,GAAd;QACE,IAAI,CAAC,kBAAkB,EAAE,CAAC,OAAO,EAAE,CAAC;QACpC,OAAO,sBAAO,CAAC,6CAA8B,CAAC,CAAC;IACjD,CAAC;IACH,iBAAC;AAAD,CAAC,AA9ED,IA8EC;AA9EY,gCAAU"}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.API_BACKWARDS_COMPATIBILITY_VERSION = exports.makeGetter = exports._global = exports.GLOBAL_TRACE_API_KEY = exports.GLOBAL_PROPAGATION_API_KEY = exports.GLOBAL_METRICS_API_KEY = exports.GLOBAL_CONTEXT_MANAGER_API_KEY = void 0;
|
|
19
|
-
|
|
19
|
+
var platform_1 = require("../platform");
|
|
20
20
|
exports.GLOBAL_CONTEXT_MANAGER_API_KEY = Symbol.for('io.opentelemetry.js.api.context');
|
|
21
21
|
exports.GLOBAL_METRICS_API_KEY = Symbol.for('io.opentelemetry.js.api.metrics');
|
|
22
22
|
exports.GLOBAL_PROPAGATION_API_KEY = Symbol.for('io.opentelemetry.js.api.propagation');
|
|
@@ -31,7 +31,9 @@ exports._global = platform_1._globalThis;
|
|
|
31
31
|
* @param fallback Fallback instance, usually NOOP, which will be returned if the required version is not compatible
|
|
32
32
|
*/
|
|
33
33
|
function makeGetter(requiredVersion, instance, fallback) {
|
|
34
|
-
return (version)
|
|
34
|
+
return function (version) {
|
|
35
|
+
return version === requiredVersion ? instance : fallback;
|
|
36
|
+
};
|
|
35
37
|
}
|
|
36
38
|
exports.makeGetter = makeGetter;
|
|
37
39
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-utils.js","sourceRoot":"","sources":["../../../src/api/global-utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAMH,
|
|
1
|
+
{"version":3,"file":"global-utils.js","sourceRoot":"","sources":["../../../src/api/global-utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAMH,wCAA0C;AAE7B,QAAA,8BAA8B,GAAG,MAAM,CAAC,GAAG,CACtD,iCAAiC,CAClC,CAAC;AACW,QAAA,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAC9C,iCAAiC,CAClC,CAAC;AACW,QAAA,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAClD,qCAAqC,CACtC,CAAC;AACW,QAAA,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;AAUnE,QAAA,OAAO,GAAG,sBAAyB,CAAC;AAEjD;;;;;;;GAOG;AACH,SAAgB,UAAU,CACxB,eAAuB,EACvB,QAAW,EACX,QAAW;IAEX,OAAO,UAAC,OAAe;QACrB,OAAA,OAAO,KAAK,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;IAAjD,CAAiD,CAAC;AACtD,CAAC;AAPD,gCAOC;AAED;;;;;;GAMG;AACU,QAAA,mCAAmC,GAAG,CAAC,CAAC"}
|
package/build/src/api/metrics.js
CHANGED
|
@@ -16,49 +16,51 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.MetricsAPI = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
var NoopMeterProvider_1 = require("../metrics/NoopMeterProvider");
|
|
20
|
+
var global_utils_1 = require("./global-utils");
|
|
21
21
|
/**
|
|
22
22
|
* Singleton object which represents the entry point to the OpenTelemetry Metrics API
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
var MetricsAPI = /** @class */ (function () {
|
|
25
25
|
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
26
|
-
|
|
26
|
+
function MetricsAPI() {
|
|
27
|
+
}
|
|
27
28
|
/** Get the singleton instance of the Metrics API */
|
|
28
|
-
|
|
29
|
+
MetricsAPI.getInstance = function () {
|
|
29
30
|
if (!this._instance) {
|
|
30
31
|
this._instance = new MetricsAPI();
|
|
31
32
|
}
|
|
32
33
|
return this._instance;
|
|
33
|
-
}
|
|
34
|
+
};
|
|
34
35
|
/**
|
|
35
36
|
* Set the current global meter. Returns the initialized global meter provider.
|
|
36
37
|
*/
|
|
37
|
-
setGlobalMeterProvider(provider) {
|
|
38
|
+
MetricsAPI.prototype.setGlobalMeterProvider = function (provider) {
|
|
38
39
|
if (global_utils_1._global[global_utils_1.GLOBAL_METRICS_API_KEY]) {
|
|
39
40
|
// global meter provider has already been set
|
|
40
41
|
return this.getMeterProvider();
|
|
41
42
|
}
|
|
42
43
|
global_utils_1._global[global_utils_1.GLOBAL_METRICS_API_KEY] = global_utils_1.makeGetter(global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION, provider, NoopMeterProvider_1.NOOP_METER_PROVIDER);
|
|
43
44
|
return provider;
|
|
44
|
-
}
|
|
45
|
+
};
|
|
45
46
|
/**
|
|
46
47
|
* Returns the global meter provider.
|
|
47
48
|
*/
|
|
48
|
-
getMeterProvider() {
|
|
49
|
+
MetricsAPI.prototype.getMeterProvider = function () {
|
|
49
50
|
var _a, _b;
|
|
50
51
|
return ((_b = (_a = global_utils_1._global[global_utils_1.GLOBAL_METRICS_API_KEY]) === null || _a === void 0 ? void 0 : _a.call(global_utils_1._global, global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION)) !== null && _b !== void 0 ? _b : NoopMeterProvider_1.NOOP_METER_PROVIDER);
|
|
51
|
-
}
|
|
52
|
+
};
|
|
52
53
|
/**
|
|
53
54
|
* Returns a meter from the global meter provider.
|
|
54
55
|
*/
|
|
55
|
-
getMeter(name, version) {
|
|
56
|
+
MetricsAPI.prototype.getMeter = function (name, version) {
|
|
56
57
|
return this.getMeterProvider().getMeter(name, version);
|
|
57
|
-
}
|
|
58
|
+
};
|
|
58
59
|
/** Remove the global meter provider */
|
|
59
|
-
disable() {
|
|
60
|
+
MetricsAPI.prototype.disable = function () {
|
|
60
61
|
delete global_utils_1._global[global_utils_1.GLOBAL_METRICS_API_KEY];
|
|
61
|
-
}
|
|
62
|
-
|
|
62
|
+
};
|
|
63
|
+
return MetricsAPI;
|
|
64
|
+
}());
|
|
63
65
|
exports.MetricsAPI = MetricsAPI;
|
|
64
66
|
//# sourceMappingURL=metrics.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../src/api/metrics.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,
|
|
1
|
+
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../src/api/metrics.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,kEAAmE;AACnE,+CAKwB;AAExB;;GAEG;AACH;IAGE,+FAA+F;IAC/F;IAAuB,CAAC;IAExB,oDAAoD;IACtC,sBAAW,GAAzB;QACE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,IAAI,UAAU,EAAE,CAAC;SACnC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,2CAAsB,GAA7B,UAA8B,QAAuB;QACnD,IAAI,sBAAO,CAAC,qCAAsB,CAAC,EAAE;YACnC,6CAA6C;YAC7C,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC;SAChC;QAED,sBAAO,CAAC,qCAAsB,CAAC,GAAG,yBAAU,CAC1C,kDAAmC,EACnC,QAAQ,EACR,uCAAmB,CACpB,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;OAEG;IACI,qCAAgB,GAAvB;;QACE,OAAO,aACL,sBAAO,CAAC,qCAAsB,CAAC,+CAA/B,sBAAO,EAA2B,kDAAmC,oCACrE,uCAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,6BAAQ,GAAf,UAAgB,IAAY,EAAE,OAAgB;QAC5C,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED,uCAAuC;IAChC,4BAAO,GAAd;QACE,OAAO,sBAAO,CAAC,qCAAsB,CAAC,CAAC;IACzC,CAAC;IACH,iBAAC;AAAD,CAAC,AAtDD,IAsDC;AAtDY,gCAAU"}
|
|
@@ -16,36 +16,37 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.PropagationAPI = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
var getter_1 = require("../context/propagation/getter");
|
|
20
|
+
var NoopHttpTextPropagator_1 = require("../context/propagation/NoopHttpTextPropagator");
|
|
21
|
+
var setter_1 = require("../context/propagation/setter");
|
|
22
|
+
var context_1 = require("./context");
|
|
23
|
+
var global_utils_1 = require("./global-utils");
|
|
24
|
+
var contextApi = context_1.ContextAPI.getInstance();
|
|
25
25
|
/**
|
|
26
26
|
* Singleton object which represents the entry point to the OpenTelemetry Propagation API
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
var PropagationAPI = /** @class */ (function () {
|
|
29
29
|
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
30
|
-
|
|
30
|
+
function PropagationAPI() {
|
|
31
|
+
}
|
|
31
32
|
/** Get the singleton instance of the Propagator API */
|
|
32
|
-
|
|
33
|
+
PropagationAPI.getInstance = function () {
|
|
33
34
|
if (!this._instance) {
|
|
34
35
|
this._instance = new PropagationAPI();
|
|
35
36
|
}
|
|
36
37
|
return this._instance;
|
|
37
|
-
}
|
|
38
|
+
};
|
|
38
39
|
/**
|
|
39
40
|
* Set the current propagator. Returns the initialized propagator
|
|
40
41
|
*/
|
|
41
|
-
setGlobalPropagator(propagator) {
|
|
42
|
+
PropagationAPI.prototype.setGlobalPropagator = function (propagator) {
|
|
42
43
|
if (global_utils_1._global[global_utils_1.GLOBAL_PROPAGATION_API_KEY]) {
|
|
43
44
|
// global propagator has already been set
|
|
44
45
|
return this._getGlobalPropagator();
|
|
45
46
|
}
|
|
46
47
|
global_utils_1._global[global_utils_1.GLOBAL_PROPAGATION_API_KEY] = global_utils_1.makeGetter(global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION, propagator, NoopHttpTextPropagator_1.NOOP_HTTP_TEXT_PROPAGATOR);
|
|
47
48
|
return propagator;
|
|
48
|
-
}
|
|
49
|
+
};
|
|
49
50
|
/**
|
|
50
51
|
* Inject context into a carrier to be propagated inter-process
|
|
51
52
|
*
|
|
@@ -53,9 +54,11 @@ class PropagationAPI {
|
|
|
53
54
|
* @param setter Function used to set values on the carrier
|
|
54
55
|
* @param context Context carrying tracing data to inject. Defaults to the currently active context.
|
|
55
56
|
*/
|
|
56
|
-
inject(carrier, setter
|
|
57
|
+
PropagationAPI.prototype.inject = function (carrier, setter, context) {
|
|
58
|
+
if (setter === void 0) { setter = setter_1.defaultSetter; }
|
|
59
|
+
if (context === void 0) { context = contextApi.active(); }
|
|
57
60
|
return this._getGlobalPropagator().inject(context, carrier, setter);
|
|
58
|
-
}
|
|
61
|
+
};
|
|
59
62
|
/**
|
|
60
63
|
* Extract context from a carrier
|
|
61
64
|
*
|
|
@@ -63,17 +66,20 @@ class PropagationAPI {
|
|
|
63
66
|
* @param getter Function used to extract keys from a carrier
|
|
64
67
|
* @param context Context which the newly created context will inherit from. Defaults to the currently active context.
|
|
65
68
|
*/
|
|
66
|
-
extract(carrier, getter
|
|
69
|
+
PropagationAPI.prototype.extract = function (carrier, getter, context) {
|
|
70
|
+
if (getter === void 0) { getter = getter_1.defaultGetter; }
|
|
71
|
+
if (context === void 0) { context = contextApi.active(); }
|
|
67
72
|
return this._getGlobalPropagator().extract(context, carrier, getter);
|
|
68
|
-
}
|
|
73
|
+
};
|
|
69
74
|
/** Remove the global propagator */
|
|
70
|
-
disable() {
|
|
75
|
+
PropagationAPI.prototype.disable = function () {
|
|
71
76
|
delete global_utils_1._global[global_utils_1.GLOBAL_PROPAGATION_API_KEY];
|
|
72
|
-
}
|
|
73
|
-
_getGlobalPropagator() {
|
|
77
|
+
};
|
|
78
|
+
PropagationAPI.prototype._getGlobalPropagator = function () {
|
|
74
79
|
var _a, _b;
|
|
75
80
|
return ((_b = (_a = global_utils_1._global[global_utils_1.GLOBAL_PROPAGATION_API_KEY]) === null || _a === void 0 ? void 0 : _a.call(global_utils_1._global, global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION)) !== null && _b !== void 0 ? _b : NoopHttpTextPropagator_1.NOOP_HTTP_TEXT_PROPAGATOR);
|
|
76
|
-
}
|
|
77
|
-
|
|
81
|
+
};
|
|
82
|
+
return PropagationAPI;
|
|
83
|
+
}());
|
|
78
84
|
exports.PropagationAPI = PropagationAPI;
|
|
79
85
|
//# sourceMappingURL=propagation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propagation.js","sourceRoot":"","sources":["../../../src/api/propagation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"propagation.js","sourceRoot":"","sources":["../../../src/api/propagation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,wDAA8E;AAE9E,wFAA0F;AAC1F,wDAA8E;AAC9E,qCAAuC;AACvC,+CAKwB;AAExB,IAAM,UAAU,GAAG,oBAAU,CAAC,WAAW,EAAE,CAAC;AAE5C;;GAEG;AACH;IAGE,+FAA+F;IAC/F;IAAuB,CAAC;IAExB,uDAAuD;IACzC,0BAAW,GAAzB;QACE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,IAAI,cAAc,EAAE,CAAC;SACvC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,4CAAmB,GAA1B,UACE,UAA8B;QAE9B,IAAI,sBAAO,CAAC,yCAA0B,CAAC,EAAE;YACvC,yCAAyC;YACzC,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC;SACpC;QAED,sBAAO,CAAC,yCAA0B,CAAC,GAAG,yBAAU,CAC9C,kDAAmC,EACnC,UAAU,EACV,kDAAyB,CAC1B,CAAC;QAEF,OAAO,UAAU,CAAC;IACpB,CAAC;IAED;;;;;;OAMG;IACI,+BAAM,GAAb,UACE,OAAgB,EAChB,MAA+C,EAC/C,OAA6B;QAD7B,uBAAA,EAAA,SAAkC,sBAAa;QAC/C,wBAAA,EAAA,UAAU,UAAU,CAAC,MAAM,EAAE;QAE7B,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;OAMG;IACI,gCAAO,GAAd,UACE,OAAgB,EAChB,MAA+C,EAC/C,OAA6B;QAD7B,uBAAA,EAAA,SAAkC,sBAAa;QAC/C,wBAAA,EAAA,UAAU,UAAU,CAAC,MAAM,EAAE;QAE7B,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACvE,CAAC;IAED,mCAAmC;IAC5B,gCAAO,GAAd;QACE,OAAO,sBAAO,CAAC,yCAA0B,CAAC,CAAC;IAC7C,CAAC;IAEO,6CAAoB,GAA5B;;QACE,OAAO,aACL,sBAAO,CAAC,yCAA0B,CAAC,+CAAnC,sBAAO,EACL,kDAAmC,oCAChC,kDAAyB,CAC/B,CAAC;IACJ,CAAC;IACH,qBAAC;AAAD,CAAC,AA7ED,IA6EC;AA7EY,wCAAc"}
|
package/build/src/api/trace.js
CHANGED
|
@@ -16,49 +16,51 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.TraceAPI = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
var NoopTracerProvider_1 = require("../trace/NoopTracerProvider");
|
|
20
|
+
var global_utils_1 = require("./global-utils");
|
|
21
21
|
/**
|
|
22
22
|
* Singleton object which represents the entry point to the OpenTelemetry Tracing API
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
var TraceAPI = /** @class */ (function () {
|
|
25
25
|
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
26
|
-
|
|
26
|
+
function TraceAPI() {
|
|
27
|
+
}
|
|
27
28
|
/** Get the singleton instance of the Trace API */
|
|
28
|
-
|
|
29
|
+
TraceAPI.getInstance = function () {
|
|
29
30
|
if (!this._instance) {
|
|
30
31
|
this._instance = new TraceAPI();
|
|
31
32
|
}
|
|
32
33
|
return this._instance;
|
|
33
|
-
}
|
|
34
|
+
};
|
|
34
35
|
/**
|
|
35
36
|
* Set the current global tracer. Returns the initialized global tracer provider
|
|
36
37
|
*/
|
|
37
|
-
setGlobalTracerProvider(provider) {
|
|
38
|
+
TraceAPI.prototype.setGlobalTracerProvider = function (provider) {
|
|
38
39
|
if (global_utils_1._global[global_utils_1.GLOBAL_TRACE_API_KEY]) {
|
|
39
40
|
// global tracer provider has already been set
|
|
40
41
|
return this.getTracerProvider();
|
|
41
42
|
}
|
|
42
43
|
global_utils_1._global[global_utils_1.GLOBAL_TRACE_API_KEY] = global_utils_1.makeGetter(global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION, provider, NoopTracerProvider_1.NOOP_TRACER_PROVIDER);
|
|
43
44
|
return this.getTracerProvider();
|
|
44
|
-
}
|
|
45
|
+
};
|
|
45
46
|
/**
|
|
46
47
|
* Returns the global tracer provider.
|
|
47
48
|
*/
|
|
48
|
-
getTracerProvider() {
|
|
49
|
+
TraceAPI.prototype.getTracerProvider = function () {
|
|
49
50
|
var _a, _b;
|
|
50
51
|
return ((_b = (_a = global_utils_1._global[global_utils_1.GLOBAL_TRACE_API_KEY]) === null || _a === void 0 ? void 0 : _a.call(global_utils_1._global, global_utils_1.API_BACKWARDS_COMPATIBILITY_VERSION)) !== null && _b !== void 0 ? _b : NoopTracerProvider_1.NOOP_TRACER_PROVIDER);
|
|
51
|
-
}
|
|
52
|
+
};
|
|
52
53
|
/**
|
|
53
54
|
* Returns a tracer from the global tracer provider.
|
|
54
55
|
*/
|
|
55
|
-
getTracer(name, version) {
|
|
56
|
+
TraceAPI.prototype.getTracer = function (name, version) {
|
|
56
57
|
return this.getTracerProvider().getTracer(name, version);
|
|
57
|
-
}
|
|
58
|
+
};
|
|
58
59
|
/** Remove the global tracer provider */
|
|
59
|
-
disable() {
|
|
60
|
+
TraceAPI.prototype.disable = function () {
|
|
60
61
|
delete global_utils_1._global[global_utils_1.GLOBAL_TRACE_API_KEY];
|
|
61
|
-
}
|
|
62
|
-
|
|
62
|
+
};
|
|
63
|
+
return TraceAPI;
|
|
64
|
+
}());
|
|
63
65
|
exports.TraceAPI = TraceAPI;
|
|
64
66
|
//# sourceMappingURL=trace.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace.js","sourceRoot":"","sources":["../../../src/api/trace.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"trace.js","sourceRoot":"","sources":["../../../src/api/trace.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,kEAAmE;AAGnE,+CAKwB;AAExB;;GAEG;AACH;IAGE,+FAA+F;IAC/F;IAAuB,CAAC;IAExB,kDAAkD;IACpC,oBAAW,GAAzB;QACE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,IAAI,QAAQ,EAAE,CAAC;SACjC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,0CAAuB,GAA9B,UAA+B,QAAwB;QACrD,IAAI,sBAAO,CAAC,mCAAoB,CAAC,EAAE;YACjC,8CAA8C;YAC9C,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;SACjC;QAED,sBAAO,CAAC,mCAAoB,CAAC,GAAG,yBAAU,CACxC,kDAAmC,EACnC,QAAQ,EACR,yCAAoB,CACrB,CAAC;QAEF,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAClC,CAAC;IAED;;OAEG;IACI,oCAAiB,GAAxB;;QACE,OAAO,aACL,sBAAO,CAAC,mCAAoB,CAAC,+CAA7B,sBAAO,EAAyB,kDAAmC,oCACnE,yCAAoB,CACrB,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,4BAAS,GAAhB,UAAiB,IAAY,EAAE,OAAgB;QAC7C,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,wCAAwC;IACjC,0BAAO,GAAd;QACE,OAAO,sBAAO,CAAC,mCAAoB,CAAC,CAAC;IACvC,CAAC;IACH,eAAC;AAAD,CAAC,AAtDD,IAsDC;AAtDY,4BAAQ"}
|
|
@@ -19,14 +19,17 @@ exports.NOOP_HTTP_TEXT_PROPAGATOR = exports.NoopHttpTextPropagator = void 0;
|
|
|
19
19
|
/**
|
|
20
20
|
* No-op implementations of {@link HttpTextPropagator}.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
var NoopHttpTextPropagator = /** @class */ (function () {
|
|
23
|
+
function NoopHttpTextPropagator() {
|
|
24
|
+
}
|
|
23
25
|
/** Noop inject function does nothing */
|
|
24
|
-
inject(context, carrier, setter) { }
|
|
26
|
+
NoopHttpTextPropagator.prototype.inject = function (context, carrier, setter) { };
|
|
25
27
|
/** Noop extract function does nothing and returns the input context */
|
|
26
|
-
extract(context, carrier, getter) {
|
|
28
|
+
NoopHttpTextPropagator.prototype.extract = function (context, carrier, getter) {
|
|
27
29
|
return context;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
+
};
|
|
31
|
+
return NoopHttpTextPropagator;
|
|
32
|
+
}());
|
|
30
33
|
exports.NoopHttpTextPropagator = NoopHttpTextPropagator;
|
|
31
34
|
exports.NOOP_HTTP_TEXT_PROPAGATOR = new NoopHttpTextPropagator();
|
|
32
35
|
//# sourceMappingURL=NoopHttpTextPropagator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoopHttpTextPropagator.js","sourceRoot":"","sources":["../../../../src/context/propagation/NoopHttpTextPropagator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAKH;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"NoopHttpTextPropagator.js","sourceRoot":"","sources":["../../../../src/context/propagation/NoopHttpTextPropagator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAKH;;GAEG;AACH;IAAA;IAOA,CAAC;IANC,wCAAwC;IACxC,uCAAM,GAAN,UAAO,OAAgB,EAAE,OAAgB,EAAE,MAAgB,IAAS,CAAC;IACrE,uEAAuE;IACvE,wCAAO,GAAP,UAAQ,OAAgB,EAAE,OAAgB,EAAE,MAAgB;QAC1D,OAAO,OAAO,CAAC;IACjB,CAAC;IACH,6BAAC;AAAD,CAAC,AAPD,IAOC;AAPY,wDAAsB;AAStB,QAAA,yBAAyB,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
|
package/build/src/index.js
CHANGED
|
@@ -65,16 +65,16 @@ __exportStar(require("./trace/tracer_provider"), exports);
|
|
|
65
65
|
__exportStar(require("./trace/tracer"), exports);
|
|
66
66
|
var context_base_1 = require("@opentelemetry/context-base");
|
|
67
67
|
Object.defineProperty(exports, "Context", { enumerable: true, get: function () { return context_base_1.Context; } });
|
|
68
|
-
|
|
68
|
+
var context_1 = require("./api/context");
|
|
69
69
|
/** Entrypoint for context API */
|
|
70
70
|
exports.context = context_1.ContextAPI.getInstance();
|
|
71
|
-
|
|
71
|
+
var trace_1 = require("./api/trace");
|
|
72
72
|
/** Entrypoint for trace API */
|
|
73
73
|
exports.trace = trace_1.TraceAPI.getInstance();
|
|
74
|
-
|
|
74
|
+
var metrics_1 = require("./api/metrics");
|
|
75
75
|
/** Entrypoint for metrics API */
|
|
76
76
|
exports.metrics = metrics_1.MetricsAPI.getInstance();
|
|
77
|
-
|
|
77
|
+
var propagation_1 = require("./api/propagation");
|
|
78
78
|
/** Entrypoint for propagation API */
|
|
79
79
|
exports.propagation = propagation_1.PropagationAPI.getInstance();
|
|
80
80
|
exports.default = {
|
package/build/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;AAEH,kDAAgC;AAChC,gDAA8B;AAC9B,+DAA6C;AAC7C,2EAAyD;AACzD,+EAA6D;AAC7D,+DAA6C;AAC7C,2EAAyD;AACzD,mEAAiD;AACjD,gEAA8C;AAC9C,4DAA0C;AAC1C,kDAAgC;AAChC,0DAAwC;AACxC,mDAAiC;AACjC,sDAAoC;AACpC,8DAA4C;AAC5C,wDAAsC;AACtC,2DAAyC;AACzC,qDAAmC;AACnC,gDAA8B;AAC9B,iEAA+C;AAC/C,uDAAqC;AACrC,+CAA6B;AAC7B,mDAAiC;AACjC,qDAAmC;AACnC,6DAA2C;AAC3C,kDAAgC;AAChC,yDAAuC;AACvC,uDAAqC;AACrC,oDAAkC;AAClC,+CAA6B;AAC7B,sDAAoC;AACpC,iDAA+B;AAC/B,qDAAmC;AACnC,sDAAoC;AACpC,sDAAoC;AACpC,0DAAwC;AACxC,iDAA+B;AAE/B,4DAAsD;AAA7C,uGAAA,OAAO,OAAA;AAEhB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;AAEH,kDAAgC;AAChC,gDAA8B;AAC9B,+DAA6C;AAC7C,2EAAyD;AACzD,+EAA6D;AAC7D,+DAA6C;AAC7C,2EAAyD;AACzD,mEAAiD;AACjD,gEAA8C;AAC9C,4DAA0C;AAC1C,kDAAgC;AAChC,0DAAwC;AACxC,mDAAiC;AACjC,sDAAoC;AACpC,8DAA4C;AAC5C,wDAAsC;AACtC,2DAAyC;AACzC,qDAAmC;AACnC,gDAA8B;AAC9B,iEAA+C;AAC/C,uDAAqC;AACrC,+CAA6B;AAC7B,mDAAiC;AACjC,qDAAmC;AACnC,6DAA2C;AAC3C,kDAAgC;AAChC,yDAAuC;AACvC,uDAAqC;AACrC,oDAAkC;AAClC,+CAA6B;AAC7B,sDAAoC;AACpC,iDAA+B;AAC/B,qDAAmC;AACnC,sDAAoC;AACpC,sDAAoC;AACpC,0DAAwC;AACxC,iDAA+B;AAE/B,4DAAsD;AAA7C,uGAAA,OAAO,OAAA;AAEhB,yCAA2C;AAC3C,iCAAiC;AACpB,QAAA,OAAO,GAAG,oBAAU,CAAC,WAAW,EAAE,CAAC;AAEhD,qCAAuC;AACvC,+BAA+B;AAClB,QAAA,KAAK,GAAG,gBAAQ,CAAC,WAAW,EAAE,CAAC;AAE5C,yCAA2C;AAC3C,iCAAiC;AACpB,QAAA,OAAO,GAAG,oBAAU,CAAC,WAAW,EAAE,CAAC;AAEhD,iDAAmD;AACnD,qCAAqC;AACxB,QAAA,WAAW,GAAG,4BAAc,CAAC,WAAW,EAAE,CAAC;AAExD,kBAAe;IACb,KAAK,eAAA;IACL,OAAO,iBAAA;IACP,OAAO,iBAAA;IACP,WAAW,qBAAA;CACZ,CAAC"}
|
|
@@ -14,59 +14,74 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
var __extends = (this && this.__extends) || (function () {
|
|
18
|
+
var extendStatics = function (d, b) {
|
|
19
|
+
extendStatics = Object.setPrototypeOf ||
|
|
20
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
21
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
22
|
+
return extendStatics(d, b);
|
|
23
|
+
};
|
|
24
|
+
return function (d, b) {
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
17
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
31
|
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;
|
|
19
32
|
/**
|
|
20
33
|
* NoopMeter is a noop implementation of the {@link Meter} interface. It reuses
|
|
21
34
|
* constant NoopMetrics for all of its methods.
|
|
22
35
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
36
|
+
var NoopMeter = /** @class */ (function () {
|
|
37
|
+
function NoopMeter() {
|
|
38
|
+
}
|
|
25
39
|
/**
|
|
26
40
|
* Returns constant noop value recorder.
|
|
27
41
|
* @param name the name of the metric.
|
|
28
42
|
* @param [options] the metric options.
|
|
29
43
|
*/
|
|
30
|
-
createValueRecorder(name, options) {
|
|
44
|
+
NoopMeter.prototype.createValueRecorder = function (name, options) {
|
|
31
45
|
return exports.NOOP_VALUE_RECORDER_METRIC;
|
|
32
|
-
}
|
|
46
|
+
};
|
|
33
47
|
/**
|
|
34
48
|
* Returns a constant noop counter.
|
|
35
49
|
* @param name the name of the metric.
|
|
36
50
|
* @param [options] the metric options.
|
|
37
51
|
*/
|
|
38
|
-
createCounter(name, options) {
|
|
52
|
+
NoopMeter.prototype.createCounter = function (name, options) {
|
|
39
53
|
return exports.NOOP_COUNTER_METRIC;
|
|
40
|
-
}
|
|
54
|
+
};
|
|
41
55
|
/**
|
|
42
56
|
* Returns a constant noop UpDownCounter.
|
|
43
57
|
* @param name the name of the metric.
|
|
44
58
|
* @param [options] the metric options.
|
|
45
59
|
*/
|
|
46
|
-
createUpDownCounter(name, options) {
|
|
60
|
+
NoopMeter.prototype.createUpDownCounter = function (name, options) {
|
|
47
61
|
return exports.NOOP_COUNTER_METRIC;
|
|
48
|
-
}
|
|
62
|
+
};
|
|
49
63
|
/**
|
|
50
64
|
* Returns constant noop value observer.
|
|
51
65
|
* @param name the name of the metric.
|
|
52
66
|
* @param [options] the metric options.
|
|
53
67
|
* @param [callback] the value observer callback
|
|
54
68
|
*/
|
|
55
|
-
createValueObserver(name, options, callback) {
|
|
69
|
+
NoopMeter.prototype.createValueObserver = function (name, options, callback) {
|
|
56
70
|
return exports.NOOP_VALUE_OBSERVER_METRIC;
|
|
57
|
-
}
|
|
71
|
+
};
|
|
58
72
|
/**
|
|
59
73
|
* Returns constant noop batch observer.
|
|
60
74
|
* @param name the name of the metric.
|
|
61
75
|
* @param callback the batch observer callback
|
|
62
76
|
*/
|
|
63
|
-
createBatchObserver(name, callback) {
|
|
77
|
+
NoopMeter.prototype.createBatchObserver = function (name, callback) {
|
|
64
78
|
return exports.NOOP_BATCH_OBSERVER_METRIC;
|
|
65
|
-
}
|
|
66
|
-
|
|
79
|
+
};
|
|
80
|
+
return NoopMeter;
|
|
81
|
+
}());
|
|
67
82
|
exports.NoopMeter = NoopMeter;
|
|
68
|
-
|
|
69
|
-
|
|
83
|
+
var NoopMetric = /** @class */ (function () {
|
|
84
|
+
function NoopMetric(instrument) {
|
|
70
85
|
this._instrument = instrument;
|
|
71
86
|
}
|
|
72
87
|
/**
|
|
@@ -76,32 +91,42 @@ class NoopMetric {
|
|
|
76
91
|
* @param labels key-values pairs that are associated with a specific metric
|
|
77
92
|
* that you want to record.
|
|
78
93
|
*/
|
|
79
|
-
bind(labels) {
|
|
94
|
+
NoopMetric.prototype.bind = function (labels) {
|
|
80
95
|
return this._instrument;
|
|
81
|
-
}
|
|
96
|
+
};
|
|
82
97
|
/**
|
|
83
98
|
* Removes the Binding from the metric, if it is present.
|
|
84
99
|
* @param labels key-values pairs that are associated with a specific metric.
|
|
85
100
|
*/
|
|
86
|
-
unbind(labels) {
|
|
101
|
+
NoopMetric.prototype.unbind = function (labels) {
|
|
87
102
|
return;
|
|
88
|
-
}
|
|
103
|
+
};
|
|
89
104
|
/**
|
|
90
105
|
* Clears all timeseries from the Metric.
|
|
91
106
|
*/
|
|
92
|
-
clear() {
|
|
107
|
+
NoopMetric.prototype.clear = function () {
|
|
93
108
|
return;
|
|
94
|
-
}
|
|
95
|
-
|
|
109
|
+
};
|
|
110
|
+
return NoopMetric;
|
|
111
|
+
}());
|
|
96
112
|
exports.NoopMetric = NoopMetric;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
113
|
+
var NoopCounterMetric = /** @class */ (function (_super) {
|
|
114
|
+
__extends(NoopCounterMetric, _super);
|
|
115
|
+
function NoopCounterMetric() {
|
|
116
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
100
117
|
}
|
|
101
|
-
|
|
118
|
+
NoopCounterMetric.prototype.add = function (value, labels) {
|
|
119
|
+
this.bind(labels).add(value);
|
|
120
|
+
};
|
|
121
|
+
return NoopCounterMetric;
|
|
122
|
+
}(NoopMetric));
|
|
102
123
|
exports.NoopCounterMetric = NoopCounterMetric;
|
|
103
|
-
|
|
104
|
-
|
|
124
|
+
var NoopValueRecorderMetric = /** @class */ (function (_super) {
|
|
125
|
+
__extends(NoopValueRecorderMetric, _super);
|
|
126
|
+
function NoopValueRecorderMetric() {
|
|
127
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
128
|
+
}
|
|
129
|
+
NoopValueRecorderMetric.prototype.record = function (value, labels, correlationContext, spanContext) {
|
|
105
130
|
if (typeof correlationContext === 'undefined') {
|
|
106
131
|
this.bind(labels).record(value);
|
|
107
132
|
}
|
|
@@ -111,36 +136,56 @@ class NoopValueRecorderMetric extends NoopMetric {
|
|
|
111
136
|
else {
|
|
112
137
|
this.bind(labels).record(value, correlationContext, spanContext);
|
|
113
138
|
}
|
|
114
|
-
}
|
|
115
|
-
|
|
139
|
+
};
|
|
140
|
+
return NoopValueRecorderMetric;
|
|
141
|
+
}(NoopMetric));
|
|
116
142
|
exports.NoopValueRecorderMetric = NoopValueRecorderMetric;
|
|
117
|
-
|
|
118
|
-
|
|
143
|
+
var NoopBaseObserverMetric = /** @class */ (function (_super) {
|
|
144
|
+
__extends(NoopBaseObserverMetric, _super);
|
|
145
|
+
function NoopBaseObserverMetric() {
|
|
146
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
147
|
+
}
|
|
148
|
+
NoopBaseObserverMetric.prototype.observation = function () {
|
|
119
149
|
return {
|
|
120
150
|
observer: this,
|
|
121
151
|
value: 0,
|
|
122
152
|
};
|
|
123
|
-
}
|
|
124
|
-
|
|
153
|
+
};
|
|
154
|
+
return NoopBaseObserverMetric;
|
|
155
|
+
}(NoopMetric));
|
|
125
156
|
exports.NoopBaseObserverMetric = NoopBaseObserverMetric;
|
|
126
|
-
|
|
127
|
-
|
|
157
|
+
var NoopBatchObserverMetric = /** @class */ (function (_super) {
|
|
158
|
+
__extends(NoopBatchObserverMetric, _super);
|
|
159
|
+
function NoopBatchObserverMetric() {
|
|
160
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
161
|
+
}
|
|
162
|
+
return NoopBatchObserverMetric;
|
|
163
|
+
}(NoopMetric));
|
|
128
164
|
exports.NoopBatchObserverMetric = NoopBatchObserverMetric;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return;
|
|
165
|
+
var NoopBoundCounter = /** @class */ (function () {
|
|
166
|
+
function NoopBoundCounter() {
|
|
132
167
|
}
|
|
133
|
-
|
|
134
|
-
exports.NoopBoundCounter = NoopBoundCounter;
|
|
135
|
-
class NoopBoundValueRecorder {
|
|
136
|
-
record(value, correlationContext, spanContext) {
|
|
168
|
+
NoopBoundCounter.prototype.add = function (value) {
|
|
137
169
|
return;
|
|
170
|
+
};
|
|
171
|
+
return NoopBoundCounter;
|
|
172
|
+
}());
|
|
173
|
+
exports.NoopBoundCounter = NoopBoundCounter;
|
|
174
|
+
var NoopBoundValueRecorder = /** @class */ (function () {
|
|
175
|
+
function NoopBoundValueRecorder() {
|
|
138
176
|
}
|
|
139
|
-
|
|
177
|
+
NoopBoundValueRecorder.prototype.record = function (value, correlationContext, spanContext) {
|
|
178
|
+
return;
|
|
179
|
+
};
|
|
180
|
+
return NoopBoundValueRecorder;
|
|
181
|
+
}());
|
|
140
182
|
exports.NoopBoundValueRecorder = NoopBoundValueRecorder;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
183
|
+
var NoopBoundBaseObserver = /** @class */ (function () {
|
|
184
|
+
function NoopBoundBaseObserver() {
|
|
185
|
+
}
|
|
186
|
+
NoopBoundBaseObserver.prototype.update = function (value) { };
|
|
187
|
+
return NoopBoundBaseObserver;
|
|
188
|
+
}());
|
|
144
189
|
exports.NoopBoundBaseObserver = NoopBoundBaseObserver;
|
|
145
190
|
exports.NOOP_METER = new NoopMeter();
|
|
146
191
|
exports.NOOP_BOUND_COUNTER = new NoopBoundCounter();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoopMeter.js","sourceRoot":"","sources":["../../../src/metrics/NoopMeter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"NoopMeter.js","sourceRoot":"","sources":["../../../src/metrics/NoopMeter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAwBH;;;GAGG;AACH;IACE;IAAe,CAAC;IAEhB;;;;OAIG;IACH,uCAAmB,GAAnB,UAAoB,IAAY,EAAE,OAAuB;QACvD,OAAO,kCAA0B,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACH,iCAAa,GAAb,UAAc,IAAY,EAAE,OAAuB;QACjD,OAAO,2BAAmB,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,uCAAmB,GAAnB,UAAoB,IAAY,EAAE,OAAuB;QACvD,OAAO,2BAAmB,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACH,uCAAmB,GAAnB,UACE,IAAY,EACZ,OAAuB,EACvB,QAAmD;QAEnD,OAAO,kCAA0B,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACH,uCAAmB,GAAnB,UACE,IAAY,EACZ,QAA4D;QAE5D,OAAO,kCAA0B,CAAC;IACpC,CAAC;IACH,gBAAC;AAAD,CAAC,AAvDD,IAuDC;AAvDY,8BAAS;AAyDtB;IAGE,oBAAY,UAAa;QACvB,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;IAED;;;;;;OAMG;IACH,yBAAI,GAAJ,UAAK,MAAc;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACH,2BAAM,GAAN,UAAO,MAAc;QACnB,OAAO;IACT,CAAC;IAED;;OAEG;IACH,0BAAK,GAAL;QACE,OAAO;IACT,CAAC;IACH,iBAAC;AAAD,CAAC,AAhCD,IAgCC;AAhCY,gCAAU;AAkCvB;IAAuC,qCAAwB;IAA/D;;IAKA,CAAC;IAHC,+BAAG,GAAH,UAAI,KAAa,EAAE,MAAc;QAC/B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACH,wBAAC;AAAD,CAAC,AALD,CAAuC,UAAU,GAKhD;AALY,8CAAiB;AAO9B;IAA6C,2CAA8B;IAA3E;;IAgBA,CAAC;IAdC,wCAAM,GAAN,UACE,KAAa,EACb,MAAc,EACd,kBAAuC,EACvC,WAAyB;QAEzB,IAAI,OAAO,kBAAkB,KAAK,WAAW,EAAE;YAC7C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SACjC;aAAM,IAAI,OAAO,WAAW,KAAK,WAAW,EAAE;YAC7C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;SACrD;aAAM;YACL,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,kBAAkB,EAAE,WAAW,CAAC,CAAC;SAClE;IACH,CAAC;IACH,8BAAC;AAAD,CAAC,AAhBD,CAA6C,UAAU,GAgBtD;AAhBY,0DAAuB;AAkBpC;IAA4C,0CAA6B;IAAzE;;IAQA,CAAC;IANC,4CAAW,GAAX;QACE,OAAO;YACL,QAAQ,EAAE,IAAoB;YAC9B,KAAK,EAAE,CAAC;SACT,CAAC;IACJ,CAAC;IACH,6BAAC;AAAD,CAAC,AARD,CAA4C,UAAU,GAQrD;AARY,wDAAsB;AAUnC;IAA6C,2CAAgB;IAA7D;;IAC4B,CAAC;IAAD,8BAAC;AAAD,CAAC,AAD7B,CAA6C,UAAU,GAC1B;AADhB,0DAAuB;AAGpC;IAAA;IAIA,CAAC;IAHC,8BAAG,GAAH,UAAI,KAAa;QACf,OAAO;IACT,CAAC;IACH,uBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,4CAAgB;AAM7B;IAAA;IAQA,CAAC;IAPC,uCAAM,GAAN,UACE,KAAa,EACb,kBAAuC,EACvC,WAAyB;QAEzB,OAAO;IACT,CAAC;IACH,6BAAC;AAAD,CAAC,AARD,IAQC;AARY,wDAAsB;AAUnC;IAAA;IAEA,CAAC;IADC,sCAAM,GAAN,UAAO,KAAa,IAAG,CAAC;IAC1B,4BAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sDAAqB;AAIrB,QAAA,UAAU,GAAG,IAAI,SAAS,EAAE,CAAC;AAC7B,QAAA,kBAAkB,GAAG,IAAI,gBAAgB,EAAE,CAAC;AAC5C,QAAA,mBAAmB,GAAG,IAAI,iBAAiB,CAAC,0BAAkB,CAAC,CAAC;AAEhE,QAAA,yBAAyB,GAAG,IAAI,sBAAsB,EAAE,CAAC;AACzD,QAAA,0BAA0B,GAAG,IAAI,uBAAuB,CACnE,iCAAyB,CAC1B,CAAC;AAEW,QAAA,wBAAwB,GAAG,IAAI,qBAAqB,EAAE,CAAC;AACvD,QAAA,0BAA0B,GAAG,IAAI,sBAAsB,CAClE,gCAAwB,CACzB,CAAC;AAEW,QAAA,gCAAgC,GAAG,IAAI,sBAAsB,CACxE,gCAAwB,CACzB,CAAC;AAEW,QAAA,wBAAwB,GAAG,IAAI,sBAAsB,CAChE,gCAAwB,CACzB,CAAC;AAEW,QAAA,0BAA0B,GAAG,IAAI,uBAAuB,EAAE,CAAC"}
|
|
@@ -16,16 +16,19 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = void 0;
|
|
19
|
-
|
|
19
|
+
var NoopMeter_1 = require("./NoopMeter");
|
|
20
20
|
/**
|
|
21
21
|
* An implementation of the {@link MeterProvider} which returns an impotent Meter
|
|
22
22
|
* for all calls to `getMeter`
|
|
23
23
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return NoopMeter_1.NOOP_METER;
|
|
24
|
+
var NoopMeterProvider = /** @class */ (function () {
|
|
25
|
+
function NoopMeterProvider() {
|
|
27
26
|
}
|
|
28
|
-
|
|
27
|
+
NoopMeterProvider.prototype.getMeter = function (_name, _version) {
|
|
28
|
+
return NoopMeter_1.NOOP_METER;
|
|
29
|
+
};
|
|
30
|
+
return NoopMeterProvider;
|
|
31
|
+
}());
|
|
29
32
|
exports.NoopMeterProvider = NoopMeterProvider;
|
|
30
33
|
exports.NOOP_METER_PROVIDER = new NoopMeterProvider();
|
|
31
34
|
//# sourceMappingURL=NoopMeterProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoopMeterProvider.js","sourceRoot":"","sources":["../../../src/metrics/NoopMeterProvider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,
|
|
1
|
+
{"version":3,"file":"NoopMeterProvider.js","sourceRoot":"","sources":["../../../src/metrics/NoopMeterProvider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,yCAAyC;AAEzC;;;GAGG;AACH;IAAA;IAIA,CAAC;IAHC,oCAAQ,GAAR,UAAS,KAAc,EAAE,QAAiB;QACxC,OAAO,sBAAU,CAAC;IACpB,CAAC;IACH,wBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,8CAAiB;AAMjB,QAAA,mBAAmB,GAAG,IAAI,iBAAiB,EAAE,CAAC"}
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.NOOP_SPAN = exports.NoopSpan = exports.INVALID_SPAN_ID = exports.INVALID_TRACE_ID = void 0;
|
|
19
|
-
|
|
19
|
+
var trace_flags_1 = require("./trace_flags");
|
|
20
20
|
exports.INVALID_TRACE_ID = '0';
|
|
21
21
|
exports.INVALID_SPAN_ID = '0';
|
|
22
|
-
|
|
22
|
+
var INVALID_SPAN_CONTEXT = {
|
|
23
23
|
traceId: exports.INVALID_TRACE_ID,
|
|
24
24
|
spanId: exports.INVALID_SPAN_ID,
|
|
25
25
|
traceFlags: trace_flags_1.TraceFlags.NONE,
|
|
@@ -29,41 +29,43 @@ const INVALID_SPAN_CONTEXT = {
|
|
|
29
29
|
* implementation is available. All operations are no-op including context
|
|
30
30
|
* propagation.
|
|
31
31
|
*/
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
var NoopSpan = /** @class */ (function () {
|
|
33
|
+
function NoopSpan(_spanContext) {
|
|
34
|
+
if (_spanContext === void 0) { _spanContext = INVALID_SPAN_CONTEXT; }
|
|
34
35
|
this._spanContext = _spanContext;
|
|
35
36
|
}
|
|
36
37
|
// Returns a SpanContext.
|
|
37
|
-
context() {
|
|
38
|
+
NoopSpan.prototype.context = function () {
|
|
38
39
|
return this._spanContext;
|
|
39
|
-
}
|
|
40
|
+
};
|
|
40
41
|
// By default does nothing
|
|
41
|
-
setAttribute(key, value) {
|
|
42
|
+
NoopSpan.prototype.setAttribute = function (key, value) {
|
|
42
43
|
return this;
|
|
43
|
-
}
|
|
44
|
+
};
|
|
44
45
|
// By default does nothing
|
|
45
|
-
setAttributes(attributes) {
|
|
46
|
+
NoopSpan.prototype.setAttributes = function (attributes) {
|
|
46
47
|
return this;
|
|
47
|
-
}
|
|
48
|
+
};
|
|
48
49
|
// By default does nothing
|
|
49
|
-
addEvent(name, attributes) {
|
|
50
|
+
NoopSpan.prototype.addEvent = function (name, attributes) {
|
|
50
51
|
return this;
|
|
51
|
-
}
|
|
52
|
+
};
|
|
52
53
|
// By default does nothing
|
|
53
|
-
setStatus(status) {
|
|
54
|
+
NoopSpan.prototype.setStatus = function (status) {
|
|
54
55
|
return this;
|
|
55
|
-
}
|
|
56
|
+
};
|
|
56
57
|
// By default does nothing
|
|
57
|
-
updateName(name) {
|
|
58
|
+
NoopSpan.prototype.updateName = function (name) {
|
|
58
59
|
return this;
|
|
59
|
-
}
|
|
60
|
+
};
|
|
60
61
|
// By default does nothing
|
|
61
|
-
end(endTime) { }
|
|
62
|
+
NoopSpan.prototype.end = function (endTime) { };
|
|
62
63
|
// isRecording always returns false for noopSpan.
|
|
63
|
-
isRecording() {
|
|
64
|
+
NoopSpan.prototype.isRecording = function () {
|
|
64
65
|
return false;
|
|
65
|
-
}
|
|
66
|
-
|
|
66
|
+
};
|
|
67
|
+
return NoopSpan;
|
|
68
|
+
}());
|
|
67
69
|
exports.NoopSpan = NoopSpan;
|
|
68
70
|
exports.NOOP_SPAN = new NoopSpan();
|
|
69
71
|
//# sourceMappingURL=NoopSpan.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoopSpan.js","sourceRoot":"","sources":["../../../src/trace/NoopSpan.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAOH
|
|
1
|
+
{"version":3,"file":"NoopSpan.js","sourceRoot":"","sources":["../../../src/trace/NoopSpan.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAOH,6CAA2C;AAE9B,QAAA,gBAAgB,GAAG,GAAG,CAAC;AACvB,QAAA,eAAe,GAAG,GAAG,CAAC;AACnC,IAAM,oBAAoB,GAAgB;IACxC,OAAO,EAAE,wBAAgB;IACzB,MAAM,EAAE,uBAAe;IACvB,UAAU,EAAE,wBAAU,CAAC,IAAI;CAC5B,CAAC;AAEF;;;;GAIG;AACH;IACE,kBACmB,YAAgD;QAAhD,6BAAA,EAAA,mCAAgD;QAAhD,iBAAY,GAAZ,YAAY,CAAoC;IAChE,CAAC;IAEJ,yBAAyB;IACzB,0BAAO,GAAP;QACE,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,0BAA0B;IAC1B,+BAAY,GAAZ,UAAa,GAAW,EAAE,KAAc;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,gCAAa,GAAb,UAAc,UAAsB;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,2BAAQ,GAAR,UAAS,IAAY,EAAE,UAAuB;QAC5C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,4BAAS,GAAT,UAAU,MAAc;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,6BAAU,GAAV,UAAW,IAAY;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,sBAAG,GAAH,UAAI,OAAmB,IAAS,CAAC;IAEjC,iDAAiD;IACjD,8BAAW,GAAX;QACE,OAAO,KAAK,CAAC;IACf,CAAC;IACH,eAAC;AAAD,CAAC,AA1CD,IA0CC;AA1CY,4BAAQ;AA4CR,QAAA,SAAS,GAAG,IAAI,QAAQ,EAAE,CAAC"}
|
|
@@ -16,25 +16,28 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.NOOP_TRACER = exports.NoopTracer = void 0;
|
|
19
|
-
|
|
19
|
+
var NoopSpan_1 = require("./NoopSpan");
|
|
20
20
|
/**
|
|
21
21
|
* No-op implementations of {@link Tracer}.
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return NoopSpan_1.NOOP_SPAN;
|
|
23
|
+
var NoopTracer = /** @class */ (function () {
|
|
24
|
+
function NoopTracer() {
|
|
26
25
|
}
|
|
26
|
+
NoopTracer.prototype.getCurrentSpan = function () {
|
|
27
|
+
return NoopSpan_1.NOOP_SPAN;
|
|
28
|
+
};
|
|
27
29
|
// startSpan starts a noop span.
|
|
28
|
-
startSpan(name, options) {
|
|
30
|
+
NoopTracer.prototype.startSpan = function (name, options) {
|
|
29
31
|
return NoopSpan_1.NOOP_SPAN;
|
|
30
|
-
}
|
|
31
|
-
withSpan(span, fn) {
|
|
32
|
+
};
|
|
33
|
+
NoopTracer.prototype.withSpan = function (span, fn) {
|
|
32
34
|
return fn();
|
|
33
|
-
}
|
|
34
|
-
bind(target, span) {
|
|
35
|
+
};
|
|
36
|
+
NoopTracer.prototype.bind = function (target, span) {
|
|
35
37
|
return target;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
+
};
|
|
39
|
+
return NoopTracer;
|
|
40
|
+
}());
|
|
38
41
|
exports.NoopTracer = NoopTracer;
|
|
39
42
|
exports.NOOP_TRACER = new NoopTracer();
|
|
40
43
|
//# sourceMappingURL=NoopTracer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoopTracer.js","sourceRoot":"","sources":["../../../src/trace/NoopTracer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"NoopTracer.js","sourceRoot":"","sources":["../../../src/trace/NoopTracer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,uCAAuC;AAEvC;;GAEG;AACH;IAAA;IAoBA,CAAC;IAnBC,mCAAc,GAAd;QACE,OAAO,oBAAS,CAAC;IACnB,CAAC;IAED,gCAAgC;IAChC,8BAAS,GAAT,UAAU,IAAY,EAAE,OAAqB;QAC3C,OAAO,oBAAS,CAAC;IACnB,CAAC;IAED,6BAAQ,GAAR,UACE,IAAU,EACV,EAAK;QAEL,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAED,yBAAI,GAAJ,UAAQ,MAAS,EAAE,IAAW;QAC5B,OAAO,MAAM,CAAC;IAChB,CAAC;IACH,iBAAC;AAAD,CAAC,AApBD,IAoBC;AApBY,gCAAU;AAsBV,QAAA,WAAW,GAAG,IAAI,UAAU,EAAE,CAAC"}
|
|
@@ -16,18 +16,21 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.NOOP_TRACER_PROVIDER = exports.NoopTracerProvider = void 0;
|
|
19
|
-
|
|
19
|
+
var NoopTracer_1 = require("./NoopTracer");
|
|
20
20
|
/**
|
|
21
21
|
* An implementation of the {@link TracerProvider} which returns an impotent
|
|
22
22
|
* Tracer for all calls to `getTracer`.
|
|
23
23
|
*
|
|
24
24
|
* All operations are no-op.
|
|
25
25
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return NoopTracer_1.NOOP_TRACER;
|
|
26
|
+
var NoopTracerProvider = /** @class */ (function () {
|
|
27
|
+
function NoopTracerProvider() {
|
|
29
28
|
}
|
|
30
|
-
|
|
29
|
+
NoopTracerProvider.prototype.getTracer = function (_name, _version) {
|
|
30
|
+
return NoopTracer_1.NOOP_TRACER;
|
|
31
|
+
};
|
|
32
|
+
return NoopTracerProvider;
|
|
33
|
+
}());
|
|
31
34
|
exports.NoopTracerProvider = NoopTracerProvider;
|
|
32
35
|
exports.NOOP_TRACER_PROVIDER = new NoopTracerProvider();
|
|
33
36
|
//# sourceMappingURL=NoopTracerProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoopTracerProvider.js","sourceRoot":"","sources":["../../../src/trace/NoopTracerProvider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"NoopTracerProvider.js","sourceRoot":"","sources":["../../../src/trace/NoopTracerProvider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2CAA2C;AAI3C;;;;;GAKG;AACH;IAAA;IAIA,CAAC;IAHC,sCAAS,GAAT,UAAU,KAAc,EAAE,QAAiB;QACzC,OAAO,wBAAW,CAAC;IACrB,CAAC;IACH,yBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,gDAAkB;AAMlB,QAAA,oBAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC"}
|
package/build/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.10.
|
|
1
|
+
export declare const VERSION = "0.10.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/src/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/api",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "Public API for OpenTelemetry",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"types": "build/src/index.d.ts",
|
|
@@ -52,16 +52,16 @@
|
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@opentelemetry/context-base": "^0.10.
|
|
55
|
+
"@opentelemetry/context-base": "^0.10.2"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/mocha": "8.0.0",
|
|
59
|
-
"@types/node": "14.0.
|
|
59
|
+
"@types/node": "14.0.27",
|
|
60
60
|
"@types/webpack-env": "1.15.2",
|
|
61
61
|
"codecov": "3.7.2",
|
|
62
62
|
"gts": "2.0.2",
|
|
63
63
|
"istanbul-instrumenter-loader": "3.0.1",
|
|
64
|
-
"karma": "5.1.
|
|
64
|
+
"karma": "5.1.1",
|
|
65
65
|
"karma-chrome-launcher": "3.1.0",
|
|
66
66
|
"karma-coverage-istanbul-reporter": "3.0.3",
|
|
67
67
|
"karma-mocha": "2.0.1",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"ts-mocha": "7.0.0",
|
|
75
75
|
"typedoc": "0.17.8",
|
|
76
76
|
"typescript": "3.9.7",
|
|
77
|
-
"webpack": "4.44.
|
|
77
|
+
"webpack": "4.44.1"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "b247e69034a7888a842fe75e0a5ff06f8bea44a8"
|
|
80
80
|
}
|