@opentelemetry/api 0.12.0 → 0.14.0
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 +2 -2
- package/build/src/api/global-utils.d.ts +1 -1
- package/build/src/api/global-utils.js +1 -1
- package/build/src/api/propagation.d.ts +5 -7
- package/build/src/api/propagation.js +7 -12
- package/build/src/api/propagation.js.map +1 -1
- package/build/src/{correlation_context/CorrelationContext.d.ts → baggage/Baggage.d.ts} +5 -5
- package/build/src/{trace/instrumentation/Plugin.js → baggage/Baggage.js} +1 -1
- package/build/src/baggage/Baggage.js.map +1 -0
- package/build/src/{correlation_context → baggage}/EntryValue.d.ts +0 -0
- package/build/src/{correlation_context → baggage}/EntryValue.js +0 -0
- package/build/src/baggage/EntryValue.js.map +1 -0
- package/build/src/context/context.d.ts +11 -1
- package/build/src/context/context.js +22 -2
- package/build/src/context/context.js.map +1 -1
- package/build/src/context/propagation/NoopTextMapPropagator.d.ts +3 -2
- package/build/src/context/propagation/NoopTextMapPropagator.js +5 -2
- package/build/src/context/propagation/NoopTextMapPropagator.js.map +1 -1
- package/build/src/context/propagation/TextMapPropagator.d.ts +52 -9
- package/build/src/context/propagation/TextMapPropagator.js +23 -0
- package/build/src/context/propagation/TextMapPropagator.js.map +1 -1
- package/build/src/index.d.ts +2 -5
- package/build/src/index.js +2 -5
- package/build/src/index.js.map +1 -1
- package/build/src/metrics/Meter.d.ts +18 -5
- package/build/src/metrics/Metric.d.ts +5 -3
- package/build/src/metrics/Metric.js.map +1 -1
- package/build/src/metrics/NoopMeter.d.ts +28 -14
- package/build/src/metrics/NoopMeter.js +36 -20
- package/build/src/metrics/NoopMeter.js.map +1 -1
- package/build/src/trace/NoopLogger.d.ts +4 -4
- package/build/src/trace/NoopLogger.js +12 -12
- package/build/src/trace/NoopLogger.js.map +1 -1
- package/build/src/trace/NoopSpan.d.ts +7 -7
- package/build/src/trace/NoopSpan.js +7 -7
- package/build/src/trace/NoopSpan.js.map +1 -1
- package/build/src/trace/NoopTracer.d.ts +1 -1
- package/build/src/trace/NoopTracer.js +6 -7
- package/build/src/trace/NoopTracer.js.map +1 -1
- package/build/src/trace/Sampler.d.ts +4 -5
- package/build/src/trace/SpanOptions.d.ts +2 -15
- package/build/src/trace/attributes.d.ts +5 -0
- package/build/src/trace/span.d.ts +5 -2
- package/build/src/trace/span_context.d.ts +1 -1
- package/build/src/trace/status.d.ts +10 -128
- package/build/src/trace/status.js +12 -130
- package/build/src/trace/status.js.map +1 -1
- package/build/src/trace/trace_state.d.ts +8 -7
- package/build/src/trace/trace_state.js +15 -0
- package/build/src/trace/trace_state.js.map +1 -1
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +1 -1
- package/package.json +15 -15
- package/build/src/context/propagation/HttpTextPropagator.d.ts +0 -44
- package/build/src/context/propagation/HttpTextPropagator.js +0 -18
- package/build/src/context/propagation/HttpTextPropagator.js.map +0 -1
- package/build/src/context/propagation/NoopHttpTextPropagator.d.ts +0 -13
- package/build/src/context/propagation/NoopHttpTextPropagator.js +0 -35
- package/build/src/context/propagation/NoopHttpTextPropagator.js.map +0 -1
- package/build/src/context/propagation/getter.d.ts +0 -10
- package/build/src/context/propagation/getter.js +0 -30
- package/build/src/context/propagation/getter.js.map +0 -1
- package/build/src/context/propagation/setter.d.ts +0 -9
- package/build/src/context/propagation/setter.js +0 -29
- package/build/src/context/propagation/setter.js.map +0 -1
- package/build/src/correlation_context/CorrelationContext.js +0 -18
- package/build/src/correlation_context/CorrelationContext.js.map +0 -1
- package/build/src/correlation_context/EntryValue.js.map +0 -1
- package/build/src/metrics/MetricObservable.d.ts +0 -18
- package/build/src/metrics/MetricObservable.js +0 -3
- package/build/src/metrics/MetricObservable.js.map +0 -1
- package/build/src/trace/instrumentation/BasePlugin.d.ts +0 -65
- package/build/src/trace/instrumentation/BasePlugin.js +0 -18
- package/build/src/trace/instrumentation/BasePlugin.js.map +0 -1
- package/build/src/trace/instrumentation/Instrumentation.d.ts +0 -50
- package/build/src/trace/instrumentation/Instrumentation.js +0 -18
- package/build/src/trace/instrumentation/Instrumentation.js.map +0 -1
- package/build/src/trace/instrumentation/Plugin.d.ts +0 -71
- package/build/src/trace/instrumentation/Plugin.js.map +0 -1
|
@@ -1,141 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.StatusCode = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* An enumeration of
|
|
5
|
+
* An enumeration of status codes.
|
|
6
6
|
*/
|
|
7
|
-
var
|
|
8
|
-
(function (
|
|
7
|
+
var StatusCode;
|
|
8
|
+
(function (StatusCode) {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* The operation has been validated by an Application developer or
|
|
11
|
+
* Operator to have completed successfully.
|
|
11
12
|
*/
|
|
12
|
-
|
|
13
|
+
StatusCode[StatusCode["OK"] = 0] = "OK";
|
|
13
14
|
/**
|
|
14
|
-
* The
|
|
15
|
+
* The default status.
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
+
StatusCode[StatusCode["UNSET"] = 1] = "UNSET";
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
-
* if a status value received from another address space belongs to
|
|
20
|
-
* an error-space that is not known in this address space. Also
|
|
21
|
-
* errors raised by APIs that do not return enough error information
|
|
22
|
-
* may be converted to this error.
|
|
19
|
+
* The operation contains an error.
|
|
23
20
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* Client specified an invalid argument. Note that this differs
|
|
27
|
-
* from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments
|
|
28
|
-
* that are problematic regardless of the state of the system
|
|
29
|
-
* (e.g., a malformed file name).
|
|
30
|
-
*/
|
|
31
|
-
CanonicalCode[CanonicalCode["INVALID_ARGUMENT"] = 3] = "INVALID_ARGUMENT";
|
|
32
|
-
/**
|
|
33
|
-
* Deadline expired before operation could complete. For operations
|
|
34
|
-
* that change the state of the system, this error may be returned
|
|
35
|
-
* even if the operation has completed successfully. For example, a
|
|
36
|
-
* successful response from a server could have been delayed long
|
|
37
|
-
* enough for the deadline to expire.
|
|
38
|
-
*/
|
|
39
|
-
CanonicalCode[CanonicalCode["DEADLINE_EXCEEDED"] = 4] = "DEADLINE_EXCEEDED";
|
|
40
|
-
/**
|
|
41
|
-
* Some requested entity (e.g., file or directory) was not found.
|
|
42
|
-
*/
|
|
43
|
-
CanonicalCode[CanonicalCode["NOT_FOUND"] = 5] = "NOT_FOUND";
|
|
44
|
-
/**
|
|
45
|
-
* Some entity that we attempted to create (e.g., file or directory)
|
|
46
|
-
* already exists.
|
|
47
|
-
*/
|
|
48
|
-
CanonicalCode[CanonicalCode["ALREADY_EXISTS"] = 6] = "ALREADY_EXISTS";
|
|
49
|
-
/**
|
|
50
|
-
* The caller does not have permission to execute the specified
|
|
51
|
-
* operation. PERMISSION_DENIED must not be used for rejections
|
|
52
|
-
* caused by exhausting some resource (use RESOURCE_EXHAUSTED
|
|
53
|
-
* instead for those errors). PERMISSION_DENIED must not be
|
|
54
|
-
* used if the caller can not be identified (use UNAUTHENTICATED
|
|
55
|
-
* instead for those errors).
|
|
56
|
-
*/
|
|
57
|
-
CanonicalCode[CanonicalCode["PERMISSION_DENIED"] = 7] = "PERMISSION_DENIED";
|
|
58
|
-
/**
|
|
59
|
-
* Some resource has been exhausted, perhaps a per-user quota, or
|
|
60
|
-
* perhaps the entire file system is out of space.
|
|
61
|
-
*/
|
|
62
|
-
CanonicalCode[CanonicalCode["RESOURCE_EXHAUSTED"] = 8] = "RESOURCE_EXHAUSTED";
|
|
63
|
-
/**
|
|
64
|
-
* Operation was rejected because the system is not in a state
|
|
65
|
-
* required for the operation's execution. For example, directory
|
|
66
|
-
* to be deleted may be non-empty, an rmdir operation is applied to
|
|
67
|
-
* a non-directory, etc.
|
|
68
|
-
*
|
|
69
|
-
* A litmus test that may help a service implementor in deciding
|
|
70
|
-
* between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
|
|
71
|
-
*
|
|
72
|
-
* - Use UNAVAILABLE if the client can retry just the failing call.
|
|
73
|
-
* - Use ABORTED if the client should retry at a higher-level
|
|
74
|
-
* (e.g., restarting a read-modify-write sequence).
|
|
75
|
-
* - Use FAILED_PRECONDITION if the client should not retry until
|
|
76
|
-
* the system state has been explicitly fixed. E.g., if an "rmdir"
|
|
77
|
-
* fails because the directory is non-empty, FAILED_PRECONDITION
|
|
78
|
-
* should be returned since the client should not retry unless
|
|
79
|
-
* they have first fixed up the directory by deleting files from it.
|
|
80
|
-
* - Use FAILED_PRECONDITION if the client performs conditional
|
|
81
|
-
* REST Get/Update/Delete on a resource and the resource on the
|
|
82
|
-
* server does not match the condition. E.g., conflicting
|
|
83
|
-
* read-modify-write on the same resource.
|
|
84
|
-
*/
|
|
85
|
-
CanonicalCode[CanonicalCode["FAILED_PRECONDITION"] = 9] = "FAILED_PRECONDITION";
|
|
86
|
-
/**
|
|
87
|
-
* The operation was aborted, typically due to a concurrency issue
|
|
88
|
-
* like sequencer check failures, transaction aborts, etc.
|
|
89
|
-
*
|
|
90
|
-
* See litmus test above for deciding between FAILED_PRECONDITION,
|
|
91
|
-
* ABORTED, and UNAVAILABLE.
|
|
92
|
-
*/
|
|
93
|
-
CanonicalCode[CanonicalCode["ABORTED"] = 10] = "ABORTED";
|
|
94
|
-
/**
|
|
95
|
-
* Operation was attempted past the valid range. E.g., seeking or
|
|
96
|
-
* reading past end of file.
|
|
97
|
-
*
|
|
98
|
-
* Unlike INVALID_ARGUMENT, this error indicates a problem that may
|
|
99
|
-
* be fixed if the system state changes. For example, a 32-bit file
|
|
100
|
-
* system will generate INVALID_ARGUMENT if asked to read at an
|
|
101
|
-
* offset that is not in the range [0,2^32-1], but it will generate
|
|
102
|
-
* OUT_OF_RANGE if asked to read from an offset past the current
|
|
103
|
-
* file size.
|
|
104
|
-
*
|
|
105
|
-
* There is a fair bit of overlap between FAILED_PRECONDITION and
|
|
106
|
-
* OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific
|
|
107
|
-
* error) when it applies so that callers who are iterating through
|
|
108
|
-
* a space can easily look for an OUT_OF_RANGE error to detect when
|
|
109
|
-
* they are done.
|
|
110
|
-
*/
|
|
111
|
-
CanonicalCode[CanonicalCode["OUT_OF_RANGE"] = 11] = "OUT_OF_RANGE";
|
|
112
|
-
/**
|
|
113
|
-
* Operation is not implemented or not supported/enabled in this service.
|
|
114
|
-
*/
|
|
115
|
-
CanonicalCode[CanonicalCode["UNIMPLEMENTED"] = 12] = "UNIMPLEMENTED";
|
|
116
|
-
/**
|
|
117
|
-
* Internal errors. Means some invariants expected by underlying
|
|
118
|
-
* system has been broken. If you see one of these errors,
|
|
119
|
-
* something is very broken.
|
|
120
|
-
*/
|
|
121
|
-
CanonicalCode[CanonicalCode["INTERNAL"] = 13] = "INTERNAL";
|
|
122
|
-
/**
|
|
123
|
-
* The service is currently unavailable. This is a most likely a
|
|
124
|
-
* transient condition and may be corrected by retrying with
|
|
125
|
-
* a backoff.
|
|
126
|
-
*
|
|
127
|
-
* See litmus test above for deciding between FAILED_PRECONDITION,
|
|
128
|
-
* ABORTED, and UNAVAILABLE.
|
|
129
|
-
*/
|
|
130
|
-
CanonicalCode[CanonicalCode["UNAVAILABLE"] = 14] = "UNAVAILABLE";
|
|
131
|
-
/**
|
|
132
|
-
* Unrecoverable data loss or corruption.
|
|
133
|
-
*/
|
|
134
|
-
CanonicalCode[CanonicalCode["DATA_LOSS"] = 15] = "DATA_LOSS";
|
|
135
|
-
/**
|
|
136
|
-
* The request does not have valid authentication credentials for the
|
|
137
|
-
* operation.
|
|
138
|
-
*/
|
|
139
|
-
CanonicalCode[CanonicalCode["UNAUTHENTICATED"] = 16] = "UNAUTHENTICATED";
|
|
140
|
-
})(CanonicalCode = exports.CanonicalCode || (exports.CanonicalCode = {}));
|
|
21
|
+
StatusCode[StatusCode["ERROR"] = 2] = "ERROR";
|
|
22
|
+
})(StatusCode = exports.StatusCode || (exports.StatusCode = {}));
|
|
141
23
|
//# sourceMappingURL=status.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/trace/status.ts"],"names":[],"mappings":";;;AAsBA;;GAEG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/trace/status.ts"],"names":[],"mappings":";;;AAsBA;;GAEG;AACH,IAAY,UAcX;AAdD,WAAY,UAAU;IACpB;;;OAGG;IACH,uCAAM,CAAA;IACN;;OAEG;IACH,6CAAS,CAAA;IACT;;OAEG;IACH,6CAAS,CAAA;AACX,CAAC,EAdW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAcrB"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
export interface TraceState {
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* list of states.
|
|
3
|
+
* Create a new TraceState which inherits from this TraceState and has the
|
|
4
|
+
* given key set.
|
|
5
|
+
* The new entry will always be added in the front of the list of states.
|
|
6
6
|
*
|
|
7
7
|
* @param key key of the TraceState entry.
|
|
8
8
|
* @param value value of the TraceState entry.
|
|
9
9
|
*/
|
|
10
|
-
set(key: string, value: string):
|
|
10
|
+
set(key: string, value: string): TraceState;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Return a new TraceState which inherits from this TraceState but does not
|
|
13
|
+
* contain the given key.
|
|
13
14
|
*
|
|
14
|
-
* @param key the key for the TraceState
|
|
15
|
+
* @param key the key for the TraceState entry to be removed.
|
|
15
16
|
*/
|
|
16
|
-
unset(key: string):
|
|
17
|
+
unset(key: string): TraceState;
|
|
17
18
|
/**
|
|
18
19
|
* Returns the value to which the specified key is mapped, or `undefined` if
|
|
19
20
|
* this map contains no mapping for the key.
|
|
@@ -1,3 +1,18 @@
|
|
|
1
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
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
//# sourceMappingURL=trace_state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace_state.js","sourceRoot":"","sources":["../../../src/trace/trace_state.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"trace_state.js","sourceRoot":"","sources":["../../../src/trace/trace_state.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
package/build/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.14.0";
|
|
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.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Public API for OpenTelemetry",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"types": "build/src/index.d.ts",
|
|
@@ -52,31 +52,31 @@
|
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@opentelemetry/context-base": "^0.
|
|
55
|
+
"@opentelemetry/context-base": "^0.14.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@types/mocha": "8.0
|
|
59
|
-
"@types/node": "14.
|
|
60
|
-
"@types/sinon": "9.0.
|
|
61
|
-
"@types/webpack-env": "1.
|
|
62
|
-
"codecov": "3.
|
|
58
|
+
"@types/mocha": "8.2.0",
|
|
59
|
+
"@types/node": "14.14.12",
|
|
60
|
+
"@types/sinon": "9.0.9",
|
|
61
|
+
"@types/webpack-env": "1.16.0",
|
|
62
|
+
"codecov": "3.8.1",
|
|
63
63
|
"gts": "2.0.2",
|
|
64
64
|
"istanbul-instrumenter-loader": "3.0.1",
|
|
65
|
-
"karma": "5.
|
|
65
|
+
"karma": "5.2.3",
|
|
66
66
|
"karma-chrome-launcher": "3.1.0",
|
|
67
67
|
"karma-coverage-istanbul-reporter": "3.0.3",
|
|
68
68
|
"karma-mocha": "2.0.1",
|
|
69
69
|
"karma-spec-reporter": "0.0.32",
|
|
70
70
|
"karma-webpack": "4.0.2",
|
|
71
|
-
"linkinator": "2.
|
|
71
|
+
"linkinator": "2.8.0",
|
|
72
72
|
"mocha": "7.2.0",
|
|
73
73
|
"nyc": "15.1.0",
|
|
74
|
-
"sinon": "9.
|
|
75
|
-
"ts-loader": "8.0.
|
|
76
|
-
"ts-mocha": "
|
|
77
|
-
"typedoc": "0.
|
|
74
|
+
"sinon": "9.2.2",
|
|
75
|
+
"ts-loader": "8.0.12",
|
|
76
|
+
"ts-mocha": "8.0.0",
|
|
77
|
+
"typedoc": "0.19.2",
|
|
78
78
|
"typescript": "3.9.7",
|
|
79
|
-
"webpack": "4.44.
|
|
79
|
+
"webpack": "4.44.2"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "27a8d4530c56257c191468b073669909bf8892a1"
|
|
82
82
|
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Context } from '@opentelemetry/context-base';
|
|
2
|
-
import { SetterFunction } from './setter';
|
|
3
|
-
import { GetterFunction } from './getter';
|
|
4
|
-
/**
|
|
5
|
-
* Injects `Context` into and extracts it from carriers that travel
|
|
6
|
-
* in-band across process boundaries. Encoding is expected to conform to the
|
|
7
|
-
* HTTP Header Field semantics. Values are often encoded as RPC/HTTP request
|
|
8
|
-
* headers.
|
|
9
|
-
*
|
|
10
|
-
* The carrier of propagated data on both the client (injector) and server
|
|
11
|
-
* (extractor) side is usually an object such as http headers. Propagation is
|
|
12
|
-
* usually implemented via library-specific request interceptors, where the
|
|
13
|
-
* client-side injects values and the server-side extracts them.
|
|
14
|
-
*/
|
|
15
|
-
export interface HttpTextPropagator {
|
|
16
|
-
/**
|
|
17
|
-
* Injects values from a given `Context` into a carrier.
|
|
18
|
-
*
|
|
19
|
-
* OpenTelemetry defines a common set of format values (HttpTextPropagator),
|
|
20
|
-
* and each has an expected `carrier` type.
|
|
21
|
-
*
|
|
22
|
-
* @param context the Context from which to extract values to transmit over
|
|
23
|
-
* the wire.
|
|
24
|
-
* @param carrier the carrier of propagation fields, such as http request
|
|
25
|
-
* headers.
|
|
26
|
-
* @param setter a function which accepts a carrier, key, and value, which
|
|
27
|
-
* sets the key on the carrier to the value.
|
|
28
|
-
*/
|
|
29
|
-
inject(context: Context, carrier: unknown, setter: SetterFunction): void;
|
|
30
|
-
/**
|
|
31
|
-
* Given a `Context` and a carrier, extract context values from a
|
|
32
|
-
* carrier and return a new context, created from the old context, with the
|
|
33
|
-
* extracted values.
|
|
34
|
-
*
|
|
35
|
-
* @param context the Context from which to extract values to transmit over
|
|
36
|
-
* the wire.
|
|
37
|
-
* @param carrier the carrier of propagation fields, such as http request
|
|
38
|
-
* headers.
|
|
39
|
-
* @param getter a function which accepts a carrier and a key, and returns
|
|
40
|
-
* the value from the carrier identified by the key.
|
|
41
|
-
*/
|
|
42
|
-
extract(context: Context, carrier: unknown, getter: GetterFunction): Context;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=HttpTextPropagator.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
//# sourceMappingURL=HttpTextPropagator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HttpTextPropagator.js","sourceRoot":"","sources":["../../../../src/context/propagation/HttpTextPropagator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Context } from '@opentelemetry/context-base';
|
|
2
|
-
import { HttpTextPropagator } from './HttpTextPropagator';
|
|
3
|
-
/**
|
|
4
|
-
* No-op implementations of {@link HttpTextPropagator}.
|
|
5
|
-
*/
|
|
6
|
-
export declare class NoopHttpTextPropagator implements HttpTextPropagator {
|
|
7
|
-
/** Noop inject function does nothing */
|
|
8
|
-
inject(context: Context, carrier: unknown, setter: Function): void;
|
|
9
|
-
/** Noop extract function does nothing and returns the input context */
|
|
10
|
-
extract(context: Context, carrier: unknown, getter: Function): Context;
|
|
11
|
-
}
|
|
12
|
-
export declare const NOOP_HTTP_TEXT_PROPAGATOR: NoopHttpTextPropagator;
|
|
13
|
-
//# sourceMappingURL=NoopHttpTextPropagator.d.ts.map
|
|
@@ -1,35 +0,0 @@
|
|
|
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.NOOP_HTTP_TEXT_PROPAGATOR = exports.NoopHttpTextPropagator = void 0;
|
|
19
|
-
/**
|
|
20
|
-
* No-op implementations of {@link HttpTextPropagator}.
|
|
21
|
-
*/
|
|
22
|
-
var NoopHttpTextPropagator = /** @class */ (function () {
|
|
23
|
-
function NoopHttpTextPropagator() {
|
|
24
|
-
}
|
|
25
|
-
/** Noop inject function does nothing */
|
|
26
|
-
NoopHttpTextPropagator.prototype.inject = function (context, carrier, setter) { };
|
|
27
|
-
/** Noop extract function does nothing and returns the input context */
|
|
28
|
-
NoopHttpTextPropagator.prototype.extract = function (context, carrier, getter) {
|
|
29
|
-
return context;
|
|
30
|
-
};
|
|
31
|
-
return NoopHttpTextPropagator;
|
|
32
|
-
}());
|
|
33
|
-
exports.NoopHttpTextPropagator = NoopHttpTextPropagator;
|
|
34
|
-
exports.NOOP_HTTP_TEXT_PROPAGATOR = new NoopHttpTextPropagator();
|
|
35
|
-
//# sourceMappingURL=NoopHttpTextPropagator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare type GetterFunction<Carrier = any> = (carrier: Carrier, key: string) => unknown;
|
|
2
|
-
/**
|
|
3
|
-
* Default getter which just does a simple property access. Returns
|
|
4
|
-
* undefined if the key is not set.
|
|
5
|
-
*
|
|
6
|
-
* @param carrier
|
|
7
|
-
* @param key
|
|
8
|
-
*/
|
|
9
|
-
export declare function defaultGetter(carrier: any, key: string): unknown;
|
|
10
|
-
//# sourceMappingURL=getter.d.ts.map
|
|
@@ -1,30 +0,0 @@
|
|
|
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.defaultGetter = void 0;
|
|
19
|
-
/**
|
|
20
|
-
* Default getter which just does a simple property access. Returns
|
|
21
|
-
* undefined if the key is not set.
|
|
22
|
-
*
|
|
23
|
-
* @param carrier
|
|
24
|
-
* @param key
|
|
25
|
-
*/
|
|
26
|
-
function defaultGetter(carrier, key) {
|
|
27
|
-
return carrier[key];
|
|
28
|
-
}
|
|
29
|
-
exports.defaultGetter = defaultGetter;
|
|
30
|
-
//# sourceMappingURL=getter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getter.js","sourceRoot":"","sources":["../../../../src/context/propagation/getter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAOH;;;;;;GAMG;AACH,SAAgB,aAAa,CAAC,OAAY,EAAE,GAAW;IACrD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;AACtB,CAAC;AAFD,sCAEC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare type SetterFunction<Carrier = any> = (carrier: Carrier, key: string, value: unknown) => void;
|
|
2
|
-
/**
|
|
3
|
-
* Default setter which sets value via direct property access
|
|
4
|
-
*
|
|
5
|
-
* @param carrier
|
|
6
|
-
* @param key
|
|
7
|
-
*/
|
|
8
|
-
export declare function defaultSetter(carrier: any, key: string, value: unknown): void;
|
|
9
|
-
//# sourceMappingURL=setter.d.ts.map
|
|
@@ -1,29 +0,0 @@
|
|
|
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.defaultSetter = void 0;
|
|
19
|
-
/**
|
|
20
|
-
* Default setter which sets value via direct property access
|
|
21
|
-
*
|
|
22
|
-
* @param carrier
|
|
23
|
-
* @param key
|
|
24
|
-
*/
|
|
25
|
-
function defaultSetter(carrier, key, value) {
|
|
26
|
-
carrier[key] = value;
|
|
27
|
-
}
|
|
28
|
-
exports.defaultSetter = defaultSetter;
|
|
29
|
-
//# sourceMappingURL=setter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setter.js","sourceRoot":"","sources":["../../../../src/context/propagation/setter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,OAAY,EAAE,GAAW,EAAE,KAAc;IACrE,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AACvB,CAAC;AAFD,sCAEC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
//# sourceMappingURL=CorrelationContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CorrelationContext.js","sourceRoot":"","sources":["../../../src/correlation_context/CorrelationContext.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EntryValue.js","sourceRoot":"","sources":["../../../src/correlation_context/EntryValue.ts"],"names":[],"mappings":";;;AAyBA;;;;GAIG;AACH,IAAY,QASX;AATD,WAAY,QAAQ;IAClB;;;OAGG;IACH,2DAAkB,CAAA;IAElB,0DAA0D;IAC1D,0EAA0B,CAAA;AAC5B,CAAC,EATW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QASnB"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface MetricObservable {
|
|
2
|
-
/**
|
|
3
|
-
* Sets the next value for observable metric
|
|
4
|
-
* @param value
|
|
5
|
-
*/
|
|
6
|
-
next: (value: number) => void;
|
|
7
|
-
/**
|
|
8
|
-
* Subscribes for every value change
|
|
9
|
-
* @param callback
|
|
10
|
-
*/
|
|
11
|
-
subscribe: (callback: (value: number) => void) => void;
|
|
12
|
-
/**
|
|
13
|
-
* Removes the subscriber
|
|
14
|
-
* @param [callback]
|
|
15
|
-
*/
|
|
16
|
-
unsubscribe: (callback?: (value: number) => void) => void;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=MetricObservable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MetricObservable.js","sourceRoot":"","sources":["../../../src/metrics/MetricObservable.ts"],"names":[],"mappings":""}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { MeterProvider } from '../..';
|
|
2
|
-
import { Logger } from '../../common/Logger';
|
|
3
|
-
import { TracerProvider } from '../tracer_provider';
|
|
4
|
-
/** Interface BasePlugin to apply patch. */
|
|
5
|
-
export interface BasePlugin<T = any> {
|
|
6
|
-
/** Instrumentation Name */
|
|
7
|
-
instrumentationName: string;
|
|
8
|
-
/** Instrumentation Versionn */
|
|
9
|
-
instrumentationVersion: string;
|
|
10
|
-
/** Module definition */
|
|
11
|
-
module: BasePluginModuleDefinition | BasePluginModuleDefinition[];
|
|
12
|
-
/** Method to disable the instrumentation */
|
|
13
|
-
disable(): void;
|
|
14
|
-
/** Method to enable the instrumentation */
|
|
15
|
-
enable(): void;
|
|
16
|
-
/** Method to patch the instrumentation */
|
|
17
|
-
patch<T>(exports: T, name: string, baseDir?: string): T;
|
|
18
|
-
/** Method to set tracer provider */
|
|
19
|
-
setTracerProvider(tracerProvider: TracerProvider): void;
|
|
20
|
-
/** Method to set meter provider */
|
|
21
|
-
setMeterProvider(meterProvider: MeterProvider): void;
|
|
22
|
-
/**
|
|
23
|
-
* Contains all supported versions.
|
|
24
|
-
* All versions must be compatible with [semver](https://semver.org/spec/v2.0.0.html) format.
|
|
25
|
-
* If the version is not supported, we won't apply instrumentation patch (see `enable` method).
|
|
26
|
-
* If omitted, all versions of the module will be patched.
|
|
27
|
-
*/
|
|
28
|
-
supportedVersions?: string[];
|
|
29
|
-
/** Method to unpatch the instrumentation */
|
|
30
|
-
unpatch(): void;
|
|
31
|
-
}
|
|
32
|
-
export interface BasePluginConfig {
|
|
33
|
-
/**
|
|
34
|
-
* Whether to enable the plugin.
|
|
35
|
-
* @default true
|
|
36
|
-
*/
|
|
37
|
-
enabled?: boolean;
|
|
38
|
-
logger?: Logger;
|
|
39
|
-
/**
|
|
40
|
-
* Request methods that match any string in ignoreMethods will not be traced.
|
|
41
|
-
*/
|
|
42
|
-
ignoreMethods?: string[];
|
|
43
|
-
/**
|
|
44
|
-
* Path of the trace plugin to load.
|
|
45
|
-
* @default '@opentelemetry/plugin-http' in case of http.
|
|
46
|
-
*/
|
|
47
|
-
path?: string;
|
|
48
|
-
}
|
|
49
|
-
export interface BasePluginModuleFile {
|
|
50
|
-
/** Name of file to be patched with relative path */
|
|
51
|
-
name: string;
|
|
52
|
-
/** Method to patch the instrumentation */
|
|
53
|
-
patch<T>(exports: T): T;
|
|
54
|
-
/** Method to unpatch the instrumentation */
|
|
55
|
-
unpatch(): void;
|
|
56
|
-
}
|
|
57
|
-
export interface BasePluginModuleDefinition {
|
|
58
|
-
/** Module name */
|
|
59
|
-
name: string;
|
|
60
|
-
/** Module internal files to be patched */
|
|
61
|
-
files?: BasePluginModuleFile[];
|
|
62
|
-
/** Supported version of module */
|
|
63
|
-
supportedVersions?: string[];
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=BasePlugin.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
//# sourceMappingURL=BasePlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BasePlugin.js","sourceRoot":"","sources":["../../../../src/trace/instrumentation/BasePlugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
|