@opentelemetry/api 0.8.3 → 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/README.md +3 -0
- package/build/src/api/context.d.ts +0 -15
- package/build/src/api/context.js +28 -24
- package/build/src/api/context.js.map +1 -0
- package/build/src/api/global-utils.d.ts +0 -15
- package/build/src/api/global-utils.js +7 -4
- package/build/src/api/global-utils.js.map +1 -0
- package/build/src/api/metrics.d.ts +0 -15
- package/build/src/api/metrics.js +22 -19
- package/build/src/api/metrics.js.map +1 -0
- package/build/src/api/propagation.d.ts +0 -15
- package/build/src/api/propagation.js +32 -25
- package/build/src/api/propagation.js.map +1 -0
- package/build/src/api/trace.d.ts +0 -15
- package/build/src/api/trace.js +22 -19
- package/build/src/api/trace.js.map +1 -0
- package/build/src/common/Logger.d.ts +0 -15
- package/build/src/common/Logger.js +2 -2
- package/build/src/common/Logger.js.map +1 -0
- package/build/src/common/Time.d.ts +0 -16
- package/build/src/common/Time.js +0 -15
- package/build/src/common/Time.js.map +1 -0
- package/build/src/context/propagation/HttpTextPropagator.d.ts +0 -15
- package/build/src/context/propagation/HttpTextPropagator.js +2 -2
- package/build/src/context/propagation/HttpTextPropagator.js.map +1 -0
- package/build/src/context/propagation/NoopHttpTextPropagator.d.ts +0 -15
- package/build/src/context/propagation/NoopHttpTextPropagator.js +11 -7
- package/build/src/context/propagation/NoopHttpTextPropagator.js.map +1 -0
- package/build/src/context/propagation/getter.d.ts +0 -15
- package/build/src/context/propagation/getter.js +3 -2
- package/build/src/context/propagation/getter.js.map +1 -0
- package/build/src/context/propagation/setter.d.ts +0 -15
- package/build/src/context/propagation/setter.js +3 -2
- package/build/src/context/propagation/setter.js.map +1 -0
- package/build/src/correlation_context/CorrelationContext.d.ts +0 -15
- package/build/src/correlation_context/CorrelationContext.js +2 -2
- package/build/src/correlation_context/CorrelationContext.js.map +1 -0
- package/build/src/correlation_context/EntryValue.d.ts +0 -19
- package/build/src/correlation_context/EntryValue.js +1 -15
- package/build/src/correlation_context/EntryValue.js.map +1 -0
- package/build/src/index.d.ts +3 -16
- package/build/src/index.js +55 -23
- package/build/src/index.js.map +1 -0
- package/build/src/metrics/BatchObserverResult.d.ts +15 -0
- package/build/src/metrics/{MetricObservable.js → BatchObserverResult.js} +3 -3
- package/build/src/metrics/BatchObserverResult.js.map +1 -0
- package/build/src/metrics/BoundInstrument.d.ts +10 -21
- package/build/src/metrics/BoundInstrument.js +2 -2
- package/build/src/metrics/BoundInstrument.js.map +1 -0
- package/build/src/metrics/Meter.d.ts +35 -21
- package/build/src/metrics/Meter.js +2 -2
- package/build/src/metrics/Meter.js.map +1 -0
- package/build/src/metrics/MeterProvider.d.ts +0 -15
- package/build/src/metrics/MeterProvider.js +2 -2
- package/build/src/metrics/MeterProvider.js.map +1 -0
- package/build/src/metrics/Metric.d.ts +33 -33
- package/build/src/metrics/Metric.js +3 -2
- package/build/src/metrics/Metric.js.map +1 -0
- package/build/src/metrics/NoopMeter.d.ts +39 -28
- package/build/src/metrics/NoopMeter.js +126 -47
- package/build/src/metrics/NoopMeter.js.map +1 -0
- package/build/src/metrics/NoopMeterProvider.d.ts +0 -15
- package/build/src/metrics/NoopMeterProvider.js +11 -7
- package/build/src/metrics/NoopMeterProvider.js.map +1 -0
- package/build/src/metrics/Observation.d.ts +9 -0
- package/build/src/metrics/Observation.js +18 -0
- package/build/src/metrics/Observation.js.map +1 -0
- package/build/src/metrics/ObserverResult.d.ts +2 -18
- package/build/src/metrics/ObserverResult.js +2 -2
- package/build/src/metrics/ObserverResult.js.map +1 -0
- package/build/src/platform/browser/globalThis.d.ts +0 -15
- package/build/src/platform/browser/globalThis.js +3 -2
- package/build/src/platform/browser/globalThis.js.map +1 -0
- package/build/src/platform/browser/index.d.ts +0 -15
- package/build/src/platform/browser/index.js +13 -6
- package/build/src/platform/browser/index.js.map +1 -0
- package/build/src/platform/index.d.ts +0 -15
- package/build/src/platform/index.js +13 -6
- package/build/src/platform/index.js.map +1 -0
- package/build/src/platform/node/globalThis.d.ts +0 -15
- package/build/src/platform/node/globalThis.js +3 -2
- package/build/src/platform/node/globalThis.js.map +1 -0
- package/build/src/platform/node/index.d.ts +0 -15
- package/build/src/platform/node/index.js +13 -6
- package/build/src/platform/node/index.js.map +1 -0
- package/build/src/trace/Event.d.ts +0 -15
- package/build/src/trace/Event.js +2 -2
- package/build/src/trace/Event.js.map +1 -0
- package/build/src/trace/NoopSpan.d.ts +0 -15
- package/build/src/trace/NoopSpan.js +25 -22
- package/build/src/trace/NoopSpan.js.map +1 -0
- package/build/src/trace/NoopTracer.d.ts +0 -15
- package/build/src/trace/NoopTracer.js +17 -13
- package/build/src/trace/NoopTracer.js.map +1 -0
- package/build/src/trace/NoopTracerProvider.d.ts +0 -15
- package/build/src/trace/NoopTracerProvider.js +11 -7
- package/build/src/trace/NoopTracerProvider.js.map +1 -0
- package/build/src/trace/Sampler.d.ts +15 -19
- package/build/src/trace/Sampler.js +2 -2
- package/build/src/trace/Sampler.js.map +1 -0
- package/build/src/trace/SamplingResult.d.ts +39 -0
- package/build/src/trace/SamplingResult.js +41 -0
- package/build/src/trace/SamplingResult.js.map +1 -0
- package/build/src/trace/SpanOptions.d.ts +0 -15
- package/build/src/trace/SpanOptions.js +2 -2
- package/build/src/trace/SpanOptions.js.map +1 -0
- package/build/src/trace/TimedEvent.d.ts +0 -15
- package/build/src/trace/TimedEvent.js +2 -2
- package/build/src/trace/TimedEvent.js.map +1 -0
- package/build/src/trace/attributes.d.ts +0 -19
- package/build/src/trace/attributes.js +0 -15
- package/build/src/trace/attributes.js.map +1 -0
- package/build/src/trace/instrumentation/Plugin.d.ts +0 -15
- package/build/src/trace/instrumentation/Plugin.js +2 -2
- package/build/src/trace/instrumentation/Plugin.js.map +1 -0
- package/build/src/trace/link.d.ts +0 -15
- package/build/src/trace/link.js +2 -2
- package/build/src/trace/link.js.map +1 -0
- package/build/src/trace/link_context.d.ts +0 -15
- package/build/src/trace/link_context.js +2 -2
- package/build/src/trace/link_context.js.map +1 -0
- package/build/src/trace/span.d.ts +0 -15
- package/build/src/trace/span.js +2 -2
- package/build/src/trace/span.js.map +1 -0
- package/build/src/trace/span_context.d.ts +0 -15
- package/build/src/trace/span_context.js +2 -2
- package/build/src/trace/span_context.js.map +1 -0
- package/build/src/trace/span_kind.d.ts +0 -19
- package/build/src/trace/span_kind.js +4 -7
- package/build/src/trace/span_kind.js.map +1 -0
- package/build/src/trace/status.d.ts +0 -19
- package/build/src/trace/status.js +1 -15
- package/build/src/trace/status.js.map +1 -0
- package/build/src/trace/trace_flags.d.ts +0 -20
- package/build/src/trace/trace_flags.js +4 -8
- package/build/src/trace/trace_flags.js.map +1 -0
- package/build/src/trace/trace_state.d.ts +0 -20
- package/build/src/trace/trace_state.js +0 -15
- package/build/src/trace/trace_state.js.map +1 -0
- package/build/src/trace/tracer.d.ts +1 -16
- package/build/src/trace/tracer.js +2 -2
- package/build/src/trace/tracer.js.map +1 -0
- package/build/src/trace/tracer_provider.d.ts +0 -15
- package/build/src/trace/tracer_provider.js +2 -2
- package/build/src/trace/tracer_provider.js.map +1 -0
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +3 -2
- package/build/src/version.js.map +1 -0
- package/package.json +24 -22
- package/build/src/metrics/MetricObservable.d.ts +0 -36
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# OpenTelemetry API for JavaScript
|
|
2
|
+
|
|
2
3
|
[![Gitter chat][gitter-image]][gitter-url]
|
|
3
4
|
[![NPM Published Version][npm-img]][npm-url]
|
|
4
5
|
[![dependencies][dependencies-image]][dependencies-url]
|
|
@@ -99,6 +100,7 @@ api.metrics.setGlobalMeterProvider(meterProvider);
|
|
|
99
100
|
Because the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API.
|
|
100
101
|
|
|
101
102
|
## Advanced Use
|
|
103
|
+
|
|
102
104
|
### API Registration Options
|
|
103
105
|
|
|
104
106
|
If you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped.
|
|
@@ -176,6 +178,7 @@ async function doSomething() {
|
|
|
176
178
|
```
|
|
177
179
|
|
|
178
180
|
## Useful links
|
|
181
|
+
|
|
179
182
|
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
|
|
180
183
|
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
|
|
181
184
|
- For help or feedback on this project, join us on [gitter][gitter-url]
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2020, OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
1
|
import { Context, ContextManager } from '@opentelemetry/context-base';
|
|
17
2
|
/**
|
|
18
3
|
* Singleton object which represents the entry point to the OpenTelemetry Context API
|
package/build/src/api/context.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* Copyright
|
|
2
|
+
/*
|
|
3
|
+
* Copyright The OpenTelemetry Authors
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -15,66 +15,70 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
exports.ContextAPI = void 0;
|
|
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();
|
|
21
22
|
/**
|
|
22
23
|
* Singleton object which represents the entry point to the OpenTelemetry Context API
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
|
+
var ContextAPI = /** @class */ (function () {
|
|
25
26
|
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
26
|
-
|
|
27
|
+
function ContextAPI() {
|
|
28
|
+
}
|
|
27
29
|
/** Get the singleton instance of the Context API */
|
|
28
|
-
|
|
30
|
+
ContextAPI.getInstance = function () {
|
|
29
31
|
if (!this._instance) {
|
|
30
32
|
this._instance = new ContextAPI();
|
|
31
33
|
}
|
|
32
34
|
return this._instance;
|
|
33
|
-
}
|
|
35
|
+
};
|
|
34
36
|
/**
|
|
35
37
|
* Set the current context manager. Returns the initialized context manager
|
|
36
38
|
*/
|
|
37
|
-
setGlobalContextManager(contextManager) {
|
|
39
|
+
ContextAPI.prototype.setGlobalContextManager = function (contextManager) {
|
|
38
40
|
if (global_utils_1._global[global_utils_1.GLOBAL_CONTEXT_MANAGER_API_KEY]) {
|
|
39
41
|
// global context manager has already been set
|
|
40
42
|
return this._getContextManager();
|
|
41
43
|
}
|
|
42
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);
|
|
43
45
|
return contextManager;
|
|
44
|
-
}
|
|
46
|
+
};
|
|
45
47
|
/**
|
|
46
48
|
* Get the currently active context
|
|
47
49
|
*/
|
|
48
|
-
active() {
|
|
50
|
+
ContextAPI.prototype.active = function () {
|
|
49
51
|
return this._getContextManager().active();
|
|
50
|
-
}
|
|
52
|
+
};
|
|
51
53
|
/**
|
|
52
54
|
* Execute a function with an active context
|
|
53
55
|
*
|
|
54
56
|
* @param context context to be active during function execution
|
|
55
57
|
* @param fn function to execute in a context
|
|
56
58
|
*/
|
|
57
|
-
with(context, fn) {
|
|
59
|
+
ContextAPI.prototype.with = function (context, fn) {
|
|
58
60
|
return this._getContextManager().with(context, fn);
|
|
59
|
-
}
|
|
61
|
+
};
|
|
60
62
|
/**
|
|
61
63
|
* Bind a context to a target function or event emitter
|
|
62
64
|
*
|
|
63
65
|
* @param target function or event emitter to bind
|
|
64
66
|
* @param context context to bind to the event emitter or function. Defaults to the currently active context
|
|
65
67
|
*/
|
|
66
|
-
bind(target, context
|
|
68
|
+
ContextAPI.prototype.bind = function (target, context) {
|
|
69
|
+
if (context === void 0) { context = this.active(); }
|
|
67
70
|
return this._getContextManager().bind(target, context);
|
|
68
|
-
}
|
|
69
|
-
_getContextManager() {
|
|
70
|
-
var _a, _b
|
|
71
|
-
return (
|
|
72
|
-
}
|
|
71
|
+
};
|
|
72
|
+
ContextAPI.prototype._getContextManager = function () {
|
|
73
|
+
var _a, _b;
|
|
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);
|
|
75
|
+
};
|
|
73
76
|
/** Disable and remove the global context manager */
|
|
74
|
-
disable() {
|
|
77
|
+
ContextAPI.prototype.disable = function () {
|
|
75
78
|
this._getContextManager().disable();
|
|
76
79
|
delete global_utils_1._global[global_utils_1.GLOBAL_CONTEXT_MANAGER_API_KEY];
|
|
77
|
-
}
|
|
78
|
-
|
|
80
|
+
};
|
|
81
|
+
return ContextAPI;
|
|
82
|
+
}());
|
|
79
83
|
exports.ContextAPI = ContextAPI;
|
|
80
84
|
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2020, OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
1
|
import { ContextManager } from '@opentelemetry/context-base';
|
|
17
2
|
import { HttpTextPropagator } from '../context/propagation/HttpTextPropagator';
|
|
18
3
|
import { MeterProvider } from '../metrics/MeterProvider';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* Copyright
|
|
2
|
+
/*
|
|
3
|
+
* Copyright The OpenTelemetry Authors
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
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
|
+
var platform_1 = require("../platform");
|
|
19
20
|
exports.GLOBAL_CONTEXT_MANAGER_API_KEY = Symbol.for('io.opentelemetry.js.api.context');
|
|
20
21
|
exports.GLOBAL_METRICS_API_KEY = Symbol.for('io.opentelemetry.js.api.metrics');
|
|
21
22
|
exports.GLOBAL_PROPAGATION_API_KEY = Symbol.for('io.opentelemetry.js.api.propagation');
|
|
@@ -30,7 +31,9 @@ exports._global = platform_1._globalThis;
|
|
|
30
31
|
* @param fallback Fallback instance, usually NOOP, which will be returned if the required version is not compatible
|
|
31
32
|
*/
|
|
32
33
|
function makeGetter(requiredVersion, instance, fallback) {
|
|
33
|
-
return (version)
|
|
34
|
+
return function (version) {
|
|
35
|
+
return version === requiredVersion ? instance : fallback;
|
|
36
|
+
};
|
|
34
37
|
}
|
|
35
38
|
exports.makeGetter = makeGetter;
|
|
36
39
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2020, OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
1
|
import { Meter } from '../metrics/Meter';
|
|
17
2
|
import { MeterProvider } from '../metrics/MeterProvider';
|
|
18
3
|
/**
|
package/build/src/api/metrics.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* Copyright
|
|
2
|
+
/*
|
|
3
|
+
* Copyright The OpenTelemetry Authors
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -15,49 +15,52 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
exports.MetricsAPI = void 0;
|
|
19
|
+
var NoopMeterProvider_1 = require("../metrics/NoopMeterProvider");
|
|
20
|
+
var global_utils_1 = require("./global-utils");
|
|
20
21
|
/**
|
|
21
22
|
* Singleton object which represents the entry point to the OpenTelemetry Metrics API
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
var MetricsAPI = /** @class */ (function () {
|
|
24
25
|
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
25
|
-
|
|
26
|
+
function MetricsAPI() {
|
|
27
|
+
}
|
|
26
28
|
/** Get the singleton instance of the Metrics API */
|
|
27
|
-
|
|
29
|
+
MetricsAPI.getInstance = function () {
|
|
28
30
|
if (!this._instance) {
|
|
29
31
|
this._instance = new MetricsAPI();
|
|
30
32
|
}
|
|
31
33
|
return this._instance;
|
|
32
|
-
}
|
|
34
|
+
};
|
|
33
35
|
/**
|
|
34
36
|
* Set the current global meter. Returns the initialized global meter provider.
|
|
35
37
|
*/
|
|
36
|
-
setGlobalMeterProvider(provider) {
|
|
38
|
+
MetricsAPI.prototype.setGlobalMeterProvider = function (provider) {
|
|
37
39
|
if (global_utils_1._global[global_utils_1.GLOBAL_METRICS_API_KEY]) {
|
|
38
40
|
// global meter provider has already been set
|
|
39
41
|
return this.getMeterProvider();
|
|
40
42
|
}
|
|
41
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);
|
|
42
44
|
return provider;
|
|
43
|
-
}
|
|
45
|
+
};
|
|
44
46
|
/**
|
|
45
47
|
* Returns the global meter provider.
|
|
46
48
|
*/
|
|
47
|
-
getMeterProvider() {
|
|
48
|
-
var _a, _b
|
|
49
|
-
return (
|
|
50
|
-
}
|
|
49
|
+
MetricsAPI.prototype.getMeterProvider = function () {
|
|
50
|
+
var _a, _b;
|
|
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);
|
|
52
|
+
};
|
|
51
53
|
/**
|
|
52
54
|
* Returns a meter from the global meter provider.
|
|
53
55
|
*/
|
|
54
|
-
getMeter(name, version) {
|
|
56
|
+
MetricsAPI.prototype.getMeter = function (name, version) {
|
|
55
57
|
return this.getMeterProvider().getMeter(name, version);
|
|
56
|
-
}
|
|
58
|
+
};
|
|
57
59
|
/** Remove the global meter provider */
|
|
58
|
-
disable() {
|
|
60
|
+
MetricsAPI.prototype.disable = function () {
|
|
59
61
|
delete global_utils_1._global[global_utils_1.GLOBAL_METRICS_API_KEY];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
+
};
|
|
63
|
+
return MetricsAPI;
|
|
64
|
+
}());
|
|
62
65
|
exports.MetricsAPI = MetricsAPI;
|
|
63
66
|
//# sourceMappingURL=metrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2020, OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
1
|
import { Context } from '@opentelemetry/context-base';
|
|
17
2
|
import { GetterFunction } from '../context/propagation/getter';
|
|
18
3
|
import { HttpTextPropagator } from '../context/propagation/HttpTextPropagator';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* Copyright
|
|
2
|
+
/*
|
|
3
|
+
* Copyright The OpenTelemetry Authors
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -15,36 +15,38 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
exports.PropagationAPI = void 0;
|
|
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();
|
|
24
25
|
/**
|
|
25
26
|
* Singleton object which represents the entry point to the OpenTelemetry Propagation API
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
|
+
var PropagationAPI = /** @class */ (function () {
|
|
28
29
|
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
29
|
-
|
|
30
|
+
function PropagationAPI() {
|
|
31
|
+
}
|
|
30
32
|
/** Get the singleton instance of the Propagator API */
|
|
31
|
-
|
|
33
|
+
PropagationAPI.getInstance = function () {
|
|
32
34
|
if (!this._instance) {
|
|
33
35
|
this._instance = new PropagationAPI();
|
|
34
36
|
}
|
|
35
37
|
return this._instance;
|
|
36
|
-
}
|
|
38
|
+
};
|
|
37
39
|
/**
|
|
38
40
|
* Set the current propagator. Returns the initialized propagator
|
|
39
41
|
*/
|
|
40
|
-
setGlobalPropagator(propagator) {
|
|
42
|
+
PropagationAPI.prototype.setGlobalPropagator = function (propagator) {
|
|
41
43
|
if (global_utils_1._global[global_utils_1.GLOBAL_PROPAGATION_API_KEY]) {
|
|
42
44
|
// global propagator has already been set
|
|
43
45
|
return this._getGlobalPropagator();
|
|
44
46
|
}
|
|
45
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);
|
|
46
48
|
return propagator;
|
|
47
|
-
}
|
|
49
|
+
};
|
|
48
50
|
/**
|
|
49
51
|
* Inject context into a carrier to be propagated inter-process
|
|
50
52
|
*
|
|
@@ -52,9 +54,11 @@ class PropagationAPI {
|
|
|
52
54
|
* @param setter Function used to set values on the carrier
|
|
53
55
|
* @param context Context carrying tracing data to inject. Defaults to the currently active context.
|
|
54
56
|
*/
|
|
55
|
-
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(); }
|
|
56
60
|
return this._getGlobalPropagator().inject(context, carrier, setter);
|
|
57
|
-
}
|
|
61
|
+
};
|
|
58
62
|
/**
|
|
59
63
|
* Extract context from a carrier
|
|
60
64
|
*
|
|
@@ -62,17 +66,20 @@ class PropagationAPI {
|
|
|
62
66
|
* @param getter Function used to extract keys from a carrier
|
|
63
67
|
* @param context Context which the newly created context will inherit from. Defaults to the currently active context.
|
|
64
68
|
*/
|
|
65
|
-
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(); }
|
|
66
72
|
return this._getGlobalPropagator().extract(context, carrier, getter);
|
|
67
|
-
}
|
|
73
|
+
};
|
|
68
74
|
/** Remove the global propagator */
|
|
69
|
-
disable() {
|
|
75
|
+
PropagationAPI.prototype.disable = function () {
|
|
70
76
|
delete global_utils_1._global[global_utils_1.GLOBAL_PROPAGATION_API_KEY];
|
|
71
|
-
}
|
|
72
|
-
_getGlobalPropagator() {
|
|
73
|
-
var _a, _b
|
|
74
|
-
return (
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
+
};
|
|
78
|
+
PropagationAPI.prototype._getGlobalPropagator = function () {
|
|
79
|
+
var _a, _b;
|
|
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);
|
|
81
|
+
};
|
|
82
|
+
return PropagationAPI;
|
|
83
|
+
}());
|
|
77
84
|
exports.PropagationAPI = PropagationAPI;
|
|
78
85
|
//# sourceMappingURL=propagation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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.d.ts
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2020, OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
1
|
import { Tracer } from '../trace/tracer';
|
|
17
2
|
import { TracerProvider } from '../trace/tracer_provider';
|
|
18
3
|
/**
|
package/build/src/api/trace.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* Copyright
|
|
2
|
+
/*
|
|
3
|
+
* Copyright The OpenTelemetry Authors
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -15,49 +15,52 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
exports.TraceAPI = void 0;
|
|
19
|
+
var NoopTracerProvider_1 = require("../trace/NoopTracerProvider");
|
|
20
|
+
var global_utils_1 = require("./global-utils");
|
|
20
21
|
/**
|
|
21
22
|
* Singleton object which represents the entry point to the OpenTelemetry Tracing API
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
var TraceAPI = /** @class */ (function () {
|
|
24
25
|
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
25
|
-
|
|
26
|
+
function TraceAPI() {
|
|
27
|
+
}
|
|
26
28
|
/** Get the singleton instance of the Trace API */
|
|
27
|
-
|
|
29
|
+
TraceAPI.getInstance = function () {
|
|
28
30
|
if (!this._instance) {
|
|
29
31
|
this._instance = new TraceAPI();
|
|
30
32
|
}
|
|
31
33
|
return this._instance;
|
|
32
|
-
}
|
|
34
|
+
};
|
|
33
35
|
/**
|
|
34
36
|
* Set the current global tracer. Returns the initialized global tracer provider
|
|
35
37
|
*/
|
|
36
|
-
setGlobalTracerProvider(provider) {
|
|
38
|
+
TraceAPI.prototype.setGlobalTracerProvider = function (provider) {
|
|
37
39
|
if (global_utils_1._global[global_utils_1.GLOBAL_TRACE_API_KEY]) {
|
|
38
40
|
// global tracer provider has already been set
|
|
39
41
|
return this.getTracerProvider();
|
|
40
42
|
}
|
|
41
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);
|
|
42
44
|
return this.getTracerProvider();
|
|
43
|
-
}
|
|
45
|
+
};
|
|
44
46
|
/**
|
|
45
47
|
* Returns the global tracer provider.
|
|
46
48
|
*/
|
|
47
|
-
getTracerProvider() {
|
|
48
|
-
var _a, _b
|
|
49
|
-
return (
|
|
50
|
-
}
|
|
49
|
+
TraceAPI.prototype.getTracerProvider = function () {
|
|
50
|
+
var _a, _b;
|
|
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);
|
|
52
|
+
};
|
|
51
53
|
/**
|
|
52
54
|
* Returns a tracer from the global tracer provider.
|
|
53
55
|
*/
|
|
54
|
-
getTracer(name, version) {
|
|
56
|
+
TraceAPI.prototype.getTracer = function (name, version) {
|
|
55
57
|
return this.getTracerProvider().getTracer(name, version);
|
|
56
|
-
}
|
|
58
|
+
};
|
|
57
59
|
/** Remove the global tracer provider */
|
|
58
|
-
disable() {
|
|
60
|
+
TraceAPI.prototype.disable = function () {
|
|
59
61
|
delete global_utils_1._global[global_utils_1.GLOBAL_TRACE_API_KEY];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
+
};
|
|
63
|
+
return TraceAPI;
|
|
64
|
+
}());
|
|
62
65
|
exports.TraceAPI = TraceAPI;
|
|
63
66
|
//# sourceMappingURL=trace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2019, OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
1
|
export declare type LogFunction = (message: string, ...args: unknown[]) => void;
|
|
17
2
|
/** Defines a logger interface. */
|
|
18
3
|
export interface Logger {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../../src/common/Logger.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2019, OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
/** High resolution HrTime: [seconds: number, nanoseconds: number] */
|
|
17
1
|
export declare type HrTime = [number, number];
|
|
18
2
|
/**
|
|
19
3
|
* Defines TimeInput.
|
package/build/src/common/Time.js
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* Copyright 2019, OpenTelemetry Authors
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
//# sourceMappingURL=Time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Time.js","sourceRoot":"","sources":["../../../src/common/Time.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2019, OpenTelemetry Authors
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
1
|
import { Context } from '@opentelemetry/context-base';
|
|
17
2
|
import { SetterFunction } from './setter';
|
|
18
3
|
import { GetterFunction } from './getter';
|