@opentelemetry/exporter-metrics-otlp-grpc 0.51.1 → 0.52.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 CHANGED
@@ -94,6 +94,5 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
94
94
  [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
95
95
  [npm-url]: https://www.npmjs.com/package/@opentelemetry/exporter-metrics-otlp-grpc
96
96
  [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fexporter-metrics-otlp-grpc.svg
97
- [opentelemetry-collector-url]: https://github.com/open-telemetry/opentelemetry-collector
98
97
  [semconv-resource-service-name]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/README.md#service
99
98
  [trace-exporter-url]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/exporter-trace-otlp-grpc
@@ -1,11 +1,10 @@
1
1
  import { OTLPMetricExporterBase, OTLPMetricExporterOptions } from '@opentelemetry/exporter-metrics-otlp-http';
2
2
  import { ResourceMetrics } from '@opentelemetry/sdk-metrics';
3
3
  import { OTLPGRPCExporterConfigNode, OTLPGRPCExporterNodeBase } from '@opentelemetry/otlp-grpc-exporter-base';
4
- import { IExportMetricsServiceRequest, IExportMetricsServiceResponse } from '@opentelemetry/otlp-transformer';
5
- declare class OTLPMetricExporterProxy extends OTLPGRPCExporterNodeBase<ResourceMetrics, IExportMetricsServiceRequest, IExportMetricsServiceResponse> {
4
+ import { IExportMetricsServiceResponse } from '@opentelemetry/otlp-transformer';
5
+ declare class OTLPMetricExporterProxy extends OTLPGRPCExporterNodeBase<ResourceMetrics, IExportMetricsServiceResponse> {
6
6
  constructor(config?: OTLPGRPCExporterConfigNode & OTLPMetricExporterOptions);
7
7
  getDefaultUrl(config: OTLPGRPCExporterConfigNode): string;
8
- convert(metrics: ResourceMetrics[]): IExportMetricsServiceRequest;
9
8
  getUrlFromConfig(config: OTLPGRPCExporterConfigNode): string;
10
9
  }
11
10
  /**
@@ -28,14 +28,11 @@ const USER_AGENT = {
28
28
  class OTLPMetricExporterProxy extends otlp_grpc_exporter_base_1.OTLPGRPCExporterNodeBase {
29
29
  constructor(config) {
30
30
  const signalSpecificMetadata = Object.assign(Object.assign(Object.assign({}, USER_AGENT), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_HEADERS)), (0, otlp_exporter_base_1.parseHeaders)(config === null || config === void 0 ? void 0 : config.headers));
31
- super(config, signalSpecificMetadata, 'MetricsExportService', '/opentelemetry.proto.collector.metrics.v1.MetricsService/Export', otlp_grpc_exporter_base_1.MetricsSerializer);
31
+ super(config, signalSpecificMetadata, 'MetricsExportService', '/opentelemetry.proto.collector.metrics.v1.MetricsService/Export', otlp_transformer_1.ProtobufMetricsSerializer);
32
32
  }
33
33
  getDefaultUrl(config) {
34
34
  return (0, otlp_grpc_exporter_base_1.validateAndNormalizeUrl)(this.getUrlFromConfig(config));
35
35
  }
36
- convert(metrics) {
37
- return (0, otlp_transformer_1.createExportMetricsServiceRequest)(metrics);
38
- }
39
36
  getUrlFromConfig(config) {
40
37
  if (typeof config.url === 'string') {
41
38
  return config.url;
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../src/OTLPMetricExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,0FAGmD;AAEnD,oFAMgD;AAChD,8CAA2D;AAC3D,sEAIyC;AACzC,uCAAoC;AACpC,0EAAiE;AAEjE,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,iCAAiC,iBAAO,EAAE;CACzD,CAAC;AAEF,MAAM,uBAAwB,SAAQ,kDAIrC;IACC,YAAY,MAA+D;QACzE,MAAM,sBAAsB,iDACvB,UAAU,GACV,mBAAY,CAAC,uBAAuB,CACrC,IAAA,aAAM,GAAE,CAAC,kCAAkC,CAC5C,GACE,IAAA,iCAAY,EAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,CACjC,CAAC;QACF,KAAK,CACH,MAAM,EACN,sBAAsB,EACtB,sBAAsB,EACtB,iEAAiE,EACjE,2CAAiB,CAClB,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,MAAkC;QAC9C,OAAO,IAAA,iDAAuB,EAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,OAAO,CAAC,OAA0B;QAChC,OAAO,IAAA,oDAAiC,EAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAED,gBAAgB,CAAC,MAAkC;QACjD,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,EAAE;YAClC,OAAO,MAAM,CAAC,GAAG,CAAC;SACnB;QAED,OAAO,CACL,IAAA,aAAM,GAAE,CAAC,mCAAmC;YAC5C,IAAA,aAAM,GAAE,CAAC,2BAA2B;YACpC,+CAAqB,CACtB,CAAC;IACJ,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 validateAndNormalizeUrl,\n DEFAULT_COLLECTOR_URL,\n MetricsSerializer,\n} from '@opentelemetry/otlp-grpc-exporter-base';\nimport { baggageUtils, getEnv } from '@opentelemetry/core';\nimport {\n createExportMetricsServiceRequest,\n IExportMetricsServiceRequest,\n IExportMetricsServiceResponse,\n} from '@opentelemetry/otlp-transformer';\nimport { VERSION } from './version';\nimport { parseHeaders } from '@opentelemetry/otlp-exporter-base';\n\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\nclass OTLPMetricExporterProxy extends OTLPGRPCExporterNodeBase<\n ResourceMetrics,\n IExportMetricsServiceRequest,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPGRPCExporterConfigNode & OTLPMetricExporterOptions) {\n const signalSpecificMetadata = {\n ...USER_AGENT,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS\n ),\n ...parseHeaders(config?.headers),\n };\n super(\n config,\n signalSpecificMetadata,\n 'MetricsExportService',\n '/opentelemetry.proto.collector.metrics.v1.MetricsService/Export',\n MetricsSerializer\n );\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"]}
1
+ {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../src/OTLPMetricExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,0FAGmD;AAEnD,oFAKgD;AAChD,8CAA2D;AAC3D,sEAGyC;AACzC,uCAAoC;AACpC,0EAAiE;AAEjE,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,iCAAiC,iBAAO,EAAE;CACzD,CAAC;AAEF,MAAM,uBAAwB,SAAQ,kDAGrC;IACC,YAAY,MAA+D;QACzE,MAAM,sBAAsB,iDACvB,UAAU,GACV,mBAAY,CAAC,uBAAuB,CACrC,IAAA,aAAM,GAAE,CAAC,kCAAkC,CAC5C,GACE,IAAA,iCAAY,EAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,CACjC,CAAC;QACF,KAAK,CACH,MAAM,EACN,sBAAsB,EACtB,sBAAsB,EACtB,iEAAiE,EACjE,4CAAyB,CAC1B,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,MAAkC;QAC9C,OAAO,IAAA,iDAAuB,EAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,gBAAgB,CAAC,MAAkC;QACjD,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,EAAE;YAClC,OAAO,MAAM,CAAC,GAAG,CAAC;SACnB;QAED,OAAO,CACL,IAAA,aAAM,GAAE,CAAC,mCAAmC;YAC5C,IAAA,aAAM,GAAE,CAAC,2BAA2B;YACpC,+CAAqB,CACtB,CAAC;IACJ,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 validateAndNormalizeUrl,\n DEFAULT_COLLECTOR_URL,\n} from '@opentelemetry/otlp-grpc-exporter-base';\nimport { baggageUtils, getEnv } from '@opentelemetry/core';\nimport {\n IExportMetricsServiceResponse,\n ProtobufMetricsSerializer,\n} from '@opentelemetry/otlp-transformer';\nimport { VERSION } from './version';\nimport { parseHeaders } from '@opentelemetry/otlp-exporter-base';\n\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\nclass OTLPMetricExporterProxy extends OTLPGRPCExporterNodeBase<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPGRPCExporterConfigNode & OTLPMetricExporterOptions) {\n const signalSpecificMetadata = {\n ...USER_AGENT,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS\n ),\n ...parseHeaders(config?.headers),\n };\n super(\n config,\n signalSpecificMetadata,\n 'MetricsExportService',\n '/opentelemetry.proto.collector.metrics.v1.MetricsService/Export',\n ProtobufMetricsSerializer\n );\n }\n\n getDefaultUrl(config: OTLPGRPCExporterConfigNode): string {\n return validateAndNormalizeUrl(this.getUrlFromConfig(config));\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"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.51.1";
1
+ export declare const VERSION = "0.52.1";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -17,5 +17,5 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.VERSION = void 0;
19
19
  // this is autogenerated file, see scripts/version-update.js
20
- exports.VERSION = '0.51.1';
20
+ exports.VERSION = '0.52.1';
21
21
  //# sourceMappingURL=version.js.map
@@ -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.51.1';\n"]}
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.52.1';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/exporter-metrics-otlp-grpc",
3
- "version": "0.51.1",
3
+ "version": "0.52.1",
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",
@@ -18,7 +18,9 @@
18
18
  "precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
19
19
  "prewatch": "npm run precompile",
20
20
  "peer-api-check": "node ../../../scripts/peer-api-check.js",
21
- "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../"
21
+ "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
22
+ "align-api-deps": "node ../../../scripts/align-api-deps.js",
23
+ "maint:regenerate-test-certs": "cd test/certs && ./regenerate.sh"
22
24
  },
23
25
  "keywords": [
24
26
  "opentelemetry",
@@ -48,18 +50,17 @@
48
50
  },
49
51
  "devDependencies": {
50
52
  "@grpc/proto-loader": "^0.7.10",
51
- "@opentelemetry/api": "1.8.0",
53
+ "@opentelemetry/api": "1.9.0",
52
54
  "@types/mocha": "10.0.6",
53
55
  "@types/node": "18.6.5",
54
- "@types/sinon": "10.0.20",
56
+ "@types/sinon": "17.0.3",
55
57
  "codecov": "3.8.3",
56
- "cpx": "1.5.0",
57
58
  "cross-var": "1.1.0",
58
59
  "lerna": "6.6.2",
59
60
  "mocha": "10.2.0",
60
61
  "nyc": "15.1.0",
61
62
  "sinon": "15.1.2",
62
- "ts-loader": "8.4.0",
63
+ "ts-loader": "9.5.1",
63
64
  "ts-mocha": "10.0.0",
64
65
  "typescript": "4.4.4"
65
66
  },
@@ -68,15 +69,15 @@
68
69
  },
69
70
  "dependencies": {
70
71
  "@grpc/grpc-js": "^1.7.1",
71
- "@opentelemetry/core": "1.24.1",
72
- "@opentelemetry/exporter-metrics-otlp-http": "0.51.1",
73
- "@opentelemetry/otlp-exporter-base": "0.51.1",
74
- "@opentelemetry/otlp-grpc-exporter-base": "0.51.1",
75
- "@opentelemetry/otlp-transformer": "0.51.1",
76
- "@opentelemetry/resources": "1.24.1",
77
- "@opentelemetry/sdk-metrics": "1.24.1"
72
+ "@opentelemetry/core": "1.25.1",
73
+ "@opentelemetry/exporter-metrics-otlp-http": "0.52.1",
74
+ "@opentelemetry/otlp-exporter-base": "0.52.1",
75
+ "@opentelemetry/otlp-grpc-exporter-base": "0.52.1",
76
+ "@opentelemetry/otlp-transformer": "0.52.1",
77
+ "@opentelemetry/resources": "1.25.1",
78
+ "@opentelemetry/sdk-metrics": "1.25.1"
78
79
  },
79
80
  "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc",
80
81
  "sideEffects": false,
81
- "gitHead": "41c2626fe0ed03e2e83bd79ee43c9bdf0ffd80d8"
82
+ "gitHead": "0608f405573901e54db01e44c533009cf28be262"
82
83
  }