@opentelemetry/exporter-metrics-otlp-grpc 0.45.0 → 0.46.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.
|
@@ -28,7 +28,7 @@ const USER_AGENT = {
|
|
|
28
28
|
class OTLPMetricExporterProxy extends otlp_grpc_exporter_base_1.OTLPGRPCExporterNodeBase {
|
|
29
29
|
constructor(config) {
|
|
30
30
|
super(config);
|
|
31
|
-
const headers = Object.assign(Object.assign({}, USER_AGENT), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_HEADERS));
|
|
31
|
+
const headers = Object.assign(Object.assign(Object.assign({}, USER_AGENT), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_HEADERS)), config === null || config === void 0 ? void 0 : config.headers);
|
|
32
32
|
this.metadata || (this.metadata = new grpc_js_1.Metadata());
|
|
33
33
|
for (const [k, v] of Object.entries(headers)) {
|
|
34
34
|
this.metadata.set(k, v);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../src/OTLPMetricExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,0FAGmD;AAEnD,oFAMgD;AAChD,8CAA2D;AAC3D,2CAAyC;AACzC,sEAGyC;AACzC,uCAAoC;AAEpC,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,iCAAiC,iBAAO,EAAE;CACzD,CAAC;AAEF,MAAM,uBAAwB,SAAQ,kDAGrC;IACC,YAAY,MAA+D;QACzE,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../src/OTLPMetricExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,0FAGmD;AAEnD,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,CAAC;CACF;AAED;;GAEG;AACH,MAAa,kBAAmB,SAAQ,mDAA+C;IACrF,YAAY,MAA+D;QACzE,KAAK,CAAC,IAAI,uBAAuB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IACrD,CAAC;CACF;AAJD,gDAIC","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 {\n OTLPMetricExporterBase,\n OTLPMetricExporterOptions,\n} from '@opentelemetry/exporter-metrics-otlp-http';\nimport { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport {\n OTLPGRPCExporterConfigNode,\n OTLPGRPCExporterNodeBase,\n ServiceClientType,\n validateAndNormalizeUrl,\n DEFAULT_COLLECTOR_URL,\n} from '@opentelemetry/otlp-grpc-exporter-base';\nimport { baggageUtils, getEnv } from '@opentelemetry/core';\nimport { Metadata } from '@grpc/grpc-js';\nimport {\n createExportMetricsServiceRequest,\n IExportMetricsServiceRequest,\n} from '@opentelemetry/otlp-transformer';\nimport { VERSION } from './version';\n\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\nclass OTLPMetricExporterProxy extends OTLPGRPCExporterNodeBase<\n ResourceMetrics,\n IExportMetricsServiceRequest\n> {\n constructor(config?: OTLPGRPCExporterConfigNode & OTLPMetricExporterOptions) {\n super(config);\n const headers = {\n ...USER_AGENT,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS\n ),\n ...config?.headers,\n };\n\n this.metadata ||= new Metadata();\n for (const [k, v] of Object.entries(headers)) {\n this.metadata.set(k, v);\n }\n }\n\n getServiceProtoPath(): string {\n return 'opentelemetry/proto/collector/metrics/v1/metrics_service.proto';\n }\n\n getServiceClientType(): ServiceClientType {\n return ServiceClientType.METRICS;\n }\n\n getDefaultUrl(config: OTLPGRPCExporterConfigNode): string {\n return validateAndNormalizeUrl(this.getUrlFromConfig(config));\n }\n\n convert(metrics: ResourceMetrics[]): IExportMetricsServiceRequest {\n return createExportMetricsServiceRequest(metrics);\n }\n\n getUrlFromConfig(config: OTLPGRPCExporterConfigNode): string {\n if (typeof config.url === 'string') {\n return config.url;\n }\n\n return (\n getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT ||\n getEnv().OTEL_EXPORTER_OTLP_ENDPOINT ||\n DEFAULT_COLLECTOR_URL\n );\n }\n}\n\n/**\n * OTLP-gRPC metric exporter\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase<OTLPMetricExporterProxy> {\n constructor(config?: OTLPGRPCExporterConfigNode & OTLPMetricExporterOptions) {\n super(new OTLPMetricExporterProxy(config), config);\n }\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.46.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.46.0';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/exporter-metrics-otlp-grpc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
4
4
|
"description": "OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"types": "build/src/index.d.ts",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@babel/core": "7.
|
|
50
|
+
"@babel/core": "7.23.6",
|
|
51
51
|
"@grpc/proto-loader": "^0.7.10",
|
|
52
52
|
"@opentelemetry/api": "1.7.0",
|
|
53
|
-
"@types/mocha": "10.0.
|
|
53
|
+
"@types/mocha": "10.0.6",
|
|
54
54
|
"@types/node": "18.6.5",
|
|
55
55
|
"@types/sinon": "10.0.20",
|
|
56
56
|
"codecov": "3.8.3",
|
|
@@ -69,14 +69,14 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@grpc/grpc-js": "^1.7.1",
|
|
72
|
-
"@opentelemetry/core": "1.
|
|
73
|
-
"@opentelemetry/exporter-metrics-otlp-http": "0.
|
|
74
|
-
"@opentelemetry/otlp-grpc-exporter-base": "0.
|
|
75
|
-
"@opentelemetry/otlp-transformer": "0.
|
|
76
|
-
"@opentelemetry/resources": "1.
|
|
77
|
-
"@opentelemetry/sdk-metrics": "1.
|
|
72
|
+
"@opentelemetry/core": "1.19.0",
|
|
73
|
+
"@opentelemetry/exporter-metrics-otlp-http": "0.46.0",
|
|
74
|
+
"@opentelemetry/otlp-grpc-exporter-base": "0.46.0",
|
|
75
|
+
"@opentelemetry/otlp-transformer": "0.46.0",
|
|
76
|
+
"@opentelemetry/resources": "1.19.0",
|
|
77
|
+
"@opentelemetry/sdk-metrics": "1.19.0"
|
|
78
78
|
},
|
|
79
79
|
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc",
|
|
80
80
|
"sideEffects": false,
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "d3c311aec24137084dc820805a2597e120335672"
|
|
82
82
|
}
|