@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
|
@@ -1,17 +1,2 @@
|
|
|
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
|
export * from './globalThis';
|
|
17
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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.
|
|
@@ -14,9 +14,16 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
}
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
20
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
|
|
28
|
+
__exportStar(require("./globalThis"), exports);
|
|
22
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,+CAA6B"}
|
|
@@ -1,17 +1,2 @@
|
|
|
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
|
export * from './node';
|
|
17
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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.
|
|
@@ -14,9 +14,16 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
}
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
20
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
|
|
28
|
+
__exportStar(require("./node"), exports);
|
|
22
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,yCAAuB"}
|
|
@@ -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
|
/** only globals that common to node and browsers are allowed */
|
|
17
2
|
export declare const _globalThis: typeof globalThis;
|
|
18
3
|
//# sourceMappingURL=globalThis.d.ts.map
|
|
@@ -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,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports._globalThis = void 0;
|
|
18
19
|
/** only globals that common to node and browsers are allowed */
|
|
19
20
|
// eslint-disable-next-line node/no-unsupported-features/es-builtins
|
|
20
21
|
exports._globalThis = typeof globalThis === 'object' ? globalThis : global;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalThis.js","sourceRoot":"","sources":["../../../../src/platform/node/globalThis.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,gEAAgE;AAChE,oEAAoE;AACvD,QAAA,WAAW,GAAG,OAAO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC"}
|
|
@@ -1,17 +1,2 @@
|
|
|
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
|
export * from './globalThis';
|
|
17
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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.
|
|
@@ -14,9 +14,16 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
}
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
20
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
|
|
28
|
+
__exportStar(require("./globalThis"), exports);
|
|
22
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,+CAA6B"}
|
|
@@ -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 { Attributes } from './attributes';
|
|
17
2
|
/** A text annotation with a set of attributes. */
|
|
18
3
|
export interface Event {
|
package/build/src/trace/Event.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Event.js","sourceRoot":"","sources":["../../../src/trace/Event.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -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 { TimeInput } from '../common/Time';
|
|
17
2
|
import { Attributes } from './attributes';
|
|
18
3
|
import { Span } from './span';
|
|
@@ -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,10 +15,11 @@
|
|
|
15
15
|
* limitations under the License.
|
|
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
|
+
var trace_flags_1 = require("./trace_flags");
|
|
19
20
|
exports.INVALID_TRACE_ID = '0';
|
|
20
21
|
exports.INVALID_SPAN_ID = '0';
|
|
21
|
-
|
|
22
|
+
var INVALID_SPAN_CONTEXT = {
|
|
22
23
|
traceId: exports.INVALID_TRACE_ID,
|
|
23
24
|
spanId: exports.INVALID_SPAN_ID,
|
|
24
25
|
traceFlags: trace_flags_1.TraceFlags.NONE,
|
|
@@ -28,41 +29,43 @@ const INVALID_SPAN_CONTEXT = {
|
|
|
28
29
|
* implementation is available. All operations are no-op including context
|
|
29
30
|
* propagation.
|
|
30
31
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
var NoopSpan = /** @class */ (function () {
|
|
33
|
+
function NoopSpan(_spanContext) {
|
|
34
|
+
if (_spanContext === void 0) { _spanContext = INVALID_SPAN_CONTEXT; }
|
|
33
35
|
this._spanContext = _spanContext;
|
|
34
36
|
}
|
|
35
37
|
// Returns a SpanContext.
|
|
36
|
-
context() {
|
|
38
|
+
NoopSpan.prototype.context = function () {
|
|
37
39
|
return this._spanContext;
|
|
38
|
-
}
|
|
40
|
+
};
|
|
39
41
|
// By default does nothing
|
|
40
|
-
setAttribute(key, value) {
|
|
42
|
+
NoopSpan.prototype.setAttribute = function (key, value) {
|
|
41
43
|
return this;
|
|
42
|
-
}
|
|
44
|
+
};
|
|
43
45
|
// By default does nothing
|
|
44
|
-
setAttributes(attributes) {
|
|
46
|
+
NoopSpan.prototype.setAttributes = function (attributes) {
|
|
45
47
|
return this;
|
|
46
|
-
}
|
|
48
|
+
};
|
|
47
49
|
// By default does nothing
|
|
48
|
-
addEvent(name, attributes) {
|
|
50
|
+
NoopSpan.prototype.addEvent = function (name, attributes) {
|
|
49
51
|
return this;
|
|
50
|
-
}
|
|
52
|
+
};
|
|
51
53
|
// By default does nothing
|
|
52
|
-
setStatus(status) {
|
|
54
|
+
NoopSpan.prototype.setStatus = function (status) {
|
|
53
55
|
return this;
|
|
54
|
-
}
|
|
56
|
+
};
|
|
55
57
|
// By default does nothing
|
|
56
|
-
updateName(name) {
|
|
58
|
+
NoopSpan.prototype.updateName = function (name) {
|
|
57
59
|
return this;
|
|
58
|
-
}
|
|
60
|
+
};
|
|
59
61
|
// By default does nothing
|
|
60
|
-
end(endTime) { }
|
|
62
|
+
NoopSpan.prototype.end = function (endTime) { };
|
|
61
63
|
// isRecording always returns false for noopSpan.
|
|
62
|
-
isRecording() {
|
|
64
|
+
NoopSpan.prototype.isRecording = function () {
|
|
63
65
|
return false;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
+
};
|
|
67
|
+
return NoopSpan;
|
|
68
|
+
}());
|
|
66
69
|
exports.NoopSpan = NoopSpan;
|
|
67
70
|
exports.NOOP_SPAN = new NoopSpan();
|
|
68
71
|
//# sourceMappingURL=NoopSpan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -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 { Span, SpanOptions, Tracer } from '..';
|
|
17
2
|
/**
|
|
18
3
|
* No-op implementations of {@link Tracer}.
|
|
@@ -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,25 +15,29 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
18
|
+
exports.NOOP_TRACER = exports.NoopTracer = void 0;
|
|
19
|
+
var NoopSpan_1 = require("./NoopSpan");
|
|
19
20
|
/**
|
|
20
21
|
* No-op implementations of {@link Tracer}.
|
|
21
22
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return NoopSpan_1.NOOP_SPAN;
|
|
23
|
+
var NoopTracer = /** @class */ (function () {
|
|
24
|
+
function NoopTracer() {
|
|
25
25
|
}
|
|
26
|
+
NoopTracer.prototype.getCurrentSpan = function () {
|
|
27
|
+
return NoopSpan_1.NOOP_SPAN;
|
|
28
|
+
};
|
|
26
29
|
// startSpan starts a noop span.
|
|
27
|
-
startSpan(name, options) {
|
|
30
|
+
NoopTracer.prototype.startSpan = function (name, options) {
|
|
28
31
|
return NoopSpan_1.NOOP_SPAN;
|
|
29
|
-
}
|
|
30
|
-
withSpan(span, fn) {
|
|
32
|
+
};
|
|
33
|
+
NoopTracer.prototype.withSpan = function (span, fn) {
|
|
31
34
|
return fn();
|
|
32
|
-
}
|
|
33
|
-
bind(target, span) {
|
|
35
|
+
};
|
|
36
|
+
NoopTracer.prototype.bind = function (target, span) {
|
|
34
37
|
return target;
|
|
35
|
-
}
|
|
36
|
-
|
|
38
|
+
};
|
|
39
|
+
return NoopTracer;
|
|
40
|
+
}());
|
|
37
41
|
exports.NoopTracer = NoopTracer;
|
|
38
42
|
exports.NOOP_TRACER = new NoopTracer();
|
|
39
43
|
//# sourceMappingURL=NoopTracer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -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 { Tracer } from './tracer';
|
|
17
2
|
import { TracerProvider } from './tracer_provider';
|
|
18
3
|
/**
|
|
@@ -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,18 +15,22 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
18
|
+
exports.NOOP_TRACER_PROVIDER = exports.NoopTracerProvider = void 0;
|
|
19
|
+
var NoopTracer_1 = require("./NoopTracer");
|
|
19
20
|
/**
|
|
20
21
|
* An implementation of the {@link TracerProvider} which returns an impotent
|
|
21
22
|
* Tracer for all calls to `getTracer`.
|
|
22
23
|
*
|
|
23
24
|
* All operations are no-op.
|
|
24
25
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return NoopTracer_1.NOOP_TRACER;
|
|
26
|
+
var NoopTracerProvider = /** @class */ (function () {
|
|
27
|
+
function NoopTracerProvider() {
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
NoopTracerProvider.prototype.getTracer = function (_name, _version) {
|
|
30
|
+
return NoopTracer_1.NOOP_TRACER;
|
|
31
|
+
};
|
|
32
|
+
return NoopTracerProvider;
|
|
33
|
+
}());
|
|
30
34
|
exports.NoopTracerProvider = NoopTracerProvider;
|
|
31
35
|
exports.NOOP_TRACER_PROVIDER = new NoopTracerProvider();
|
|
32
36
|
//# sourceMappingURL=NoopTracerProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -1,19 +1,8 @@
|
|
|
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 { SpanContext } from './span_context';
|
|
2
|
+
import { SpanKind } from './span_kind';
|
|
3
|
+
import { Attributes } from './attributes';
|
|
4
|
+
import { Link } from './link';
|
|
5
|
+
import { SamplingResult } from './SamplingResult';
|
|
17
6
|
/**
|
|
18
7
|
* This interface represent a sampler. Sampling is a mechanism to control the
|
|
19
8
|
* noise and overhead introduced by OpenTelemetry by reducing the number of
|
|
@@ -23,12 +12,19 @@ export interface Sampler {
|
|
|
23
12
|
/**
|
|
24
13
|
* Checks whether span needs to be created and tracked.
|
|
25
14
|
*
|
|
26
|
-
*
|
|
27
|
-
* @param [parentContext] Parent span context. Typically taken from the wire.
|
|
15
|
+
* @param parentContext Parent span context. Typically taken from the wire.
|
|
28
16
|
* Can be null.
|
|
29
|
-
* @
|
|
17
|
+
* @param traceId of the span to be created. It can be different from the
|
|
18
|
+
* traceId in the {@link SpanContext}. Typically in situations when the
|
|
19
|
+
* span to be created starts a new trace.
|
|
20
|
+
* @param spanName of the span to be created.
|
|
21
|
+
* @param spanKind of the span to be created.
|
|
22
|
+
* @param attributes Initial set of Attributes for the Span being constructed.
|
|
23
|
+
* @param links Collection of links that will be associated with the Span to
|
|
24
|
+
* be created. Typically useful for batch operations.
|
|
25
|
+
* @returns a {@link SamplingResult}.
|
|
30
26
|
*/
|
|
31
|
-
shouldSample(parentContext
|
|
27
|
+
shouldSample(parentContext: SpanContext | undefined, traceId: string, spanName: string, spanKind: SpanKind, attributes: Attributes, links: Link[]): SamplingResult;
|
|
32
28
|
/** Returns the sampler name or short description with the configuration. */
|
|
33
29
|
toString(): string;
|
|
34
30
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sampler.js","sourceRoot":"","sources":["../../../src/trace/Sampler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Attributes } from './attributes';
|
|
2
|
+
/**
|
|
3
|
+
* A sampling decision that determines how a {@link Span} will be recorded
|
|
4
|
+
* and collected.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum SamplingDecision {
|
|
7
|
+
/**
|
|
8
|
+
* `Span.isRecording() === false`, span will not be recorded and all events
|
|
9
|
+
* and attributes will be dropped.
|
|
10
|
+
*/
|
|
11
|
+
NOT_RECORD = 0,
|
|
12
|
+
/**
|
|
13
|
+
* `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}
|
|
14
|
+
* MUST NOT be set.
|
|
15
|
+
*/
|
|
16
|
+
RECORD = 1,
|
|
17
|
+
/**
|
|
18
|
+
* `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}
|
|
19
|
+
* MUST be set.
|
|
20
|
+
*/
|
|
21
|
+
RECORD_AND_SAMPLED = 2
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A sampling result contains a decision for a {@link Span} and additional
|
|
25
|
+
* attributes the sampler would like to added to the Span.
|
|
26
|
+
*/
|
|
27
|
+
export interface SamplingResult {
|
|
28
|
+
/**
|
|
29
|
+
* A sampling decision, refer to {@link SamplingDecision} for details.
|
|
30
|
+
*/
|
|
31
|
+
decision: SamplingDecision;
|
|
32
|
+
/**
|
|
33
|
+
* The list of attributes returned by SamplingResult MUST be immutable.
|
|
34
|
+
* Caller may call {@link Sampler}.shouldSample any number of times and
|
|
35
|
+
* can safely cache the returned value.
|
|
36
|
+
*/
|
|
37
|
+
attributes?: Readonly<Attributes>;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=SamplingResult.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright The 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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.SamplingDecision = void 0;
|
|
19
|
+
/**
|
|
20
|
+
* A sampling decision that determines how a {@link Span} will be recorded
|
|
21
|
+
* and collected.
|
|
22
|
+
*/
|
|
23
|
+
var SamplingDecision;
|
|
24
|
+
(function (SamplingDecision) {
|
|
25
|
+
/**
|
|
26
|
+
* `Span.isRecording() === false`, span will not be recorded and all events
|
|
27
|
+
* and attributes will be dropped.
|
|
28
|
+
*/
|
|
29
|
+
SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD";
|
|
30
|
+
/**
|
|
31
|
+
* `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}
|
|
32
|
+
* MUST NOT be set.
|
|
33
|
+
*/
|
|
34
|
+
SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD";
|
|
35
|
+
/**
|
|
36
|
+
* `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}
|
|
37
|
+
* MUST be set.
|
|
38
|
+
*/
|
|
39
|
+
SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
|
|
40
|
+
})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
|
|
41
|
+
//# sourceMappingURL=SamplingResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SamplingResult.js","sourceRoot":"","sources":["../../../src/trace/SamplingResult.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH;;;GAGG;AACH,IAAY,gBAgBX;AAhBD,WAAY,gBAAgB;IAC1B;;;OAGG;IACH,mEAAU,CAAA;IACV;;;OAGG;IACH,2DAAM,CAAA;IACN;;;OAGG;IACH,mFAAkB,CAAA;AACpB,CAAC,EAhBW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAgB3B"}
|
|
@@ -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 { Attributes } from './attributes';
|
|
17
2
|
import { Link } from './link';
|
|
18
3
|
import { SpanKind } from './span_kind';
|