@opentelemetry/sdk-node 0.34.0 → 0.35.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 +4 -0
- package/build/src/TracerProviderWithEnvExporter.d.ts +1 -0
- package/build/src/TracerProviderWithEnvExporter.js +34 -22
- package/build/src/TracerProviderWithEnvExporter.js.map +1 -1
- package/build/src/sdk.d.ts +1 -0
- package/build/src/sdk.js +26 -7
- package/build/src/sdk.js.map +1 -1
- package/build/src/types.js.map +1 -1
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +1 -1
- package/build/src/version.js.map +1 -1
- package/package.json +18 -18
package/README.md
CHANGED
|
@@ -139,6 +139,10 @@ Configure tracing parameters. These are the same trace parameters used to [confi
|
|
|
139
139
|
|
|
140
140
|
Configure the [service name](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/README.md#service).
|
|
141
141
|
|
|
142
|
+
## Disable the SDK from the environment
|
|
143
|
+
|
|
144
|
+
Disable the SDK by setting the `OTEL_SDK_DISABLED` environment variable to `true`.
|
|
145
|
+
|
|
142
146
|
## Configure Trace Exporter from Environment
|
|
143
147
|
|
|
144
148
|
This is an alternative to programmatically configuring an exporter or span processor. This package will auto setup the default `otlp` exporter with `http/protobuf` protocol if `traceExporter` or `spanProcessor` hasn't been passed into the `NodeSDK` constructor.
|
|
@@ -10,6 +10,7 @@ export declare class TracerProviderWithEnvExporters extends NodeTracerProvider {
|
|
|
10
10
|
constructor(config?: NodeTracerConfig);
|
|
11
11
|
addSpanProcessor(spanProcessor: SpanProcessor): void;
|
|
12
12
|
register(config?: SDKRegistrationConfig): void;
|
|
13
|
+
private createExportersFromList;
|
|
13
14
|
private configureSpanProcessors;
|
|
14
15
|
private filterBlanksAndNulls;
|
|
15
16
|
}
|
|
@@ -32,23 +32,25 @@ class TracerProviderWithEnvExporters extends sdk_trace_node_1.NodeTracerProvider
|
|
|
32
32
|
this._configuredExporters = [];
|
|
33
33
|
this._hasSpanProcessors = false;
|
|
34
34
|
let traceExportersList = this.filterBlanksAndNulls(Array.from(new Set((0, core_1.getEnv)().OTEL_TRACES_EXPORTER.split(','))));
|
|
35
|
-
if (traceExportersList
|
|
36
|
-
api_1.diag.warn('OTEL_TRACES_EXPORTER contains "none"
|
|
35
|
+
if (traceExportersList[0] === 'none') {
|
|
36
|
+
api_1.diag.warn('OTEL_TRACES_EXPORTER contains "none". SDK will not be initialized.');
|
|
37
|
+
}
|
|
38
|
+
else if (traceExportersList.length === 0) {
|
|
39
|
+
api_1.diag.warn('OTEL_TRACES_EXPORTER is empty. Using default otlp exporter.');
|
|
40
|
+
traceExportersList = ['otlp'];
|
|
41
|
+
this.createExportersFromList(traceExportersList);
|
|
42
|
+
this._spanProcessors = this.configureSpanProcessors(this._configuredExporters);
|
|
43
|
+
this._spanProcessors.forEach(processor => {
|
|
44
|
+
this.addSpanProcessor(processor);
|
|
45
|
+
});
|
|
37
46
|
}
|
|
38
47
|
else {
|
|
39
|
-
if (traceExportersList.length > 1 &&
|
|
48
|
+
if (traceExportersList.length > 1 &&
|
|
49
|
+
traceExportersList.includes('none')) {
|
|
40
50
|
api_1.diag.warn('OTEL_TRACES_EXPORTER contains "none" along with other exporters. Using default otlp exporter.');
|
|
41
51
|
traceExportersList = ['otlp'];
|
|
42
52
|
}
|
|
43
|
-
|
|
44
|
-
const exporter = this._getSpanExporter(exporterName);
|
|
45
|
-
if (exporter) {
|
|
46
|
-
this._configuredExporters.push(exporter);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
api_1.diag.warn(`Unrecognized OTEL_TRACES_EXPORTER value: ${exporterName}.`);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
53
|
+
this.createExportersFromList(traceExportersList);
|
|
52
54
|
if (this._configuredExporters.length > 0) {
|
|
53
55
|
this._spanProcessors = this.configureSpanProcessors(this._configuredExporters);
|
|
54
56
|
this._spanProcessors.forEach(processor => {
|
|
@@ -64,20 +66,20 @@ class TracerProviderWithEnvExporters extends sdk_trace_node_1.NodeTracerProvider
|
|
|
64
66
|
const protocol = this.getOtlpProtocol();
|
|
65
67
|
switch (protocol) {
|
|
66
68
|
case 'grpc':
|
|
67
|
-
return new exporter_trace_otlp_grpc_1.OTLPTraceExporter;
|
|
69
|
+
return new exporter_trace_otlp_grpc_1.OTLPTraceExporter();
|
|
68
70
|
case 'http/json':
|
|
69
|
-
return new exporter_trace_otlp_http_1.OTLPTraceExporter;
|
|
71
|
+
return new exporter_trace_otlp_http_1.OTLPTraceExporter();
|
|
70
72
|
case 'http/protobuf':
|
|
71
|
-
return new exporter_trace_otlp_proto_1.OTLPTraceExporter;
|
|
73
|
+
return new exporter_trace_otlp_proto_1.OTLPTraceExporter();
|
|
72
74
|
default:
|
|
73
75
|
api_1.diag.warn(`Unsupported OTLP traces protocol: ${protocol}. Using http/protobuf.`);
|
|
74
|
-
return new exporter_trace_otlp_proto_1.OTLPTraceExporter;
|
|
76
|
+
return new exporter_trace_otlp_proto_1.OTLPTraceExporter();
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
79
|
static getOtlpProtocol() {
|
|
78
80
|
var _b, _c, _d;
|
|
79
81
|
const parsedEnvValues = (0, core_1.getEnvWithoutDefaults)();
|
|
80
|
-
return (_d = (_c = (_b = parsedEnvValues.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL) !== null && _b !== void 0 ? _b : parsedEnvValues.OTEL_EXPORTER_OTLP_PROTOCOL) !== null && _c !== void 0 ? _c : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_PROTOCOL) !== null && _d !== void 0 ? _d : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_PROTOCOL;
|
|
82
|
+
return ((_d = (_c = (_b = parsedEnvValues.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL) !== null && _b !== void 0 ? _b : parsedEnvValues.OTEL_EXPORTER_OTLP_PROTOCOL) !== null && _c !== void 0 ? _c : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_PROTOCOL) !== null && _d !== void 0 ? _d : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_PROTOCOL);
|
|
81
83
|
}
|
|
82
84
|
addSpanProcessor(spanProcessor) {
|
|
83
85
|
super.addSpanProcessor(spanProcessor);
|
|
@@ -88,6 +90,17 @@ class TracerProviderWithEnvExporters extends sdk_trace_node_1.NodeTracerProvider
|
|
|
88
90
|
super.register(config);
|
|
89
91
|
}
|
|
90
92
|
}
|
|
93
|
+
createExportersFromList(exporterList) {
|
|
94
|
+
exporterList.forEach(exporterName => {
|
|
95
|
+
const exporter = this._getSpanExporter(exporterName);
|
|
96
|
+
if (exporter) {
|
|
97
|
+
this._configuredExporters.push(exporter);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
api_1.diag.warn(`Unrecognized OTEL_TRACES_EXPORTER value: ${exporterName}.`);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
91
104
|
configureSpanProcessors(exporters) {
|
|
92
105
|
return exporters.map(exporter => {
|
|
93
106
|
if (exporter instanceof sdk_trace_base_1.ConsoleSpanExporter) {
|
|
@@ -99,16 +112,15 @@ class TracerProviderWithEnvExporters extends sdk_trace_node_1.NodeTracerProvider
|
|
|
99
112
|
});
|
|
100
113
|
}
|
|
101
114
|
filterBlanksAndNulls(list) {
|
|
102
|
-
return list.map(item => item.trim())
|
|
103
|
-
.filter(s => s !== 'null' && s !== '');
|
|
115
|
+
return list.map(item => item.trim()).filter(s => s !== 'null' && s !== '');
|
|
104
116
|
}
|
|
105
117
|
}
|
|
106
118
|
exports.TracerProviderWithEnvExporters = TracerProviderWithEnvExporters;
|
|
107
119
|
_a = TracerProviderWithEnvExporters;
|
|
108
120
|
TracerProviderWithEnvExporters._registeredExporters = new Map([
|
|
109
121
|
['otlp', () => _a.configureOtlp()],
|
|
110
|
-
['zipkin', () => new exporter_zipkin_1.ZipkinExporter],
|
|
111
|
-
['jaeger', () => new exporter_jaeger_1.JaegerExporter],
|
|
112
|
-
['console', () => new sdk_trace_base_1.ConsoleSpanExporter]
|
|
122
|
+
['zipkin', () => new exporter_zipkin_1.ZipkinExporter()],
|
|
123
|
+
['jaeger', () => new exporter_jaeger_1.JaegerExporter()],
|
|
124
|
+
['console', () => new sdk_trace_base_1.ConsoleSpanExporter()],
|
|
113
125
|
]);
|
|
114
126
|
//# sourceMappingURL=TracerProviderWithEnvExporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TracerProviderWithEnvExporter.js","sourceRoot":"","sources":["../../src/TracerProviderWithEnvExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH,4CAA0C;AAC1C,8CAAoE;AACpE,
|
|
1
|
+
{"version":3,"file":"TracerProviderWithEnvExporter.js","sourceRoot":"","sources":["../../src/TracerProviderWithEnvExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH,4CAA0C;AAC1C,8CAAoE;AACpE,kEAOuC;AACvC,kEAGuC;AACvC,wFAAuG;AACvG,sFAAqG;AACrG,sFAAqG;AACrG,oEAAgE;AAChE,oEAAgE;AAEhE,MAAa,8BAA+B,SAAQ,mCAAkB;IA4CpE,YAAmB,SAA2B,EAAE;QAC9C,KAAK,CAAC,MAAM,CAAC,CAAC;QA5CR,yBAAoB,GAAmB,EAAE,CAAC;QAE1C,uBAAkB,GAAY,KAAK,CAAC;QA2C1C,IAAI,kBAAkB,GAAG,IAAI,CAAC,oBAAoB,CAChD,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,IAAA,aAAM,GAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAC9D,CAAC;QAEF,IAAI,kBAAkB,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE;YACpC,UAAI,CAAC,IAAI,CACP,oEAAoE,CACrE,CAAC;SACH;aAAM,IAAI,kBAAkB,CAAC,MAAM,KAAK,C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,oCAAmB,CAAC,QAAQ,CAAC,CAAC;aAC1C;iBAAM;gBACL,OAAO,IAAI,mCAAkB,CAAC,QAAQ,CAAC,CAAC;aACzC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,oBAAoB,CAAC,IAAc;QACzC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IAC7E,CAAC;;AAlIH,wEAmIC;;AAjG2B,mDAAoB,GAAG,IAAI,GAAG,CAGtD;IACA,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,EAAI,CAAC,aAAa,EAAE,CAAC;IACpC,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,gCAAc,EAAE,CAAC;IACtC,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,gCAAc,EAAE,CAAC;IACtC,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,oCAAmB,EAAE,CAAC;CAC7C,CAAE,CAAA","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\nimport { getEnv, getEnvWithoutDefaults } from '@opentelemetry/core';\nimport {\n ConsoleSpanExporter,\n SpanExporter,\n BatchSpanProcessor,\n SimpleSpanProcessor,\n SDKRegistrationConfig,\n SpanProcessor,\n} from '@opentelemetry/sdk-trace-base';\nimport {\n NodeTracerConfig,\n NodeTracerProvider,\n} from '@opentelemetry/sdk-trace-node';\nimport { OTLPTraceExporter as OTLPProtoTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto';\nimport { OTLPTraceExporter as OTLPHttpTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';\nimport { OTLPTraceExporter as OTLPGrpcTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc';\nimport { ZipkinExporter } from '@opentelemetry/exporter-zipkin';\nimport { JaegerExporter } from '@opentelemetry/exporter-jaeger';\n\nexport class TracerProviderWithEnvExporters extends NodeTracerProvider {\n private _configuredExporters: SpanExporter[] = [];\n private _spanProcessors: SpanProcessor[] | undefined;\n private _hasSpanProcessors: boolean = false;\n\n static configureOtlp(): SpanExporter {\n const protocol = this.getOtlpProtocol();\n\n switch (protocol) {\n case 'grpc':\n return new OTLPGrpcTraceExporter();\n case 'http/json':\n return new OTLPHttpTraceExporter();\n case 'http/protobuf':\n return new OTLPProtoTraceExporter();\n default:\n diag.warn(\n `Unsupported OTLP traces protocol: ${protocol}. Using http/protobuf.`\n );\n return new OTLPProtoTraceExporter();\n }\n }\n\n static getOtlpProtocol(): string {\n const parsedEnvValues = getEnvWithoutDefaults();\n\n return (\n parsedEnvValues.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL ??\n parsedEnvValues.OTEL_EXPORTER_OTLP_PROTOCOL ??\n getEnv().OTEL_EXPORTER_OTLP_TRACES_PROTOCOL ??\n getEnv().OTEL_EXPORTER_OTLP_PROTOCOL\n );\n }\n\n protected static override _registeredExporters = new Map<\n string,\n () => SpanExporter\n >([\n ['otlp', () => this.configureOtlp()],\n ['zipkin', () => new ZipkinExporter()],\n ['jaeger', () => new JaegerExporter()],\n ['console', () => new ConsoleSpanExporter()],\n ]);\n\n public constructor(config: NodeTracerConfig = {}) {\n super(config);\n let traceExportersList = this.filterBlanksAndNulls(\n Array.from(new Set(getEnv().OTEL_TRACES_EXPORTER.split(',')))\n );\n\n if (traceExportersList[0] === 'none') {\n diag.warn(\n 'OTEL_TRACES_EXPORTER contains \"none\". SDK will not be initialized.'\n );\n } else if (traceExportersList.length === 0) {\n diag.warn('OTEL_TRACES_EXPORTER is empty. Using default otlp exporter.');\n\n traceExportersList = ['otlp'];\n this.createExportersFromList(traceExportersList);\n\n this._spanProcessors = this.configureSpanProcessors(\n this._configuredExporters\n );\n this._spanProcessors.forEach(processor => {\n this.addSpanProcessor(processor);\n });\n } else {\n if (\n traceExportersList.length > 1 &&\n traceExportersList.includes('none')\n ) {\n diag.warn(\n 'OTEL_TRACES_EXPORTER contains \"none\" along with other exporters. Using default otlp exporter.'\n );\n traceExportersList = ['otlp'];\n }\n\n this.createExportersFromList(traceExportersList);\n\n if (this._configuredExporters.length > 0) {\n this._spanProcessors = this.configureSpanProcessors(\n this._configuredExporters\n );\n this._spanProcessors.forEach(processor => {\n this.addSpanProcessor(processor);\n });\n } else {\n diag.warn(\n 'Unable to set up trace exporter(s) due to invalid exporter and/or protocol values.'\n );\n }\n }\n }\n\n override addSpanProcessor(spanProcessor: SpanProcessor) {\n super.addSpanProcessor(spanProcessor);\n this._hasSpanProcessors = true;\n }\n\n override register(config?: SDKRegistrationConfig) {\n if (this._hasSpanProcessors) {\n super.register(config);\n }\n }\n\n private createExportersFromList(exporterList: string[]) {\n exporterList.forEach(exporterName => {\n const exporter = this._getSpanExporter(exporterName);\n if (exporter) {\n this._configuredExporters.push(exporter);\n } else {\n diag.warn(`Unrecognized OTEL_TRACES_EXPORTER value: ${exporterName}.`);\n }\n });\n }\n\n private configureSpanProcessors(\n exporters: SpanExporter[]\n ): (BatchSpanProcessor | SimpleSpanProcessor)[] {\n return exporters.map(exporter => {\n if (exporter instanceof ConsoleSpanExporter) {\n return new SimpleSpanProcessor(exporter);\n } else {\n return new BatchSpanProcessor(exporter);\n }\n });\n }\n\n private filterBlanksAndNulls(list: string[]): string[] {\n return list.map(item => item.trim()).filter(s => s !== 'null' && s !== '');\n }\n}\n"]}
|
package/build/src/sdk.d.ts
CHANGED
package/build/src/sdk.js
CHANGED
|
@@ -24,14 +24,23 @@ const sdk_trace_base_1 = require("@opentelemetry/sdk-trace-base");
|
|
|
24
24
|
const sdk_trace_node_1 = require("@opentelemetry/sdk-trace-node");
|
|
25
25
|
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
|
|
26
26
|
const TracerProviderWithEnvExporter_1 = require("./TracerProviderWithEnvExporter");
|
|
27
|
+
const core_1 = require("@opentelemetry/core");
|
|
27
28
|
class NodeSDK {
|
|
28
29
|
/**
|
|
29
30
|
* Create a new NodeJS SDK instance
|
|
30
31
|
*/
|
|
31
32
|
constructor(configuration = {}) {
|
|
32
33
|
var _a, _b, _c, _d;
|
|
34
|
+
if ((0, core_1.getEnv)().OTEL_SDK_DISABLED) {
|
|
35
|
+
this._disabled = true;
|
|
36
|
+
// Functions with possible side-effects are set
|
|
37
|
+
// to no-op via the _disabled flag
|
|
38
|
+
}
|
|
33
39
|
this._resource = (_a = configuration.resource) !== null && _a !== void 0 ? _a : new resources_1.Resource({});
|
|
34
|
-
this._resourceDetectors = (_b = configuration.resourceDetectors) !== null && _b !== void 0 ? _b : [
|
|
40
|
+
this._resourceDetectors = (_b = configuration.resourceDetectors) !== null && _b !== void 0 ? _b : [
|
|
41
|
+
resources_1.envDetector,
|
|
42
|
+
resources_1.processDetector,
|
|
43
|
+
];
|
|
35
44
|
this._serviceName = configuration.serviceName;
|
|
36
45
|
this._autoDetectResources = (_c = configuration.autoDetectResources) !== null && _c !== void 0 ? _c : true;
|
|
37
46
|
if (configuration.spanProcessor || configuration.traceExporter) {
|
|
@@ -96,6 +105,9 @@ class NodeSDK {
|
|
|
96
105
|
}
|
|
97
106
|
/** Detect resource attributes */
|
|
98
107
|
async detectResources() {
|
|
108
|
+
if (this._disabled) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
99
111
|
const internalConfig = {
|
|
100
112
|
detectors: this._resourceDetectors,
|
|
101
113
|
};
|
|
@@ -110,13 +122,21 @@ class NodeSDK {
|
|
|
110
122
|
*/
|
|
111
123
|
async start() {
|
|
112
124
|
var _a, _b, _c, _d, _e;
|
|
125
|
+
if (this._disabled) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
113
128
|
if (this._autoDetectResources) {
|
|
114
129
|
await this.detectResources();
|
|
115
130
|
}
|
|
116
|
-
this._resource =
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
131
|
+
this._resource =
|
|
132
|
+
this._serviceName === undefined
|
|
133
|
+
? this._resource
|
|
134
|
+
: this._resource.merge(new resources_1.Resource({
|
|
135
|
+
[semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME]: this._serviceName,
|
|
136
|
+
}));
|
|
137
|
+
const Provider = this._tracerProviderConfig
|
|
138
|
+
? sdk_trace_node_1.NodeTracerProvider
|
|
139
|
+
: TracerProviderWithEnvExporter_1.TracerProviderWithEnvExporters;
|
|
120
140
|
const tracerProvider = new Provider(Object.assign(Object.assign({}, (_a = this._tracerProviderConfig) === null || _a === void 0 ? void 0 : _a.tracerConfig), { resource: this._resource }));
|
|
121
141
|
this._tracerProvider = tracerProvider;
|
|
122
142
|
if (this._tracerProviderConfig) {
|
|
@@ -151,8 +171,7 @@ class NodeSDK {
|
|
|
151
171
|
}
|
|
152
172
|
return (Promise.all(promises)
|
|
153
173
|
// return void instead of the array from Promise.all
|
|
154
|
-
.then(() => {
|
|
155
|
-
}));
|
|
174
|
+
.then(() => { }));
|
|
156
175
|
}
|
|
157
176
|
}
|
|
158
177
|
exports.NodeSDK = NodeSDK;
|
package/build/src/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAAgF;AAChF,oEAGwC;AACxC,wDAOkC;AAClC,4DAA+E;AAC/E,kEAGuC;AACvC,kEAAqF;AACrF,8EAAiF;AAEjF,mFAAiF;AAcjF,MAAa,OAAO;IA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CAAC,qBAAqB,0CAAE,iBAAiB;SAC1D,CAAC,CAAC;QAEH,IAAI,IAAI,CAAC,oBAAoB,EAAE;YAC7B,MAAM,aAAa,GAAG,IAAI,2BAAa,CAAC;gBACtC,QAAQ,EAAE,IAAI,CAAC,SAAS;gBACxB,KAAK,EAAE,MAAA,MAAA,IAAI,CAAC,oBAAoB,0CAAE,KAAK,mCAAI,EAAE;aAC9C,CAAC,CAAC;YAEH,IAAI,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE;gBACpC,aAAa,CAAC,eAAe,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;aACjE;YAED,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;YAEpC,aAAO,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC;SAC/C;QAED,IAAA,0CAAwB,EAAC;YACvB,gBAAgB,EAAE,IAAI,CAAC,iBAAiB;SACzC,CAAC,CAAC;IACL,CAAC;IAEM,QAAQ;QACb,MAAM,QAAQ,GAAuB,EAAE,CAAC;QACxC,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,CAAC;SAChD;QACD,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC;SAC/C;QAED,OAAO,CACL,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;YACnB,oDAAoD;aACnD,IAAI,CAAC,GAAG,EAAE;QACX,CAAC,CAAC,CACL,CAAC;IACJ,CAAC;CACF;AAvMD,0BAuMC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ContextManager, TextMapPropagator, metrics } from '@opentelemetry/api';\nimport {\n InstrumentationOption,\n registerInstrumentations\n} from '@opentelemetry/instrumentation';\nimport {\n Detector,\n detectResources,\n envDetector,\n processDetector,\n Resource,\n ResourceDetectionConfig\n} from '@opentelemetry/resources';\nimport { MeterProvider, MetricReader, View } from '@opentelemetry/sdk-metrics';\nimport {\n BatchSpanProcessor,\n SpanProcessor,\n} from '@opentelemetry/sdk-trace-base';\nimport { NodeTracerConfig, NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { NodeSDKConfiguration } from './types';\nimport { TracerProviderWithEnvExporters } from './TracerProviderWithEnvExporter';\n\n/** This class represents everything needed to register a fully configured OpenTelemetry Node.js SDK */\n\nexport type MeterProviderConfig = {\n /**\n * Reference to the MetricReader instance by the NodeSDK\n */\n reader?: MetricReader\n /**\n * List of {@link View}s that should be passed to the MeterProvider\n */\n views?: View[]\n};\nexport class NodeSDK {\n private _tracerProviderConfig?: {\n tracerConfig: NodeTracerConfig;\n spanProcessor: SpanProcessor;\n contextManager?: ContextManager;\n textMapPropagator?: TextMapPropagator;\n };\n private _meterProviderConfig?: MeterProviderConfig;\n private _instrumentations: InstrumentationOption[];\n\n private _resource: Resource;\n private _resourceDetectors: Detector[];\n\n private _autoDetectResources: boolean;\n\n private _tracerProvider?: NodeTracerProvider | TracerProviderWithEnvExporters;\n private _meterProvider?: MeterProvider;\n private _serviceName?: string;\n\n /**\n * Create a new NodeJS SDK instance\n */\n public constructor(configuration: Partial<NodeSDKConfiguration> = {}) {\n this._resource = configuration.resource ?? new Resource({});\n this._resourceDetectors = configuration.resourceDetectors ?? [envDetector, processDetector];\n\n this._serviceName = configuration.serviceName;\n\n this._autoDetectResources = configuration.autoDetectResources ?? true;\n\n if (configuration.spanProcessor || configuration.traceExporter) {\n const tracerProviderConfig: NodeTracerConfig = {};\n\n if (configuration.sampler) {\n tracerProviderConfig.sampler = configuration.sampler;\n }\n if (configuration.spanLimits) {\n tracerProviderConfig.spanLimits = configuration.spanLimits;\n }\n\n const spanProcessor =\n configuration.spanProcessor ??\n new BatchSpanProcessor(configuration.traceExporter!);\n\n this.configureTracerProvider(\n tracerProviderConfig,\n spanProcessor,\n configuration.contextManager,\n configuration.textMapPropagator\n );\n }\n\n if (configuration.metricReader || configuration.views) {\n const meterProviderConfig: MeterProviderConfig = {};\n if (configuration.metricReader) {\n meterProviderConfig.reader = configuration.metricReader;\n }\n\n if (configuration.views) {\n meterProviderConfig.views = configuration.views;\n }\n\n this.configureMeterProvider(meterProviderConfig);\n }\n\n let instrumentations: InstrumentationOption[] = [];\n if (configuration.instrumentations) {\n instrumentations = configuration.instrumentations;\n }\n this._instrumentations = instrumentations;\n }\n\n /** Set configurations required to register a NodeTracerProvider */\n public configureTracerProvider(\n tracerConfig: NodeTracerConfig,\n spanProcessor: SpanProcessor,\n contextManager?: ContextManager,\n textMapPropagator?: TextMapPropagator\n ): void {\n this._tracerProviderConfig = {\n tracerConfig,\n spanProcessor,\n contextManager,\n textMapPropagator,\n };\n }\n\n /** Set configurations needed to register a MeterProvider */\n public configureMeterProvider(config: MeterProviderConfig): void {\n // nothing is set yet, we can set config and return.\n if (this._meterProviderConfig == null) {\n this._meterProviderConfig = config;\n return;\n }\n\n // make sure we do not override existing views with other views.\n if (this._meterProviderConfig.views != null && config.views != null) {\n throw new Error('Views passed but Views have already been configured.');\n }\n\n // set views, but make sure we do not override existing views with null/undefined.\n if (config.views != null) {\n this._meterProviderConfig.views = config.views;\n }\n\n // make sure we do not override existing reader with another reader.\n if (this._meterProviderConfig.reader != null && config.reader != null) {\n throw new Error('MetricReader passed but MetricReader has already been configured.');\n }\n\n // set reader, but make sure we do not override existing reader with null/undefined.\n if (config.reader != null) {\n this._meterProviderConfig.reader = config.reader;\n }\n }\n\n /** Detect resource attributes */\n public async detectResources(): Promise<void> {\n const internalConfig: ResourceDetectionConfig = {\n detectors: this._resourceDetectors,\n };\n\n this.addResource(await detectResources(internalConfig));\n }\n\n /** Manually add a resource */\n public addResource(resource: Resource): void {\n this._resource = this._resource.merge(resource);\n }\n\n /**\n * Once the SDK has been configured, call this method to construct SDK components and register them with the OpenTelemetry API.\n */\n public async start(): Promise<void> {\n if (this._autoDetectResources) {\n await this.detectResources();\n }\n\n this._resource = this._serviceName === undefined\n ? this._resource\n : this._resource.merge(new Resource(\n { [SemanticResourceAttributes.SERVICE_NAME]: this._serviceName }\n ));\n\n const Provider =\n this._tracerProviderConfig ? NodeTracerProvider : TracerProviderWithEnvExporters;\n\n const tracerProvider = new Provider ({\n ...this._tracerProviderConfig?.tracerConfig,\n resource: this._resource,\n });\n\n this._tracerProvider = tracerProvider;\n\n if (this._tracerProviderConfig) {\n tracerProvider.addSpanProcessor(this._tracerProviderConfig.spanProcessor);\n }\n\n tracerProvider.register({\n contextManager: this._tracerProviderConfig?.contextManager,\n propagator: this._tracerProviderConfig?.textMapPropagator,\n });\n\n if (this._meterProviderConfig) {\n const meterProvider = new MeterProvider({\n resource: this._resource,\n views: this._meterProviderConfig?.views ?? [],\n });\n\n if (this._meterProviderConfig.reader) {\n meterProvider.addMetricReader(this._meterProviderConfig.reader);\n }\n\n this._meterProvider = meterProvider;\n\n metrics.setGlobalMeterProvider(meterProvider);\n }\n\n registerInstrumentations({\n instrumentations: this._instrumentations,\n });\n }\n\n public shutdown(): Promise<void> {\n const promises: Promise<unknown>[] = [];\n if (this._tracerProvider) {\n promises.push(this._tracerProvider.shutdown());\n }\n if (this._meterProvider) {\n promises.push(this._meterProvider.shutdown());\n }\n\n return (\n Promise.all(promises)\n // return void instead of the array from Promise.all\n .then(() => {\n })\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],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QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC;SAC/C;QAED,OAAO,CACL,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;YACnB,oDAAoD;aACnD,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAClB,CAAC;IACJ,CAAC;CACF;AA/ND,0BA+NC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ContextManager, TextMapPropagator, metrics } from '@opentelemetry/api';\nimport {\n InstrumentationOption,\n registerInstrumentations,\n} from '@opentelemetry/instrumentation';\nimport {\n Detector,\n detectResources,\n envDetector,\n processDetector,\n Resource,\n ResourceDetectionConfig,\n} from '@opentelemetry/resources';\nimport { MeterProvider, MetricReader, View } from '@opentelemetry/sdk-metrics';\nimport {\n BatchSpanProcessor,\n SpanProcessor,\n} from '@opentelemetry/sdk-trace-base';\nimport {\n NodeTracerConfig,\n NodeTracerProvider,\n} from '@opentelemetry/sdk-trace-node';\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { NodeSDKConfiguration } from './types';\nimport { TracerProviderWithEnvExporters } from './TracerProviderWithEnvExporter';\nimport { getEnv } from '@opentelemetry/core';\n\n/** This class represents everything needed to register a fully configured OpenTelemetry Node.js SDK */\n\nexport type MeterProviderConfig = {\n /**\n * Reference to the MetricReader instance by the NodeSDK\n */\n reader?: MetricReader;\n /**\n * List of {@link View}s that should be passed to the MeterProvider\n */\n views?: View[];\n};\nexport class NodeSDK {\n private _tracerProviderConfig?: {\n tracerConfig: NodeTracerConfig;\n spanProcessor: SpanProcessor;\n contextManager?: ContextManager;\n textMapPropagator?: TextMapPropagator;\n };\n private _meterProviderConfig?: MeterProviderConfig;\n private _instrumentations: InstrumentationOption[];\n\n private _resource: Resource;\n private _resourceDetectors: Detector[];\n\n private _autoDetectResources: boolean;\n\n private _tracerProvider?: NodeTracerProvider | TracerProviderWithEnvExporters;\n private _meterProvider?: MeterProvider;\n private _serviceName?: string;\n\n private _disabled?: boolean;\n\n /**\n * Create a new NodeJS SDK instance\n */\n public constructor(configuration: Partial<NodeSDKConfiguration> = {}) {\n if (getEnv().OTEL_SDK_DISABLED) {\n this._disabled = true;\n // Functions with possible side-effects are set\n // to no-op via the _disabled flag\n }\n\n this._resource = configuration.resource ?? new Resource({});\n this._resourceDetectors = configuration.resourceDetectors ?? [\n envDetector,\n processDetector,\n ];\n\n this._serviceName = configuration.serviceName;\n\n this._autoDetectResources = configuration.autoDetectResources ?? true;\n\n if (configuration.spanProcessor || configuration.traceExporter) {\n const tracerProviderConfig: NodeTracerConfig = {};\n\n if (configuration.sampler) {\n tracerProviderConfig.sampler = configuration.sampler;\n }\n if (configuration.spanLimits) {\n tracerProviderConfig.spanLimits = configuration.spanLimits;\n }\n\n const spanProcessor =\n configuration.spanProcessor ??\n new BatchSpanProcessor(configuration.traceExporter!);\n\n this.configureTracerProvider(\n tracerProviderConfig,\n spanProcessor,\n configuration.contextManager,\n configuration.textMapPropagator\n );\n }\n\n if (configuration.metricReader || configuration.views) {\n const meterProviderConfig: MeterProviderConfig = {};\n if (configuration.metricReader) {\n meterProviderConfig.reader = configuration.metricReader;\n }\n\n if (configuration.views) {\n meterProviderConfig.views = configuration.views;\n }\n\n this.configureMeterProvider(meterProviderConfig);\n }\n\n let instrumentations: InstrumentationOption[] = [];\n if (configuration.instrumentations) {\n instrumentations = configuration.instrumentations;\n }\n this._instrumentations = instrumentations;\n }\n\n /** Set configurations required to register a NodeTracerProvider */\n public configureTracerProvider(\n tracerConfig: NodeTracerConfig,\n spanProcessor: SpanProcessor,\n contextManager?: ContextManager,\n textMapPropagator?: TextMapPropagator\n ): void {\n this._tracerProviderConfig = {\n tracerConfig,\n spanProcessor,\n contextManager,\n textMapPropagator,\n };\n }\n\n /** Set configurations needed to register a MeterProvider */\n public configureMeterProvider(config: MeterProviderConfig): void {\n // nothing is set yet, we can set config and return.\n if (this._meterProviderConfig == null) {\n this._meterProviderConfig = config;\n return;\n }\n\n // make sure we do not override existing views with other views.\n if (this._meterProviderConfig.views != null && config.views != null) {\n throw new Error('Views passed but Views have already been configured.');\n }\n\n // set views, but make sure we do not override existing views with null/undefined.\n if (config.views != null) {\n this._meterProviderConfig.views = config.views;\n }\n\n // make sure we do not override existing reader with another reader.\n if (this._meterProviderConfig.reader != null && config.reader != null) {\n throw new Error(\n 'MetricReader passed but MetricReader has already been configured.'\n );\n }\n\n // set reader, but make sure we do not override existing reader with null/undefined.\n if (config.reader != null) {\n this._meterProviderConfig.reader = config.reader;\n }\n }\n\n /** Detect resource attributes */\n public async detectResources(): Promise<void> {\n if (this._disabled) {\n return;\n }\n\n const internalConfig: ResourceDetectionConfig = {\n detectors: this._resourceDetectors,\n };\n\n this.addResource(await detectResources(internalConfig));\n }\n\n /** Manually add a resource */\n public addResource(resource: Resource): void {\n this._resource = this._resource.merge(resource);\n }\n\n /**\n * Once the SDK has been configured, call this method to construct SDK components and register them with the OpenTelemetry API.\n */\n public async start(): Promise<void> {\n if (this._disabled) {\n return;\n }\n\n if (this._autoDetectResources) {\n await this.detectResources();\n }\n\n this._resource =\n this._serviceName === undefined\n ? this._resource\n : this._resource.merge(\n new Resource({\n [SemanticResourceAttributes.SERVICE_NAME]: this._serviceName,\n })\n );\n\n const Provider = this._tracerProviderConfig\n ? NodeTracerProvider\n : TracerProviderWithEnvExporters;\n\n const tracerProvider = new Provider({\n ...this._tracerProviderConfig?.tracerConfig,\n resource: this._resource,\n });\n\n this._tracerProvider = tracerProvider;\n\n if (this._tracerProviderConfig) {\n tracerProvider.addSpanProcessor(this._tracerProviderConfig.spanProcessor);\n }\n\n tracerProvider.register({\n contextManager: this._tracerProviderConfig?.contextManager,\n propagator: this._tracerProviderConfig?.textMapPropagator,\n });\n\n if (this._meterProviderConfig) {\n const meterProvider = new MeterProvider({\n resource: this._resource,\n views: this._meterProviderConfig?.views ?? [],\n });\n\n if (this._meterProviderConfig.reader) {\n meterProvider.addMetricReader(this._meterProviderConfig.reader);\n }\n\n this._meterProvider = meterProvider;\n\n metrics.setGlobalMeterProvider(meterProvider);\n }\n\n registerInstrumentations({\n instrumentations: this._instrumentations,\n });\n }\n\n public shutdown(): Promise<void> {\n const promises: Promise<unknown>[] = [];\n if (this._tracerProvider) {\n promises.push(this._tracerProvider.shutdown());\n }\n if (this._meterProvider) {\n promises.push(this._meterProvider.shutdown());\n }\n\n return (\n Promise.all(promises)\n // return void instead of the array from Promise.all\n .then(() => {})\n );\n }\n}\n"]}
|
package/build/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ContextManager, SpanAttributes } from '@opentelemetry/api';\nimport { TextMapPropagator } from '@opentelemetry/api';\nimport { InstrumentationOption } from '@opentelemetry/instrumentation';\nimport { Detector, Resource } from '@opentelemetry/resources';\nimport { MetricReader, View } from '@opentelemetry/sdk-metrics';\nimport {\n Sampler,\n SpanExporter,\n SpanLimits,\n SpanProcessor,\n} from '@opentelemetry/sdk-trace-base';\n\nexport interface NodeSDKConfiguration {\n autoDetectResources: boolean;\n contextManager: ContextManager;\n defaultAttributes: SpanAttributes;\n textMapPropagator: TextMapPropagator;\n metricReader: MetricReader;\n views: View[]
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ContextManager, SpanAttributes } from '@opentelemetry/api';\nimport { TextMapPropagator } from '@opentelemetry/api';\nimport { InstrumentationOption } from '@opentelemetry/instrumentation';\nimport { Detector, Resource } from '@opentelemetry/resources';\nimport { MetricReader, View } from '@opentelemetry/sdk-metrics';\nimport {\n Sampler,\n SpanExporter,\n SpanLimits,\n SpanProcessor,\n} from '@opentelemetry/sdk-trace-base';\n\nexport interface NodeSDKConfiguration {\n autoDetectResources: boolean;\n contextManager: ContextManager;\n defaultAttributes: SpanAttributes;\n textMapPropagator: TextMapPropagator;\n metricReader: MetricReader;\n views: View[];\n instrumentations: InstrumentationOption[];\n resource: Resource;\n resourceDetectors: Detector[];\n sampler: Sampler;\n serviceName?: string;\n spanProcessor: SpanProcessor;\n traceExporter: SpanExporter;\n spanLimits: SpanLimits;\n}\n"]}
|
package/build/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.35.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/src/version.js
CHANGED
package/build/src/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.35.0';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/sdk-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "OpenTelemetry SDK for Node.js",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"types": "build/src/index.d.ts",
|
|
@@ -44,25 +44,25 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@opentelemetry/core": "1.
|
|
48
|
-
"@opentelemetry/exporter-jaeger": "1.
|
|
49
|
-
"@opentelemetry/exporter-trace-otlp-grpc": "0.
|
|
50
|
-
"@opentelemetry/exporter-trace-otlp-http": "0.
|
|
51
|
-
"@opentelemetry/exporter-trace-otlp-proto": "0.
|
|
52
|
-
"@opentelemetry/exporter-zipkin": "1.
|
|
53
|
-
"@opentelemetry/instrumentation": "0.
|
|
54
|
-
"@opentelemetry/resources": "1.
|
|
55
|
-
"@opentelemetry/sdk-metrics": "1.
|
|
56
|
-
"@opentelemetry/sdk-trace-base": "1.
|
|
57
|
-
"@opentelemetry/sdk-trace-node": "1.
|
|
58
|
-
"@opentelemetry/semantic-conventions": "1.
|
|
47
|
+
"@opentelemetry/core": "1.9.0",
|
|
48
|
+
"@opentelemetry/exporter-jaeger": "1.9.0",
|
|
49
|
+
"@opentelemetry/exporter-trace-otlp-grpc": "0.35.0",
|
|
50
|
+
"@opentelemetry/exporter-trace-otlp-http": "0.35.0",
|
|
51
|
+
"@opentelemetry/exporter-trace-otlp-proto": "0.35.0",
|
|
52
|
+
"@opentelemetry/exporter-zipkin": "1.9.0",
|
|
53
|
+
"@opentelemetry/instrumentation": "0.35.0",
|
|
54
|
+
"@opentelemetry/resources": "1.9.0",
|
|
55
|
+
"@opentelemetry/sdk-metrics": "1.9.0",
|
|
56
|
+
"@opentelemetry/sdk-trace-base": "1.9.0",
|
|
57
|
+
"@opentelemetry/sdk-trace-node": "1.9.0",
|
|
58
|
+
"@opentelemetry/semantic-conventions": "1.9.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@opentelemetry/api": ">=1.3.0 <1.
|
|
61
|
+
"@opentelemetry/api": ">=1.3.0 <1.5.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@opentelemetry/api": ">=1.3.0 <1.
|
|
65
|
-
"@opentelemetry/context-async-hooks": "1.
|
|
64
|
+
"@opentelemetry/api": ">=1.3.0 <1.5.0",
|
|
65
|
+
"@opentelemetry/context-async-hooks": "1.9.0",
|
|
66
66
|
"@types/mocha": "10.0.0",
|
|
67
67
|
"@types/node": "18.6.5",
|
|
68
68
|
"@types/semver": "7.3.9",
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"mocha": "10.0.0",
|
|
73
73
|
"nyc": "15.1.0",
|
|
74
74
|
"semver": "7.3.5",
|
|
75
|
-
"sinon": "
|
|
75
|
+
"sinon": "15.0.0",
|
|
76
76
|
"ts-loader": "8.4.0",
|
|
77
77
|
"ts-mocha": "10.0.0",
|
|
78
78
|
"typescript": "4.4.4"
|
|
79
79
|
},
|
|
80
80
|
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-node",
|
|
81
81
|
"sideEffects": false,
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "08f597f3a3d71a4852b0afbba120af15ca038121"
|
|
83
83
|
}
|