@opentelemetry/exporter-trace-otlp-proto 0.27.0 → 0.29.1
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 +38 -12
- package/build/src/OTLPTraceExporter.d.ts +5 -5
- package/build/src/OTLPTraceExporter.js +13 -13
- package/build/src/OTLPTraceExporter.js.map +1 -1
- package/build/src/index.d.ts +0 -3
- package/build/src/index.js +0 -3
- package/build/src/index.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 +22 -20
- package/build/protos/opentelemetry/proto/collector/README.md +0 -9
- package/build/protos/opentelemetry/proto/collector/logs/v1/logs_service.proto +0 -48
- package/build/protos/opentelemetry/proto/collector/metrics/v1/metrics_service.proto +0 -45
- package/build/protos/opentelemetry/proto/collector/trace/v1/trace_service.proto +0 -45
- package/build/protos/opentelemetry/proto/common/v1/common.proto +0 -77
- package/build/protos/opentelemetry/proto/logs/v1/logs.proto +0 -131
- package/build/protos/opentelemetry/proto/metrics/experimental/configservice.proto +0 -102
- package/build/protos/opentelemetry/proto/metrics/v1/metrics.proto +0 -569
- package/build/protos/opentelemetry/proto/resource/v1/resource.proto +0 -34
- package/build/protos/opentelemetry/proto/trace/v1/trace.proto +0 -315
- package/build/protos/opentelemetry/proto/trace/v1/trace_config.proto +0 -78
- package/build/src/OTLPExporterNodeBase.d.ts +0 -14
- package/build/src/OTLPExporterNodeBase.js +0 -71
- package/build/src/OTLPExporterNodeBase.js.map +0 -1
- package/build/src/types.d.ts +0 -5
- package/build/src/types.js +0 -24
- package/build/src/types.js.map +0 -1
- package/build/src/util.d.ts +0 -7
- package/build/src/util.js +0 -69
- package/build/src/util.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
# OpenTelemetry Collector Exporter for node with protobuf
|
|
2
2
|
|
|
3
3
|
[![NPM Published Version][npm-img]][npm-url]
|
|
4
|
-
[![dependencies][dependencies-image]][dependencies-url]
|
|
5
|
-
[![devDependencies][devDependencies-image]][devDependencies-url]
|
|
6
4
|
[![Apache License][license-image]][license-image]
|
|
7
5
|
|
|
8
|
-
This module provides exporter for node to be used with [opentelemetry-collector][opentelemetry-collector-url]
|
|
6
|
+
This module provides exporter for node to be used with [opentelemetry-collector][opentelemetry-collector-url].
|
|
7
|
+
Compatible with [opentelemetry-collector][opentelemetry-collector-url] versions `>=0.32 <=0.50`.
|
|
9
8
|
|
|
10
9
|
## Installation
|
|
11
10
|
|
|
@@ -26,7 +25,7 @@ const { BasicTracerProvider, SimpleSpanProcessor } = require('@opentelemetry/sdk
|
|
|
26
25
|
const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-proto');
|
|
27
26
|
|
|
28
27
|
const collectorOptions = {
|
|
29
|
-
url: '<opentelemetry-collector-url>', // url is optional and can be omitted - default is http://localhost:
|
|
28
|
+
url: '<opentelemetry-collector-url>', // url is optional and can be omitted - default is http://localhost:4318/v1/traces
|
|
30
29
|
headers: {
|
|
31
30
|
foo: 'bar'
|
|
32
31
|
}, //an optional object containing custom headers to be sent with each request will only work with http
|
|
@@ -40,6 +39,37 @@ provider.register();
|
|
|
40
39
|
|
|
41
40
|
```
|
|
42
41
|
|
|
42
|
+
## Exporter Timeout Configuration
|
|
43
|
+
|
|
44
|
+
The OTLPTraceExporter has a timeout configuration option which is the maximum time, in milliseconds, the OTLP exporter will wait for each batch export. The default value is 10000ms.
|
|
45
|
+
|
|
46
|
+
To override the default timeout duration, use the following options:
|
|
47
|
+
|
|
48
|
+
+ Set with environment variables:
|
|
49
|
+
|
|
50
|
+
| Environment variable | Description |
|
|
51
|
+
|----------------------|-------------|
|
|
52
|
+
| OTEL_EXPORTER_OTLP_TRACES_TIMEOUT | The maximum waiting time, in milliseconds, allowed to send each OTLP trace batch. Default is 10000. |
|
|
53
|
+
| OTEL_EXPORTER_OTLP_TIMEOUT | The maximum waiting time, in milliseconds, allowed to send each OTLP trace and metric batch. Default is 10000. |
|
|
54
|
+
|
|
55
|
+
> `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT` takes precedence and overrides `OTEL_EXPORTER_OTLP_TIMEOUT`.
|
|
56
|
+
|
|
57
|
+
+ Provide `timeoutMillis` to OTLPTraceExporter with `collectorOptions`:
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
const collectorOptions = {
|
|
61
|
+
timeoutMillis: 15000,
|
|
62
|
+
url: '<opentelemetry-collector-url>', // url is optional and can be omitted - default is http://localhost:4318/v1/traces
|
|
63
|
+
headers: {
|
|
64
|
+
foo: 'bar'
|
|
65
|
+
}, //an optional object containing custom headers to be sent with each request will only work with http
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const exporter = new OTLPTraceExporter(collectorOptions);
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
> Providing `timeoutMillis` with `collectorOptions` takes precedence and overrides timeout set with environment variables.
|
|
72
|
+
|
|
43
73
|
## Running opentelemetry-collector locally to see the traces
|
|
44
74
|
|
|
45
75
|
1. Go to examples/otlp-exporter-node
|
|
@@ -48,9 +78,9 @@ provider.register();
|
|
|
48
78
|
|
|
49
79
|
## Useful links
|
|
50
80
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
81
|
+
+ For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
|
|
82
|
+
+ For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
|
|
83
|
+
+ For help or feedback on this project, join us in [GitHub Discussions][discussions-url]
|
|
54
84
|
|
|
55
85
|
## License
|
|
56
86
|
|
|
@@ -59,12 +89,8 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
|
|
|
59
89
|
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
|
|
60
90
|
[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE
|
|
61
91
|
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
|
|
62
|
-
[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-exporter-trace-otlp-proto
|
|
63
|
-
[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-exporter-trace-otlp-proto
|
|
64
|
-
[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js.svg?path=packages%2Fopentelemetry-exporter-trace-otlp-proto&type=dev
|
|
65
|
-
[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js?path=packages%2Fopentelemetry-exporter-trace-otlp-proto&type=dev
|
|
66
92
|
[npm-url]: https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-proto
|
|
67
93
|
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fexporter-trace-otlp-proto.svg
|
|
68
94
|
[opentelemetry-collector-url]: https://github.com/open-telemetry/opentelemetry-collector
|
|
69
95
|
[semconv-resource-service-name]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/README.md#service
|
|
70
|
-
[metrics-exporter-url]: https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-metrics-otlp-proto
|
|
96
|
+
[metrics-exporter-url]: https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-proto
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
3
|
+
import { OTLPProtoExporterNodeBase, ServiceClientType } from '@opentelemetry/otlp-proto-exporter-base';
|
|
4
|
+
import { IExportTraceServiceRequest } from '@opentelemetry/otlp-transformer';
|
|
5
5
|
/**
|
|
6
6
|
* Collector Trace Exporter for Node with protobuf
|
|
7
7
|
*/
|
|
8
|
-
export declare class OTLPTraceExporter extends
|
|
8
|
+
export declare class OTLPTraceExporter extends OTLPProtoExporterNodeBase<ReadableSpan, IExportTraceServiceRequest> implements SpanExporter {
|
|
9
9
|
constructor(config?: OTLPExporterNodeConfigBase);
|
|
10
|
-
convert(spans: ReadableSpan[]):
|
|
10
|
+
convert(spans: ReadableSpan[]): IExportTraceServiceRequest;
|
|
11
11
|
getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
|
|
12
12
|
getServiceClientType(): ServiceClientType;
|
|
13
13
|
}
|
|
@@ -16,34 +16,34 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.OTLPTraceExporter = void 0;
|
|
19
|
-
const OTLPExporterNodeBase_1 = require("./OTLPExporterNodeBase");
|
|
20
|
-
const exporter_trace_otlp_http_1 = require("@opentelemetry/exporter-trace-otlp-http");
|
|
21
|
-
const types_1 = require("./types");
|
|
22
19
|
const core_1 = require("@opentelemetry/core");
|
|
23
|
-
const
|
|
24
|
-
const
|
|
20
|
+
const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
|
|
21
|
+
const otlp_proto_exporter_base_1 = require("@opentelemetry/otlp-proto-exporter-base");
|
|
22
|
+
const otlp_transformer_1 = require("@opentelemetry/otlp-transformer");
|
|
23
|
+
const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';
|
|
24
|
+
const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
|
|
25
25
|
/**
|
|
26
26
|
* Collector Trace Exporter for Node with protobuf
|
|
27
27
|
*/
|
|
28
|
-
class OTLPTraceExporter extends
|
|
28
|
+
class OTLPTraceExporter extends otlp_proto_exporter_base_1.OTLPProtoExporterNodeBase {
|
|
29
29
|
constructor(config = {}) {
|
|
30
30
|
super(config);
|
|
31
|
-
this.headers = Object.assign(this.headers, core_1.baggageUtils.parseKeyPairsIntoRecord(core_1.getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS));
|
|
31
|
+
this.headers = Object.assign(this.headers, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS));
|
|
32
32
|
}
|
|
33
33
|
convert(spans) {
|
|
34
|
-
return
|
|
34
|
+
return (0, otlp_transformer_1.createExportTraceServiceRequest)(spans);
|
|
35
35
|
}
|
|
36
36
|
getDefaultUrl(config) {
|
|
37
37
|
return typeof config.url === 'string'
|
|
38
38
|
? config.url
|
|
39
|
-
: core_1.getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
|
|
40
|
-
? core_1.getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
|
41
|
-
: core_1.getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
|
|
42
|
-
?
|
|
39
|
+
: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
|
|
40
|
+
? (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
|
|
41
|
+
: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
|
|
42
|
+
? (0, otlp_exporter_base_1.appendResourcePathToUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
|
|
43
43
|
: DEFAULT_COLLECTOR_URL;
|
|
44
44
|
}
|
|
45
45
|
getServiceClientType() {
|
|
46
|
-
return
|
|
46
|
+
return otlp_proto_exporter_base_1.ServiceClientType.SPANS;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
exports.OTLPTraceExporter = OTLPTraceExporter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../src/OTLPTraceExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../src/OTLPTraceExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,8CAA2D;AAC3D,0EAI2C;AAC3C,sFAAuG;AACvG,sEAA8G;AAE9G,MAAM,+BAA+B,GAAG,WAAW,CAAC;AACpD,MAAM,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AAEzF;;GAEG;AACH,MAAa,iBACX,SAAQ,oDAGP;IAED,YAAY,SAAqC,EAAE;QACjD,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAC1B,IAAI,CAAC,OAAO,EACZ,mBAAY,CAAC,uBAAuB,CAClC,IAAA,aAAM,GAAE,CAAC,iCAAiC,CAC3C,CACF,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,KAAqB;QAC3B,OAAO,IAAA,kDAA+B,EAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED,aAAa,CAAC,MAAkC;QAC9C,OAAO,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ;YACnC,CAAC,CAAC,MAAM,CAAC,GAAG;YACZ,CAAC,CAAC,IAAA,aAAM,GAAE,CAAC,kCAAkC,CAAC,MAAM,GAAG,CAAC;gBACtD,CAAC,CAAC,IAAA,gDAA2B,EAAC,IAAA,aAAM,GAAE,CAAC,kCAAkC,EAAE,+BAA+B,CAAC;gBAC3G,CAAC,CAAC,IAAA,aAAM,GAAE,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC;oBAC/C,CAAC,CAAC,IAAA,4CAAuB,EAAC,IAAA,aAAM,GAAE,CAAC,2BAA2B,EAAE,+BAA+B,CAAC;oBAChG,CAAC,CAAC,qBAAqB,CAAC;IAChC,CAAC;IAED,oBAAoB;QAClB,OAAO,4CAAiB,CAAC,KAAK,CAAC;IACjC,CAAC;CACF;AAjCD,8CAiCC","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 { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport {\n OTLPExporterNodeConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded\n} from '@opentelemetry/otlp-exporter-base';\nimport { OTLPProtoExporterNodeBase, ServiceClientType } from '@opentelemetry/otlp-proto-exporter-base';\nimport { createExportTraceServiceRequest, IExportTraceServiceRequest } from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\n\n/**\n * Collector Trace Exporter for Node with protobuf\n */\nexport class OTLPTraceExporter\n extends OTLPProtoExporterNodeBase<\n ReadableSpan,\n IExportTraceServiceRequest\n >\n implements SpanExporter {\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(config);\n this.headers = Object.assign(\n this.headers,\n baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS\n )\n );\n }\n\n convert(spans: ReadableSpan[]): IExportTraceServiceRequest {\n return createExportTraceServiceRequest(spans);\n }\n\n getDefaultUrl(config: OTLPExporterNodeConfigBase) {\n return typeof config.url === 'string'\n ? config.url\n : getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)\n : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)\n : DEFAULT_COLLECTOR_URL;\n }\n\n getServiceClientType() {\n return ServiceClientType.SPANS;\n }\n}\n"]}
|
package/build/src/index.d.ts
CHANGED
package/build/src/index.js
CHANGED
|
@@ -26,7 +26,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
__exportStar(require("./OTLPTraceExporter"), exports);
|
|
29
|
-
__exportStar(require("./OTLPExporterNodeBase"), exports);
|
|
30
|
-
__exportStar(require("./types"), exports);
|
|
31
|
-
__exportStar(require("./util"), exports);
|
|
32
29
|
//# sourceMappingURL=index.js.map
|
package/build/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,sDAAoC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,sDAAoC","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\nexport * from './OTLPTraceExporter';\n"]}
|
package/build/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.29.1";
|
|
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.29.1';\n"]}
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/exporter-trace-otlp-proto",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.1",
|
|
4
4
|
"description": "OpenTelemetry Collector Exporter allows user to send collected traces to the OpenTelemetry Collector using protobuf over HTTP",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"types": "build/src/index.d.ts",
|
|
7
7
|
"repository": "open-telemetry/opentelemetry-js",
|
|
8
8
|
"scripts": {
|
|
9
|
+
"prepublishOnly": "npm run compile",
|
|
9
10
|
"compile": "tsc --build",
|
|
10
11
|
"clean": "tsc --build --clean",
|
|
11
12
|
"lint": "eslint . --ext .ts",
|
|
12
13
|
"lint:fix": "eslint . --ext .ts --fix",
|
|
13
|
-
"postcompile": "npm run submodule && npm run protos:copy",
|
|
14
|
-
"protos:copy": "cpx protos/opentelemetry/**/*.* build/protos/opentelemetry",
|
|
15
|
-
"submodule": "git submodule sync --recursive && git submodule update --init --recursive",
|
|
16
14
|
"tdd": "npm run test -- --watch-extensions ts --watch",
|
|
17
15
|
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
|
|
18
16
|
"version": "node ../../../scripts/version-update.js",
|
|
19
|
-
"watch": "
|
|
20
|
-
"precompile": "lerna run version --scope $(npm pkg get name) --include-
|
|
21
|
-
"prewatch": "npm run precompile"
|
|
17
|
+
"watch": "tsc -w",
|
|
18
|
+
"precompile": "lerna run version --scope $(npm pkg get name) --include-dependencies",
|
|
19
|
+
"prewatch": "npm run precompile",
|
|
20
|
+
"peer-api-check": "node ../../../scripts/peer-api-check.js",
|
|
21
|
+
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [
|
|
24
24
|
"opentelemetry",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"author": "OpenTelemetry Authors",
|
|
33
33
|
"license": "Apache-2.0",
|
|
34
34
|
"engines": {
|
|
35
|
-
"node": ">=8.
|
|
35
|
+
"node": ">=8.12.0"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"build/src/**/*.js",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@babel/core": "7.
|
|
51
|
-
"@opentelemetry/api": "^1.0.
|
|
50
|
+
"@babel/core": "7.16.0",
|
|
51
|
+
"@opentelemetry/api": "^1.0.0",
|
|
52
52
|
"@types/mocha": "8.2.3",
|
|
53
|
-
"@types/node": "14.17.
|
|
54
|
-
"@types/sinon": "10.0.
|
|
53
|
+
"@types/node": "14.17.33",
|
|
54
|
+
"@types/sinon": "10.0.6",
|
|
55
55
|
"codecov": "3.8.3",
|
|
56
56
|
"cpx": "1.5.0",
|
|
57
57
|
"mocha": "7.2.0",
|
|
@@ -59,19 +59,21 @@
|
|
|
59
59
|
"rimraf": "3.0.2",
|
|
60
60
|
"sinon": "12.0.1",
|
|
61
61
|
"ts-loader": "8.3.0",
|
|
62
|
-
"ts-mocha": "
|
|
63
|
-
"typescript": "4.
|
|
62
|
+
"ts-mocha": "9.0.2",
|
|
63
|
+
"typescript": "4.4.4"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@opentelemetry/api": "^1.0.0"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@grpc/proto-loader": "^0.6.
|
|
70
|
-
"@opentelemetry/core": "1.
|
|
71
|
-
"@opentelemetry/exporter-
|
|
72
|
-
"@opentelemetry/
|
|
73
|
-
"@opentelemetry/
|
|
69
|
+
"@grpc/proto-loader": "^0.6.9",
|
|
70
|
+
"@opentelemetry/core": "1.1.1",
|
|
71
|
+
"@opentelemetry/otlp-exporter-base": "0.29.1",
|
|
72
|
+
"@opentelemetry/otlp-proto-exporter-base": "0.29.1",
|
|
73
|
+
"@opentelemetry/otlp-transformer": "0.29.1",
|
|
74
|
+
"@opentelemetry/resources": "1.3.0",
|
|
75
|
+
"@opentelemetry/sdk-trace-base": "1.3.0",
|
|
74
76
|
"protobufjs": "^6.9.0"
|
|
75
77
|
},
|
|
76
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "094f016ac6697fc45ba5d7b5765f5c3e56f18d1e"
|
|
77
79
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# OpenTelemetry Collector Proto
|
|
2
|
-
|
|
3
|
-
This package describes the OpenTelemetry collector protocol.
|
|
4
|
-
|
|
5
|
-
## Packages
|
|
6
|
-
|
|
7
|
-
1. `common` package contains the common messages shared between different services.
|
|
8
|
-
2. `trace` package contains the Trace Service protos.
|
|
9
|
-
3. `metrics` package contains the Metrics Service protos.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// Copyright 2020, OpenTelemetry Authors
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
syntax = "proto3";
|
|
16
|
-
|
|
17
|
-
// NOTE: This proto is experimental and is subject to change at this point.
|
|
18
|
-
// Please do not use it at the moment.
|
|
19
|
-
|
|
20
|
-
package opentelemetry.proto.collector.logs.v1;
|
|
21
|
-
|
|
22
|
-
import "opentelemetry/proto/logs/v1/logs.proto";
|
|
23
|
-
|
|
24
|
-
option java_multiple_files = true;
|
|
25
|
-
option java_package = "io.opentelemetry.proto.collector.logs.v1";
|
|
26
|
-
option java_outer_classname = "LogsServiceProto";
|
|
27
|
-
option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/collector/logs/v1";
|
|
28
|
-
|
|
29
|
-
// Service that can be used to push logs between one Application instrumented with
|
|
30
|
-
// OpenTelemetry and an collector, or between an collector and a central collector (in this
|
|
31
|
-
// case logs are sent/received to/from multiple Applications).
|
|
32
|
-
service LogsService {
|
|
33
|
-
// For performance reasons, it is recommended to keep this RPC
|
|
34
|
-
// alive for the entire life of the application.
|
|
35
|
-
rpc Export(ExportLogsServiceRequest) returns (ExportLogsServiceResponse) {}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
message ExportLogsServiceRequest {
|
|
39
|
-
// An array of ResourceLogs.
|
|
40
|
-
// For data coming from a single resource this array will typically contain one
|
|
41
|
-
// element. Intermediary nodes (such as OpenTelemetry Collector) that receive
|
|
42
|
-
// data from multiple origins typically batch the data before forwarding further and
|
|
43
|
-
// in that case this array will contain multiple elements.
|
|
44
|
-
repeated opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
message ExportLogsServiceResponse {
|
|
48
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// Copyright 2019, OpenTelemetry Authors
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
syntax = "proto3";
|
|
16
|
-
|
|
17
|
-
package opentelemetry.proto.collector.metrics.v1;
|
|
18
|
-
|
|
19
|
-
import "opentelemetry/proto/metrics/v1/metrics.proto";
|
|
20
|
-
|
|
21
|
-
option java_multiple_files = true;
|
|
22
|
-
option java_package = "io.opentelemetry.proto.collector.metrics.v1";
|
|
23
|
-
option java_outer_classname = "MetricsServiceProto";
|
|
24
|
-
option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/collector/metrics/v1";
|
|
25
|
-
|
|
26
|
-
// Service that can be used to push metrics between one Application
|
|
27
|
-
// instrumented with OpenTelemetry and a collector, or between a collector and a
|
|
28
|
-
// central collector.
|
|
29
|
-
service MetricsService {
|
|
30
|
-
// For performance reasons, it is recommended to keep this RPC
|
|
31
|
-
// alive for the entire life of the application.
|
|
32
|
-
rpc Export(ExportMetricsServiceRequest) returns (ExportMetricsServiceResponse) {}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
message ExportMetricsServiceRequest {
|
|
36
|
-
// An array of ResourceMetrics.
|
|
37
|
-
// For data coming from a single resource this array will typically contain one
|
|
38
|
-
// element. Intermediary nodes (such as OpenTelemetry Collector) that receive
|
|
39
|
-
// data from multiple origins typically batch the data before forwarding further and
|
|
40
|
-
// in that case this array will contain multiple elements.
|
|
41
|
-
repeated opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
message ExportMetricsServiceResponse {
|
|
45
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// Copyright 2019, OpenTelemetry Authors
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
syntax = "proto3";
|
|
16
|
-
|
|
17
|
-
package opentelemetry.proto.collector.trace.v1;
|
|
18
|
-
|
|
19
|
-
import "opentelemetry/proto/trace/v1/trace.proto";
|
|
20
|
-
|
|
21
|
-
option java_multiple_files = true;
|
|
22
|
-
option java_package = "io.opentelemetry.proto.collector.trace.v1";
|
|
23
|
-
option java_outer_classname = "TraceServiceProto";
|
|
24
|
-
option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/collector/trace/v1";
|
|
25
|
-
|
|
26
|
-
// Service that can be used to push spans between one Application instrumented with
|
|
27
|
-
// OpenTelemetry and an collector, or between an collector and a central collector (in this
|
|
28
|
-
// case spans are sent/received to/from multiple Applications).
|
|
29
|
-
service TraceService {
|
|
30
|
-
// For performance reasons, it is recommended to keep this RPC
|
|
31
|
-
// alive for the entire life of the application.
|
|
32
|
-
rpc Export(ExportTraceServiceRequest) returns (ExportTraceServiceResponse) {}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
message ExportTraceServiceRequest {
|
|
36
|
-
// An array of ResourceSpans.
|
|
37
|
-
// For data coming from a single resource this array will typically contain one
|
|
38
|
-
// element. Intermediary nodes (such as OpenTelemetry Collector) that receive
|
|
39
|
-
// data from multiple origins typically batch the data before forwarding further and
|
|
40
|
-
// in that case this array will contain multiple elements.
|
|
41
|
-
repeated opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
message ExportTraceServiceResponse {
|
|
45
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
// Copyright 2019, OpenTelemetry Authors
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
syntax = "proto3";
|
|
16
|
-
|
|
17
|
-
package opentelemetry.proto.common.v1;
|
|
18
|
-
|
|
19
|
-
option java_multiple_files = true;
|
|
20
|
-
option java_package = "io.opentelemetry.proto.common.v1";
|
|
21
|
-
option java_outer_classname = "CommonProto";
|
|
22
|
-
option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1";
|
|
23
|
-
|
|
24
|
-
// AnyValue is used to represent any type of attribute value. AnyValue may contain a
|
|
25
|
-
// primitive value such as a string or integer or it may contain an arbitrary nested
|
|
26
|
-
// object containing arrays, key-value lists and primitives.
|
|
27
|
-
message AnyValue {
|
|
28
|
-
// The value is one of the listed fields. It is valid for all values to be unspecified
|
|
29
|
-
// in which case this AnyValue is considered to be "null".
|
|
30
|
-
oneof value {
|
|
31
|
-
string string_value = 1;
|
|
32
|
-
bool bool_value = 2;
|
|
33
|
-
int64 int_value = 3;
|
|
34
|
-
double double_value = 4;
|
|
35
|
-
ArrayValue array_value = 5;
|
|
36
|
-
KeyValueList kvlist_value = 6;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// ArrayValue is a list of AnyValue messages. We need ArrayValue as a message
|
|
41
|
-
// since oneof in AnyValue does not allow repeated fields.
|
|
42
|
-
message ArrayValue {
|
|
43
|
-
// Array of values. The array may be empty (contain 0 elements).
|
|
44
|
-
repeated AnyValue values = 1;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// KeyValueList is a list of KeyValue messages. We need KeyValueList as a message
|
|
48
|
-
// since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need
|
|
49
|
-
// a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to
|
|
50
|
-
// avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches
|
|
51
|
-
// are semantically equivalent.
|
|
52
|
-
message KeyValueList {
|
|
53
|
-
// A collection of key/value pairs of key-value pairs. The list may be empty (may
|
|
54
|
-
// contain 0 elements).
|
|
55
|
-
repeated KeyValue values = 1;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// KeyValue is a key-value pair that is used to store Span attributes, Link
|
|
59
|
-
// attributes, etc.
|
|
60
|
-
message KeyValue {
|
|
61
|
-
string key = 1;
|
|
62
|
-
AnyValue value = 2;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// StringKeyValue is a pair of key/value strings. This is the simpler (and faster) version
|
|
66
|
-
// of KeyValue that only supports string values.
|
|
67
|
-
message StringKeyValue {
|
|
68
|
-
string key = 1;
|
|
69
|
-
string value = 2;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// InstrumentationLibrary is a message representing the instrumentation library information
|
|
73
|
-
// such as the fully qualified name and version.
|
|
74
|
-
message InstrumentationLibrary {
|
|
75
|
-
string name = 1;
|
|
76
|
-
string version = 2;
|
|
77
|
-
}
|