@opentelemetry/otlp-grpc-exporter-base 0.28.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/LICENSE +201 -0
- package/README.md +31 -0
- package/build/protos/opentelemetry/proto/collector/README.md +9 -0
- package/build/protos/opentelemetry/proto/collector/logs/v1/logs_service.proto +48 -0
- package/build/protos/opentelemetry/proto/collector/metrics/v1/metrics_service.proto +45 -0
- package/build/protos/opentelemetry/proto/collector/trace/v1/trace_service.proto +45 -0
- package/build/protos/opentelemetry/proto/common/v1/common.proto +77 -0
- package/build/protos/opentelemetry/proto/logs/v1/logs.proto +131 -0
- package/build/protos/opentelemetry/proto/metrics/experimental/configservice.proto +102 -0
- package/build/protos/opentelemetry/proto/metrics/v1/metrics.proto +569 -0
- package/build/protos/opentelemetry/proto/resource/v1/resource.proto +34 -0
- package/build/protos/opentelemetry/proto/trace/v1/trace.proto +315 -0
- package/build/protos/opentelemetry/proto/trace/v1/trace_config.proto +78 -0
- package/build/src/OTLPGRPCExporterNodeBase.d.ts +23 -0
- package/build/src/OTLPGRPCExporterNodeBase.js +89 -0
- package/build/src/OTLPGRPCExporterNodeBase.js.map +1 -0
- package/build/src/index.d.ts +4 -0
- package/build/src/index.js +35 -0
- package/build/src/index.js.map +1 -0
- package/build/src/types.d.ts +30 -0
- package/build/src/types.js +24 -0
- package/build/src/types.js.map +1 -0
- package/build/src/util.d.ts +15 -0
- package/build/src/util.js +127 -0
- package/build/src/util.js.map +1 -0
- package/build/src/version.d.ts +2 -0
- package/build/src/version.js +21 -0
- package/build/src/version.js.map +1 -0
- package/package.json +80 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OTLPGRPCExporterNodeBase } from './OTLPGRPCExporterNodeBase';
|
|
2
|
+
import { OTLPGRPCExporterConfigNode } from './types';
|
|
3
|
+
import { CompressionAlgorithm, OTLPExporterError } from '@opentelemetry/otlp-exporter-base';
|
|
4
|
+
export declare function onInit<ExportItem, ServiceRequest>(collector: OTLPGRPCExporterNodeBase<ExportItem, ServiceRequest>, config: OTLPGRPCExporterConfigNode): void;
|
|
5
|
+
export declare function send<ExportItem, ServiceRequest>(collector: OTLPGRPCExporterNodeBase<ExportItem, ServiceRequest>, objects: ExportItem[], onSuccess: () => void, onError: (error: OTLPExporterError) => void): void;
|
|
6
|
+
export declare function validateAndNormalizeUrl(url: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* These values are defined by grpc client
|
|
9
|
+
*/
|
|
10
|
+
export declare enum GrpcCompressionAlgorithm {
|
|
11
|
+
NONE = 0,
|
|
12
|
+
GZIP = 2
|
|
13
|
+
}
|
|
14
|
+
export declare function configureCompression(compression: CompressionAlgorithm | undefined): GrpcCompressionAlgorithm;
|
|
15
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1,127 @@
|
|
|
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.configureCompression = exports.GrpcCompressionAlgorithm = exports.validateAndNormalizeUrl = exports.send = exports.onInit = void 0;
|
|
19
|
+
const grpc = require("@grpc/grpc-js");
|
|
20
|
+
const protoLoader = require("@grpc/proto-loader");
|
|
21
|
+
const api_1 = require("@opentelemetry/api");
|
|
22
|
+
const core_1 = require("@opentelemetry/core");
|
|
23
|
+
const path = require("path");
|
|
24
|
+
const url_1 = require("url");
|
|
25
|
+
const types_1 = require("./types");
|
|
26
|
+
const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
|
|
27
|
+
function onInit(collector, config) {
|
|
28
|
+
collector.grpcQueue = [];
|
|
29
|
+
const credentials = config.credentials || grpc.credentials.createInsecure();
|
|
30
|
+
const includeDirs = [path.resolve(__dirname, '..', 'protos')];
|
|
31
|
+
protoLoader
|
|
32
|
+
.load(collector.getServiceProtoPath(), {
|
|
33
|
+
keepCase: false,
|
|
34
|
+
longs: String,
|
|
35
|
+
enums: String,
|
|
36
|
+
defaults: true,
|
|
37
|
+
oneofs: true,
|
|
38
|
+
includeDirs,
|
|
39
|
+
})
|
|
40
|
+
.then(packageDefinition => {
|
|
41
|
+
const packageObject = grpc.loadPackageDefinition(packageDefinition);
|
|
42
|
+
const options = { 'grpc.default_compression_algorithm': collector.compression };
|
|
43
|
+
if (collector.getServiceClientType() === types_1.ServiceClientType.SPANS) {
|
|
44
|
+
collector.serviceClient =
|
|
45
|
+
new packageObject.opentelemetry.proto.collector.trace.v1.TraceService(collector.url, credentials, options);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
collector.serviceClient =
|
|
49
|
+
new packageObject.opentelemetry.proto.collector.metrics.v1.MetricsService(collector.url, credentials, options);
|
|
50
|
+
}
|
|
51
|
+
if (collector.grpcQueue.length > 0) {
|
|
52
|
+
const queue = collector.grpcQueue.splice(0);
|
|
53
|
+
queue.forEach((item) => {
|
|
54
|
+
collector.send(item.objects, item.onSuccess, item.onError);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
.catch(err => {
|
|
59
|
+
(0, core_1.globalErrorHandler)(err);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
exports.onInit = onInit;
|
|
63
|
+
function send(collector, objects, onSuccess, onError) {
|
|
64
|
+
if (collector.serviceClient) {
|
|
65
|
+
const serviceRequest = collector.convert(objects);
|
|
66
|
+
collector.serviceClient.export(serviceRequest, collector.metadata || new grpc.Metadata(), (err) => {
|
|
67
|
+
if (err) {
|
|
68
|
+
api_1.diag.error('Service request', serviceRequest);
|
|
69
|
+
onError(err);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
api_1.diag.debug('Objects sent');
|
|
73
|
+
onSuccess();
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
collector.grpcQueue.push({
|
|
79
|
+
objects,
|
|
80
|
+
onSuccess,
|
|
81
|
+
onError,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.send = send;
|
|
86
|
+
function validateAndNormalizeUrl(url) {
|
|
87
|
+
var _a;
|
|
88
|
+
const hasProtocol = url.match(/^([\w]{1,8}):\/\//);
|
|
89
|
+
if (!hasProtocol) {
|
|
90
|
+
url = `https://${url}`;
|
|
91
|
+
}
|
|
92
|
+
const target = new url_1.URL(url);
|
|
93
|
+
if (target.pathname && target.pathname !== '/') {
|
|
94
|
+
api_1.diag.warn('URL path should not be set when using grpc, the path part of the URL will be ignored.');
|
|
95
|
+
}
|
|
96
|
+
if (target.protocol !== '' && !((_a = target.protocol) === null || _a === void 0 ? void 0 : _a.match(/(http|grpc)s?/))) {
|
|
97
|
+
api_1.diag.warn('URL protocol should be http(s):// or grpc(s)://. Using grpc://.');
|
|
98
|
+
}
|
|
99
|
+
return target.host;
|
|
100
|
+
}
|
|
101
|
+
exports.validateAndNormalizeUrl = validateAndNormalizeUrl;
|
|
102
|
+
function toGrpcCompression(compression) {
|
|
103
|
+
if (compression === otlp_exporter_base_1.CompressionAlgorithm.NONE)
|
|
104
|
+
return GrpcCompressionAlgorithm.NONE;
|
|
105
|
+
else if (compression === otlp_exporter_base_1.CompressionAlgorithm.GZIP)
|
|
106
|
+
return GrpcCompressionAlgorithm.GZIP;
|
|
107
|
+
return GrpcCompressionAlgorithm.NONE;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* These values are defined by grpc client
|
|
111
|
+
*/
|
|
112
|
+
var GrpcCompressionAlgorithm;
|
|
113
|
+
(function (GrpcCompressionAlgorithm) {
|
|
114
|
+
GrpcCompressionAlgorithm[GrpcCompressionAlgorithm["NONE"] = 0] = "NONE";
|
|
115
|
+
GrpcCompressionAlgorithm[GrpcCompressionAlgorithm["GZIP"] = 2] = "GZIP";
|
|
116
|
+
})(GrpcCompressionAlgorithm = exports.GrpcCompressionAlgorithm || (exports.GrpcCompressionAlgorithm = {}));
|
|
117
|
+
function configureCompression(compression) {
|
|
118
|
+
if (compression) {
|
|
119
|
+
return toGrpcCompression(compression);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
const definedCompression = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION || (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION;
|
|
123
|
+
return definedCompression === 'gzip' ? GrpcCompressionAlgorithm.GZIP : GrpcCompressionAlgorithm.NONE;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
exports.configureCompression = configureCompression;
|
|
127
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,sCAAsC;AACtC,kDAAkD;AAClD,4CAA0C;AAC1C,8CAAiE;AACjE,6BAA6B;AAE7B,6BAA0B;AAC1B,mCAAwF;AACxF,0EAAgH;AAEhH,SAAgB,MAAM,CACpB,SAA+D,EAC/D,MAAkC;IAElC,SAAS,CAAC,SAAS,GAAG,EAAE,CAAC;IACzB,MAAM,WAAW,GACf,MAAM,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC;IAE1D,MAAM,WAAW,GA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,CAAC,QAAQ,KAAK,EAAE,IAAI,CAAC,CAAA,MAAA,MAAM,CAAC,QAAQ,0CAAE,KAAK,CAAC,eAAe,CAAC,CAAA,EAAE;QACtE,UAAI,CAAC,IAAI,CACP,iEAAiE,CAClE,CAAC;KACH;IACD,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC;AAjBD,0DAiBC;AAED,SAAS,iBAAiB,CAAC,WAAiC;IAC1D,IAAG,WAAW,KAAK,yCAAoB,CAAC,IAAI;QAC1C,OAAO,wBAAwB,CAAC,IAAI,CAAC;SAClC,IAAI,WAAW,KAAK,yCAAoB,CAAC,IAAI;QAChD,OAAO,wBAAwB,CAAC,IAAI,CAAC;IACvC,OAAO,wBAAwB,CAAC,IAAI,CAAC;AACvC,CAAC;AAGD;;GAEG;AACH,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,uEAAQ,CAAA;IACR,uEAAQ,CAAA;AACV,CAAC,EAHW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAGnC;AAED,SAAgB,oBAAoB,CAAC,WAA6C;IAChF,IAAI,WAAW,EAAE;QACf,OAAO,iBAAiB,CAAC,WAAW,CAAC,CAAC;KACvC;SAAM;QACL,MAAM,kBAAkB,GAAG,IAAA,aAAM,GAAE,CAAC,qCAAqC,IAAI,IAAA,aAAM,GAAE,CAAC,8BAA8B,CAAC;QAErH,OAAO,kBAAkB,KAAK,MAAM,CAAC,CAAC,CAAC,wBAAwB,CAAC,IAAI,CAAA,CAAC,CAAC,wBAAwB,CAAC,IAAI,CAAC;KACrG;AACH,CAAC;AARD,oDAQC","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 * as grpc from '@grpc/grpc-js';\nimport * as protoLoader from '@grpc/proto-loader';\nimport { diag } from '@opentelemetry/api';\nimport { getEnv, globalErrorHandler } from '@opentelemetry/core';\nimport * as path from 'path';\nimport { OTLPGRPCExporterNodeBase } from './OTLPGRPCExporterNodeBase';\nimport { URL } from 'url';\nimport { GRPCQueueItem, OTLPGRPCExporterConfigNode, ServiceClientType, } from './types';\nimport { CompressionAlgorithm, ExportServiceError, OTLPExporterError } from '@opentelemetry/otlp-exporter-base';\n\nexport function onInit<ExportItem, ServiceRequest>(\n collector: OTLPGRPCExporterNodeBase<ExportItem, ServiceRequest>,\n config: OTLPGRPCExporterConfigNode\n): void {\n collector.grpcQueue = [];\n const credentials: grpc.ChannelCredentials =\n config.credentials || grpc.credentials.createInsecure();\n\n const includeDirs = [path.resolve(__dirname, '..', 'protos')];\n\n protoLoader\n .load(collector.getServiceProtoPath(), {\n keepCase: false,\n longs: String,\n enums: String,\n defaults: true,\n oneofs: true,\n includeDirs,\n })\n .then(packageDefinition => {\n const packageObject: any = grpc.loadPackageDefinition(packageDefinition);\n\n const options = { 'grpc.default_compression_algorithm': collector.compression };\n\n if (collector.getServiceClientType() === ServiceClientType.SPANS) {\n collector.serviceClient =\n new packageObject.opentelemetry.proto.collector.trace.v1.TraceService(\n collector.url,\n credentials,\n options,\n );\n } else {\n collector.serviceClient =\n new packageObject.opentelemetry.proto.collector.metrics.v1.MetricsService(\n collector.url,\n credentials,\n options,\n );\n }\n\n if (collector.grpcQueue.length > 0) {\n const queue = collector.grpcQueue.splice(0);\n queue.forEach((item: GRPCQueueItem<ExportItem>) => {\n collector.send(item.objects, item.onSuccess, item.onError);\n });\n }\n })\n .catch(err => {\n globalErrorHandler(err);\n });\n}\n\nexport function send<ExportItem, ServiceRequest>(\n collector: OTLPGRPCExporterNodeBase<ExportItem, ServiceRequest>,\n objects: ExportItem[],\n onSuccess: () => void,\n onError: (error: OTLPExporterError) => void\n): void {\n if (collector.serviceClient) {\n const serviceRequest = collector.convert(objects);\n\n collector.serviceClient.export(\n serviceRequest,\n collector.metadata || new grpc.Metadata(),\n (err: ExportServiceError) => {\n if (err) {\n diag.error('Service request', serviceRequest);\n onError(err);\n } else {\n diag.debug('Objects sent');\n onSuccess();\n }\n }\n );\n } else {\n collector.grpcQueue.push({\n objects,\n onSuccess,\n onError,\n });\n }\n}\n\nexport function validateAndNormalizeUrl(url: string): string {\n const hasProtocol = url.match(/^([\\w]{1,8}):\\/\\//);\n if (!hasProtocol) {\n url = `https://${url}`;\n }\n const target = new URL(url);\n if (target.pathname && target.pathname !== '/') {\n diag.warn(\n 'URL path should not be set when using grpc, the path part of the URL will be ignored.'\n );\n }\n if (target.protocol !== '' && !target.protocol?.match(/(http|grpc)s?/)) {\n diag.warn(\n 'URL protocol should be http(s):// or grpc(s)://. Using grpc://.'\n );\n }\n return target.host;\n}\n\nfunction toGrpcCompression(compression: CompressionAlgorithm): GrpcCompressionAlgorithm {\n if(compression === CompressionAlgorithm.NONE)\n return GrpcCompressionAlgorithm.NONE;\n else if (compression === CompressionAlgorithm.GZIP)\n return GrpcCompressionAlgorithm.GZIP;\n return GrpcCompressionAlgorithm.NONE;\n}\n\n\n/**\n * These values are defined by grpc client\n */\nexport enum GrpcCompressionAlgorithm {\n NONE = 0,\n GZIP = 2\n}\n\nexport function configureCompression(compression: CompressionAlgorithm | undefined): GrpcCompressionAlgorithm {\n if (compression) {\n return toGrpcCompression(compression);\n } else {\n const definedCompression = getEnv().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION || getEnv().OTEL_EXPORTER_OTLP_COMPRESSION;\n\n return definedCompression === 'gzip' ? GrpcCompressionAlgorithm.GZIP: GrpcCompressionAlgorithm.NONE;\n }\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
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.VERSION = void 0;
|
|
19
|
+
// this is autogenerated file, see scripts/version-update.js
|
|
20
|
+
exports.VERSION = '0.28.0';
|
|
21
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +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.28.0';\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@opentelemetry/otlp-grpc-exporter-base",
|
|
3
|
+
"version": "0.28.0",
|
|
4
|
+
"description": "OpenTelemetry OTLP-gRPC Exporter base (for internal use only)",
|
|
5
|
+
"main": "build/src/index.js",
|
|
6
|
+
"types": "build/src/index.d.ts",
|
|
7
|
+
"repository": "open-telemetry/opentelemetry-js",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"prepublishOnly": "npm run compile",
|
|
10
|
+
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
|
|
11
|
+
"compile": "tsc --build",
|
|
12
|
+
"clean": "tsc --build --clean",
|
|
13
|
+
"lint": "eslint . --ext .ts",
|
|
14
|
+
"lint:fix": "eslint . --ext .ts --fix",
|
|
15
|
+
"postcompile": "npm run submodule && npm run protos:copy",
|
|
16
|
+
"protos:copy": "cpx protos/opentelemetry/**/*.* build/protos/opentelemetry",
|
|
17
|
+
"submodule": "git submodule sync --recursive && git submodule update --init --recursive",
|
|
18
|
+
"tdd": "npm run test -- --watch-extensions ts --watch",
|
|
19
|
+
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
|
|
20
|
+
"version": "node ../../../scripts/version-update.js",
|
|
21
|
+
"watch": "npm run protos:copy && tsc -w",
|
|
22
|
+
"precompile": "lerna run version --scope $(npm pkg get name) --include-dependencies",
|
|
23
|
+
"prewatch": "npm run precompile"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"opentelemetry",
|
|
27
|
+
"nodejs",
|
|
28
|
+
"grpc",
|
|
29
|
+
"tracing",
|
|
30
|
+
"profiling",
|
|
31
|
+
"metrics",
|
|
32
|
+
"stats"
|
|
33
|
+
],
|
|
34
|
+
"author": "OpenTelemetry Authors",
|
|
35
|
+
"license": "Apache-2.0",
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=8.12.0"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"build/src/**/*.js",
|
|
41
|
+
"build/src/**/*.js.map",
|
|
42
|
+
"build/src/**/*.d.ts",
|
|
43
|
+
"build/protos/**/*.proto",
|
|
44
|
+
"doc",
|
|
45
|
+
"LICENSE",
|
|
46
|
+
"README.md"
|
|
47
|
+
],
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@babel/core": "7.16.0",
|
|
53
|
+
"@opentelemetry/api": "^1.0.0",
|
|
54
|
+
"@opentelemetry/exporter-trace-otlp-http": "0.28.0",
|
|
55
|
+
"@opentelemetry/resources": "1.2.0",
|
|
56
|
+
"@opentelemetry/sdk-trace-base": "1.2.0",
|
|
57
|
+
"@types/mocha": "8.2.3",
|
|
58
|
+
"@types/node": "14.17.33",
|
|
59
|
+
"@types/sinon": "10.0.6",
|
|
60
|
+
"codecov": "3.8.3",
|
|
61
|
+
"cpx": "1.5.0",
|
|
62
|
+
"mocha": "7.2.0",
|
|
63
|
+
"nyc": "15.1.0",
|
|
64
|
+
"rimraf": "3.0.2",
|
|
65
|
+
"sinon": "12.0.1",
|
|
66
|
+
"ts-loader": "8.3.0",
|
|
67
|
+
"ts-mocha": "8.0.0",
|
|
68
|
+
"typescript": "4.4.4"
|
|
69
|
+
},
|
|
70
|
+
"peerDependencies": {
|
|
71
|
+
"@opentelemetry/api": "^1.0.0"
|
|
72
|
+
},
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"@grpc/grpc-js": "^1.5.9",
|
|
75
|
+
"@grpc/proto-loader": "^0.6.9",
|
|
76
|
+
"@opentelemetry/core": "1.2.0",
|
|
77
|
+
"@opentelemetry/otlp-exporter-base": "0.28.0"
|
|
78
|
+
},
|
|
79
|
+
"gitHead": "a0a670a03fd35b0799bee8cc466f79e93b5b6dd2"
|
|
80
|
+
}
|