@opentelemetry/exporter-metrics-otlp-http 0.53.0 → 0.54.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.
Files changed (28) hide show
  1. package/build/esm/platform/browser/OTLPMetricExporter.d.ts +0 -1
  2. package/build/esm/platform/browser/OTLPMetricExporter.js +1 -8
  3. package/build/esm/platform/browser/OTLPMetricExporter.js.map +1 -1
  4. package/build/esm/platform/node/OTLPMetricExporter.d.ts +0 -1
  5. package/build/esm/platform/node/OTLPMetricExporter.js +2 -18
  6. package/build/esm/platform/node/OTLPMetricExporter.js.map +1 -1
  7. package/build/esm/version.d.ts +1 -1
  8. package/build/esm/version.js +1 -1
  9. package/build/esm/version.js.map +1 -1
  10. package/build/esnext/platform/browser/OTLPMetricExporter.d.ts +0 -1
  11. package/build/esnext/platform/browser/OTLPMetricExporter.js +1 -8
  12. package/build/esnext/platform/browser/OTLPMetricExporter.js.map +1 -1
  13. package/build/esnext/platform/node/OTLPMetricExporter.d.ts +0 -1
  14. package/build/esnext/platform/node/OTLPMetricExporter.js +2 -18
  15. package/build/esnext/platform/node/OTLPMetricExporter.js.map +1 -1
  16. package/build/esnext/version.d.ts +1 -1
  17. package/build/esnext/version.js +1 -1
  18. package/build/esnext/version.js.map +1 -1
  19. package/build/src/platform/browser/OTLPMetricExporter.d.ts +0 -1
  20. package/build/src/platform/browser/OTLPMetricExporter.js +1 -8
  21. package/build/src/platform/browser/OTLPMetricExporter.js.map +1 -1
  22. package/build/src/platform/node/OTLPMetricExporter.d.ts +0 -1
  23. package/build/src/platform/node/OTLPMetricExporter.js +1 -17
  24. package/build/src/platform/node/OTLPMetricExporter.js.map +1 -1
  25. package/build/src/version.d.ts +1 -1
  26. package/build/src/version.js +1 -1
  27. package/build/src/version.js.map +1 -1
  28. package/package.json +11 -14
@@ -5,7 +5,6 @@ import { OTLPExporterBrowserBase, OTLPExporterConfigBase } from '@opentelemetry/
5
5
  import { IExportMetricsServiceResponse } from '@opentelemetry/otlp-transformer';
6
6
  declare class OTLPExporterBrowserProxy extends OTLPExporterBrowserBase<ResourceMetrics, IExportMetricsServiceResponse> {
7
7
  constructor(config?: OTLPMetricExporterOptions & OTLPExporterConfigBase);
8
- getDefaultUrl(config: OTLPExporterConfigBase): string;
9
8
  }
10
9
  /**
11
10
  * Collector Metric Exporter for Web
@@ -32,18 +32,11 @@ import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';
32
32
  import { OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base';
33
33
  import { JsonMetricsSerializer, } from '@opentelemetry/otlp-transformer';
34
34
  var DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';
35
- var DEFAULT_COLLECTOR_URL = "http://localhost:4318/" + DEFAULT_COLLECTOR_RESOURCE_PATH;
36
35
  var OTLPExporterBrowserProxy = /** @class */ (function (_super) {
37
36
  __extends(OTLPExporterBrowserProxy, _super);
38
37
  function OTLPExporterBrowserProxy(config) {
39
- return _super.call(this, config, JsonMetricsSerializer, 'application/json') || this;
38
+ return _super.call(this, config, JsonMetricsSerializer, { 'Content-Type': 'application/json' }, DEFAULT_COLLECTOR_RESOURCE_PATH) || this;
40
39
  }
41
- OTLPExporterBrowserProxy.prototype.getDefaultUrl = function (config) {
42
- if (typeof config.url === 'string') {
43
- return config.url;
44
- }
45
- return DEFAULT_COLLECTOR_URL;
46
- };
47
40
  return OTLPExporterBrowserProxy;
48
41
  }(OTLPExporterBrowserBase));
49
42
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPMetricExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACL,uBAAuB,GAExB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AAEzC,IAAM,+BAA+B,GAAG,YAAY,CAAC;AACrD,IAAM,qBAAqB,GAAG,2BAAyB,+BAAiC,CAAC;AAEzF;IAAuC,4CAGtC;IACC,kCAAY,MAA2D;eACrE,kBAAM,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,CAAC;IAC1D,CAAC;IAED,gDAAa,GAAb,UAAc,MAA8B;QAC1C,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,EAAE;YAClC,OAAO,MAAM,CAAC,GAAG,CAAC;SACnB;QAED,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACH,+BAAC;AAAD,CAAC,AAfD,CAAuC,uBAAuB,GAe7D;AAED;;GAEG;AACH;IAAwC,sCAAgD;IACtF,4BAAY,MAA2D;eACrE,kBAAM,IAAI,wBAAwB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACrD,CAAC;IACH,yBAAC;AAAD,CAAC,AAJD,CAAwC,sBAAsB,GAI7D","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 { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterBrowserBase,\n OTLPExporterConfigBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportMetricsServiceResponse,\n JsonMetricsSerializer,\n} from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\n\nclass OTLPExporterBrowserProxy extends OTLPExporterBrowserBase<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPMetricExporterOptions & OTLPExporterConfigBase) {\n super(config, JsonMetricsSerializer, 'application/json');\n }\n\n getDefaultUrl(config: OTLPExporterConfigBase): string {\n if (typeof config.url === 'string') {\n return config.url;\n }\n\n return DEFAULT_COLLECTOR_URL;\n }\n}\n\n/**\n * Collector Metric Exporter for Web\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase<OTLPExporterBrowserProxy> {\n constructor(config?: OTLPExporterConfigBase & OTLPMetricExporterOptions) {\n super(new OTLPExporterBrowserProxy(config), config);\n }\n}\n"]}
1
+ {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPMetricExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACL,uBAAuB,GAExB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AAEzC,IAAM,+BAA+B,GAAG,YAAY,CAAC;AAErD;IAAuC,4CAGtC;IACC,kCAAY,MAA2D;eACrE,kBACE,MAAM,EACN,qBAAqB,EACrB,EAAE,cAAc,EAAE,kBAAkB,EAAE,EACtC,+BAA+B,CAChC;IACH,CAAC;IACH,+BAAC;AAAD,CAAC,AAZD,CAAuC,uBAAuB,GAY7D;AAED;;GAEG;AACH;IAAwC,sCAAgD;IACtF,4BAAY,MAA2D;eACrE,kBAAM,IAAI,wBAAwB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACrD,CAAC;IACH,yBAAC;AAAD,CAAC,AAJD,CAAwC,sBAAsB,GAI7D","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 { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterBrowserBase,\n OTLPExporterConfigBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportMetricsServiceResponse,\n JsonMetricsSerializer,\n} from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';\n\nclass OTLPExporterBrowserProxy extends OTLPExporterBrowserBase<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPMetricExporterOptions & OTLPExporterConfigBase) {\n super(\n config,\n JsonMetricsSerializer,\n { 'Content-Type': 'application/json' },\n DEFAULT_COLLECTOR_RESOURCE_PATH\n );\n }\n}\n\n/**\n * Collector Metric Exporter for Web\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase<OTLPExporterBrowserProxy> {\n constructor(config?: OTLPExporterConfigBase & OTLPMetricExporterOptions) {\n super(new OTLPExporterBrowserProxy(config), config);\n }\n}\n"]}
@@ -5,7 +5,6 @@ import { OTLPExporterNodeBase, OTLPExporterNodeConfigBase } from '@opentelemetry
5
5
  import { IExportMetricsServiceResponse } from '@opentelemetry/otlp-transformer';
6
6
  declare class OTLPExporterNodeProxy extends OTLPExporterNodeBase<ResourceMetrics, IExportMetricsServiceResponse> {
7
7
  constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions);
8
- getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
9
8
  }
10
9
  /**
11
10
  * Collector Metric Exporter for Node
@@ -39,34 +39,18 @@ var __assign = (this && this.__assign) || function () {
39
39
  };
40
40
  return __assign.apply(this, arguments);
41
41
  };
42
- import { getEnv, baggageUtils } from '@opentelemetry/core';
43
42
  import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';
44
- import { OTLPExporterNodeBase, appendResourcePathToUrl, appendRootPathToUrlIfNeeded, parseHeaders, } from '@opentelemetry/otlp-exporter-base';
43
+ import { OTLPExporterNodeBase, } from '@opentelemetry/otlp-exporter-base';
45
44
  import { JsonMetricsSerializer, } from '@opentelemetry/otlp-transformer';
46
45
  import { VERSION } from '../../version';
47
- var DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';
48
- var DEFAULT_COLLECTOR_URL = "http://localhost:4318/" + DEFAULT_COLLECTOR_RESOURCE_PATH;
49
46
  var USER_AGENT = {
50
47
  'User-Agent': "OTel-OTLP-Exporter-JavaScript/" + VERSION,
51
48
  };
52
49
  var OTLPExporterNodeProxy = /** @class */ (function (_super) {
53
50
  __extends(OTLPExporterNodeProxy, _super);
54
51
  function OTLPExporterNodeProxy(config) {
55
- return _super.call(this, config, JsonMetricsSerializer, __assign(__assign(__assign(__assign({}, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers)), USER_AGENT), { 'Content-Type': 'application/json' })) || this;
52
+ return _super.call(this, config, JsonMetricsSerializer, __assign(__assign({}, USER_AGENT), { 'Content-Type': 'application/json' }), 'METRICS', 'v1/metrics') || this;
56
53
  }
57
- OTLPExporterNodeProxy.prototype.getDefaultUrl = function (config) {
58
- if (typeof config.url === 'string') {
59
- return config.url;
60
- }
61
- var env = getEnv();
62
- if (env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0) {
63
- return appendRootPathToUrlIfNeeded(env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT);
64
- }
65
- if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) {
66
- return appendResourcePathToUrl(env.OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH);
67
- }
68
- return DEFAULT_COLLECTOR_URL;
69
- };
70
54
  return OTLPExporterNodeProxy;
71
55
  }(OTLPExporterNodeBase));
72
56
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPMetricExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACL,oBAAoB,EAEpB,uBAAuB,EACvB,2BAA2B,EAC3B,YAAY,GACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,IAAM,+BAA+B,GAAG,YAAY,CAAC;AACrD,IAAM,qBAAqB,GAAG,2BAAyB,+BAAiC,CAAC;AACzF,IAAM,UAAU,GAAG;IACjB,YAAY,EAAE,mCAAiC,OAAS;CACzD,CAAC;AAEF;IAAoC,yCAGnC;IACC,+BAAY,MAA+D;eACzE,kBAAM,MAAM,EAAE,qBAAqB,0CAC9B,YAAY,CAAC,uBAAuB,CACrC,MAAM,EAAE,CAAC,kCAAkC,CAC5C,GACE,YAAY,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,GAC7B,UAAU,KACb,cAAc,EAAE,kBAAkB,IAClC;IACJ,CAAC;IAED,6CAAa,GAAb,UAAc,MAAkC;QAC9C,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,EAAE;YAClC,OAAO,MAAM,CAAC,GAAG,CAAC;SACnB;QAED,IAAM,GAAG,GAAG,MAAM,EAAE,CAAC;QACrB,IAAI,GAAG,CAAC,mCAAmC,CAAC,MAAM,GAAG,CAAC,EAAE;YACtD,OAAO,2BAA2B,CAChC,GAAG,CAAC,mCAAmC,CACxC,CAAC;SACH;QAED,IAAI,GAAG,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9C,OAAO,uBAAuB,CAC5B,GAAG,CAAC,2BAA2B,EAC/B,+BAA+B,CAChC,CAAC;SACH;QAED,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACH,4BAAC;AAAD,CAAC,AApCD,CAAoC,oBAAoB,GAoCvD;AAED;;GAEG;AACH;IAAwC,sCAA6C;IACnF,4BAAY,MAA+D;eACzE,kBAAM,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAClD,CAAC;IACH,yBAAC;AAAD,CAAC,AAJD,CAAwC,sBAAsB,GAI7D","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 { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterNodeBase,\n OTLPExporterNodeConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\n parseHeaders,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportMetricsServiceResponse,\n JsonMetricsSerializer,\n} from '@opentelemetry/otlp-transformer';\nimport { VERSION } from '../../version';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\nclass OTLPExporterNodeProxy extends OTLPExporterNodeBase<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions) {\n super(config, JsonMetricsSerializer, {\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS\n ),\n ...parseHeaders(config?.headers),\n ...USER_AGENT,\n 'Content-Type': 'application/json',\n });\n }\n\n getDefaultUrl(config: OTLPExporterNodeConfigBase): string {\n if (typeof config.url === 'string') {\n return config.url;\n }\n\n const env = getEnv();\n if (env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0) {\n return appendRootPathToUrlIfNeeded(\n env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT\n );\n }\n\n if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) {\n return appendResourcePathToUrl(\n env.OTEL_EXPORTER_OTLP_ENDPOINT,\n DEFAULT_COLLECTOR_RESOURCE_PATH\n );\n }\n\n return DEFAULT_COLLECTOR_URL;\n }\n}\n\n/**\n * Collector Metric Exporter for Node\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase<OTLPExporterNodeProxy> {\n constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions) {\n super(new OTLPExporterNodeProxy(config), config);\n }\n}\n"]}
1
+ {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPMetricExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACL,oBAAoB,GAErB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,IAAM,UAAU,GAAG;IACjB,YAAY,EAAE,mCAAiC,OAAS;CACzD,CAAC;AAEF;IAAoC,yCAGnC;IACC,+BAAY,MAA+D;eACzE,kBACE,MAAM,EACN,qBAAqB,wBAEhB,UAAU,KACb,cAAc,EAAE,kBAAkB,KAEpC,SAAS,EACT,YAAY,CACb;IACH,CAAC;IACH,4BAAC;AAAD,CAAC,AAhBD,CAAoC,oBAAoB,GAgBvD;AAED;;GAEG;AACH;IAAwC,sCAA6C;IACnF,4BAAY,MAA+D;eACzE,kBAAM,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAClD,CAAC;IACH,yBAAC;AAAD,CAAC,AAJD,CAAwC,sBAAsB,GAI7D","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 { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterNodeBase,\n OTLPExporterNodeConfigBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportMetricsServiceResponse,\n JsonMetricsSerializer,\n} from '@opentelemetry/otlp-transformer';\nimport { VERSION } from '../../version';\n\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\nclass OTLPExporterNodeProxy extends OTLPExporterNodeBase<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions) {\n super(\n config,\n JsonMetricsSerializer,\n {\n ...USER_AGENT,\n 'Content-Type': 'application/json',\n },\n 'METRICS',\n 'v1/metrics'\n );\n }\n}\n\n/**\n * Collector Metric Exporter for Node\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase<OTLPExporterNodeProxy> {\n constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions) {\n super(new OTLPExporterNodeProxy(config), config);\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.53.0";
1
+ export declare const VERSION = "0.54.1";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // this is autogenerated file, see scripts/version-update.js
17
- export var VERSION = '0.53.0';
17
+ export var VERSION = '0.54.1';
18
18
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,IAAM,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.53.0';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,IAAM,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.54.1';\n"]}
@@ -5,7 +5,6 @@ import { OTLPExporterBrowserBase, OTLPExporterConfigBase } from '@opentelemetry/
5
5
  import { IExportMetricsServiceResponse } from '@opentelemetry/otlp-transformer';
6
6
  declare class OTLPExporterBrowserProxy extends OTLPExporterBrowserBase<ResourceMetrics, IExportMetricsServiceResponse> {
7
7
  constructor(config?: OTLPMetricExporterOptions & OTLPExporterConfigBase);
8
- getDefaultUrl(config: OTLPExporterConfigBase): string;
9
8
  }
10
9
  /**
11
10
  * Collector Metric Exporter for Web
@@ -17,16 +17,9 @@ import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';
17
17
  import { OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base';
18
18
  import { JsonMetricsSerializer, } from '@opentelemetry/otlp-transformer';
19
19
  const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';
20
- const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
21
20
  class OTLPExporterBrowserProxy extends OTLPExporterBrowserBase {
22
21
  constructor(config) {
23
- super(config, JsonMetricsSerializer, 'application/json');
24
- }
25
- getDefaultUrl(config) {
26
- if (typeof config.url === 'string') {
27
- return config.url;
28
- }
29
- return DEFAULT_COLLECTOR_URL;
22
+ super(config, JsonMetricsSerializer, { 'Content-Type': 'application/json' }, DEFAULT_COLLECTOR_RESOURCE_PATH);
30
23
  }
31
24
  }
32
25
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPMetricExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACL,uBAAuB,GAExB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,+BAA+B,GAAG,YAAY,CAAC;AACrD,MAAM,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AAEzF,MAAM,wBAAyB,SAAQ,uBAGtC;IACC,YAAY,MAA2D;QACrE,KAAK,CAAC,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,CAAC,CAAC;IAC3D,CAAC;IAED,aAAa,CAAC,MAA8B;QAC1C,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,EAAE;YAClC,OAAO,MAAM,CAAC,GAAG,CAAC;SACnB;QAED,OAAO,qBAAqB,CAAC;IAC/B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,sBAAgD;IACtF,YAAY,MAA2D;QACrE,KAAK,CAAC,IAAI,wBAAwB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;CACF","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 { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterBrowserBase,\n OTLPExporterConfigBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportMetricsServiceResponse,\n JsonMetricsSerializer,\n} from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\n\nclass OTLPExporterBrowserProxy extends OTLPExporterBrowserBase<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPMetricExporterOptions & OTLPExporterConfigBase) {\n super(config, JsonMetricsSerializer, 'application/json');\n }\n\n getDefaultUrl(config: OTLPExporterConfigBase): string {\n if (typeof config.url === 'string') {\n return config.url;\n }\n\n return DEFAULT_COLLECTOR_URL;\n }\n}\n\n/**\n * Collector Metric Exporter for Web\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase<OTLPExporterBrowserProxy> {\n constructor(config?: OTLPExporterConfigBase & OTLPMetricExporterOptions) {\n super(new OTLPExporterBrowserProxy(config), config);\n }\n}\n"]}
1
+ {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPMetricExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACL,uBAAuB,GAExB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,+BAA+B,GAAG,YAAY,CAAC;AAErD,MAAM,wBAAyB,SAAQ,uBAGtC;IACC,YAAY,MAA2D;QACrE,KAAK,CACH,MAAM,EACN,qBAAqB,EACrB,EAAE,cAAc,EAAE,kBAAkB,EAAE,EACtC,+BAA+B,CAChC,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,sBAAgD;IACtF,YAAY,MAA2D;QACrE,KAAK,CAAC,IAAI,wBAAwB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;CACF","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 { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterBrowserBase,\n OTLPExporterConfigBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportMetricsServiceResponse,\n JsonMetricsSerializer,\n} from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';\n\nclass OTLPExporterBrowserProxy extends OTLPExporterBrowserBase<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPMetricExporterOptions & OTLPExporterConfigBase) {\n super(\n config,\n JsonMetricsSerializer,\n { 'Content-Type': 'application/json' },\n DEFAULT_COLLECTOR_RESOURCE_PATH\n );\n }\n}\n\n/**\n * Collector Metric Exporter for Web\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase<OTLPExporterBrowserProxy> {\n constructor(config?: OTLPExporterConfigBase & OTLPMetricExporterOptions) {\n super(new OTLPExporterBrowserProxy(config), config);\n }\n}\n"]}
@@ -5,7 +5,6 @@ import { OTLPExporterNodeBase, OTLPExporterNodeConfigBase } from '@opentelemetry
5
5
  import { IExportMetricsServiceResponse } from '@opentelemetry/otlp-transformer';
6
6
  declare class OTLPExporterNodeProxy extends OTLPExporterNodeBase<ResourceMetrics, IExportMetricsServiceResponse> {
7
7
  constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions);
8
- getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
9
8
  }
10
9
  /**
11
10
  * Collector Metric Exporter for Node
@@ -13,32 +13,16 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { getEnv, baggageUtils } from '@opentelemetry/core';
17
16
  import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';
18
- import { OTLPExporterNodeBase, appendResourcePathToUrl, appendRootPathToUrlIfNeeded, parseHeaders, } from '@opentelemetry/otlp-exporter-base';
17
+ import { OTLPExporterNodeBase, } from '@opentelemetry/otlp-exporter-base';
19
18
  import { JsonMetricsSerializer, } from '@opentelemetry/otlp-transformer';
20
19
  import { VERSION } from '../../version';
21
- const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';
22
- const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
23
20
  const USER_AGENT = {
24
21
  'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,
25
22
  };
26
23
  class OTLPExporterNodeProxy extends OTLPExporterNodeBase {
27
24
  constructor(config) {
28
- super(config, JsonMetricsSerializer, Object.assign(Object.assign(Object.assign(Object.assign({}, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers)), USER_AGENT), { 'Content-Type': 'application/json' }));
29
- }
30
- getDefaultUrl(config) {
31
- if (typeof config.url === 'string') {
32
- return config.url;
33
- }
34
- const env = getEnv();
35
- if (env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0) {
36
- return appendRootPathToUrlIfNeeded(env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT);
37
- }
38
- if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) {
39
- return appendResourcePathToUrl(env.OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH);
40
- }
41
- return DEFAULT_COLLECTOR_URL;
25
+ super(config, JsonMetricsSerializer, Object.assign(Object.assign({}, USER_AGENT), { 'Content-Type': 'application/json' }), 'METRICS', 'v1/metrics');
42
26
  }
43
27
  }
44
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPMetricExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACL,oBAAoB,EAEpB,uBAAuB,EACvB,2BAA2B,EAC3B,YAAY,GACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,+BAA+B,GAAG,YAAY,CAAC;AACrD,MAAM,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AACzF,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,iCAAiC,OAAO,EAAE;CACzD,CAAC;AAEF,MAAM,qBAAsB,SAAQ,oBAGnC;IACC,YAAY,MAA+D;QACzE,KAAK,CAAC,MAAM,EAAE,qBAAqB,8DAC9B,YAAY,CAAC,uBAAuB,CACrC,MAAM,EAAE,CAAC,kCAAkC,CAC5C,GACE,YAAY,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,GAC7B,UAAU,KACb,cAAc,EAAE,kBAAkB,IAClC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,MAAkC;QAC9C,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,EAAE;YAClC,OAAO,MAAM,CAAC,GAAG,CAAC;SACnB;QAED,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;QACrB,IAAI,GAAG,CAAC,mCAAmC,CAAC,MAAM,GAAG,CAAC,EAAE;YACtD,OAAO,2BAA2B,CAChC,GAAG,CAAC,mCAAmC,CACxC,CAAC;SACH;QAED,IAAI,GAAG,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9C,OAAO,uBAAuB,CAC5B,GAAG,CAAC,2BAA2B,EAC/B,+BAA+B,CAChC,CAAC;SACH;QAED,OAAO,qBAAqB,CAAC;IAC/B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,sBAA6C;IACnF,YAAY,MAA+D;QACzE,KAAK,CAAC,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;CACF","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 { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterNodeBase,\n OTLPExporterNodeConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\n parseHeaders,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportMetricsServiceResponse,\n JsonMetricsSerializer,\n} from '@opentelemetry/otlp-transformer';\nimport { VERSION } from '../../version';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\nclass OTLPExporterNodeProxy extends OTLPExporterNodeBase<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions) {\n super(config, JsonMetricsSerializer, {\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS\n ),\n ...parseHeaders(config?.headers),\n ...USER_AGENT,\n 'Content-Type': 'application/json',\n });\n }\n\n getDefaultUrl(config: OTLPExporterNodeConfigBase): string {\n if (typeof config.url === 'string') {\n return config.url;\n }\n\n const env = getEnv();\n if (env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0) {\n return appendRootPathToUrlIfNeeded(\n env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT\n );\n }\n\n if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) {\n return appendResourcePathToUrl(\n env.OTEL_EXPORTER_OTLP_ENDPOINT,\n DEFAULT_COLLECTOR_RESOURCE_PATH\n );\n }\n\n return DEFAULT_COLLECTOR_URL;\n }\n}\n\n/**\n * Collector Metric Exporter for Node\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase<OTLPExporterNodeProxy> {\n constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions) {\n super(new OTLPExporterNodeProxy(config), config);\n }\n}\n"]}
1
+ {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPMetricExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACL,oBAAoB,GAErB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,iCAAiC,OAAO,EAAE;CACzD,CAAC;AAEF,MAAM,qBAAsB,SAAQ,oBAGnC;IACC,YAAY,MAA+D;QACzE,KAAK,CACH,MAAM,EACN,qBAAqB,kCAEhB,UAAU,KACb,cAAc,EAAE,kBAAkB,KAEpC,SAAS,EACT,YAAY,CACb,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,sBAA6C;IACnF,YAAY,MAA+D;QACzE,KAAK,CAAC,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;CACF","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 { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterNodeBase,\n OTLPExporterNodeConfigBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportMetricsServiceResponse,\n JsonMetricsSerializer,\n} from '@opentelemetry/otlp-transformer';\nimport { VERSION } from '../../version';\n\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\nclass OTLPExporterNodeProxy extends OTLPExporterNodeBase<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions) {\n super(\n config,\n JsonMetricsSerializer,\n {\n ...USER_AGENT,\n 'Content-Type': 'application/json',\n },\n 'METRICS',\n 'v1/metrics'\n );\n }\n}\n\n/**\n * Collector Metric Exporter for Node\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase<OTLPExporterNodeProxy> {\n constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions) {\n super(new OTLPExporterNodeProxy(config), config);\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.53.0";
1
+ export declare const VERSION = "0.54.1";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // this is autogenerated file, see scripts/version-update.js
17
- export const VERSION = '0.53.0';
17
+ export const VERSION = '0.54.1';
18
18
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,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.53.0';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,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.54.1';\n"]}
@@ -5,7 +5,6 @@ import { OTLPExporterBrowserBase, OTLPExporterConfigBase } from '@opentelemetry/
5
5
  import { IExportMetricsServiceResponse } from '@opentelemetry/otlp-transformer';
6
6
  declare class OTLPExporterBrowserProxy extends OTLPExporterBrowserBase<ResourceMetrics, IExportMetricsServiceResponse> {
7
7
  constructor(config?: OTLPMetricExporterOptions & OTLPExporterConfigBase);
8
- getDefaultUrl(config: OTLPExporterConfigBase): string;
9
8
  }
10
9
  /**
11
10
  * Collector Metric Exporter for Web
@@ -20,16 +20,9 @@ const OTLPMetricExporterBase_1 = require("../../OTLPMetricExporterBase");
20
20
  const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
21
21
  const otlp_transformer_1 = require("@opentelemetry/otlp-transformer");
22
22
  const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';
23
- const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
24
23
  class OTLPExporterBrowserProxy extends otlp_exporter_base_1.OTLPExporterBrowserBase {
25
24
  constructor(config) {
26
- super(config, otlp_transformer_1.JsonMetricsSerializer, 'application/json');
27
- }
28
- getDefaultUrl(config) {
29
- if (typeof config.url === 'string') {
30
- return config.url;
31
- }
32
- return DEFAULT_COLLECTOR_URL;
25
+ super(config, otlp_transformer_1.JsonMetricsSerializer, { 'Content-Type': 'application/json' }, DEFAULT_COLLECTOR_RESOURCE_PATH);
33
26
  }
34
27
  }
35
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPMetricExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,yEAAsE;AACtE,0EAG2C;AAC3C,sEAGyC;AAEzC,MAAM,+BAA+B,GAAG,YAAY,CAAC;AACrD,MAAM,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AAEzF,MAAM,wBAAyB,SAAQ,4CAGtC;IACC,YAAY,MAA2D;QACrE,KAAK,CAAC,MAAM,EAAE,wCAAqB,EAAE,kBAAkB,CAAC,CAAC;IAC3D,CAAC;IAED,aAAa,CAAC,MAA8B;QAC1C,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,EAAE;YAClC,OAAO,MAAM,CAAC,GAAG,CAAC;SACnB;QAED,OAAO,qBAAqB,CAAC;IAC/B,CAAC;CACF;AAED;;GAEG;AACH,MAAa,kBAAmB,SAAQ,+CAAgD;IACtF,YAAY,MAA2D;QACrE,KAAK,CAAC,IAAI,wBAAwB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IACtD,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 { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterBrowserBase,\n OTLPExporterConfigBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportMetricsServiceResponse,\n JsonMetricsSerializer,\n} from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\n\nclass OTLPExporterBrowserProxy extends OTLPExporterBrowserBase<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPMetricExporterOptions & OTLPExporterConfigBase) {\n super(config, JsonMetricsSerializer, 'application/json');\n }\n\n getDefaultUrl(config: OTLPExporterConfigBase): string {\n if (typeof config.url === 'string') {\n return config.url;\n }\n\n return DEFAULT_COLLECTOR_URL;\n }\n}\n\n/**\n * Collector Metric Exporter for Web\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase<OTLPExporterBrowserProxy> {\n constructor(config?: OTLPExporterConfigBase & OTLPMetricExporterOptions) {\n super(new OTLPExporterBrowserProxy(config), config);\n }\n}\n"]}
1
+ {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPMetricExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,yEAAsE;AACtE,0EAG2C;AAC3C,sEAGyC;AAEzC,MAAM,+BAA+B,GAAG,YAAY,CAAC;AAErD,MAAM,wBAAyB,SAAQ,4CAGtC;IACC,YAAY,MAA2D;QACrE,KAAK,CACH,MAAM,EACN,wCAAqB,EACrB,EAAE,cAAc,EAAE,kBAAkB,EAAE,EACtC,+BAA+B,CAChC,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAa,kBAAmB,SAAQ,+CAAgD;IACtF,YAAY,MAA2D;QACrE,KAAK,CAAC,IAAI,wBAAwB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IACtD,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 { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterBrowserBase,\n OTLPExporterConfigBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportMetricsServiceResponse,\n JsonMetricsSerializer,\n} from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';\n\nclass OTLPExporterBrowserProxy extends OTLPExporterBrowserBase<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPMetricExporterOptions & OTLPExporterConfigBase) {\n super(\n config,\n JsonMetricsSerializer,\n { 'Content-Type': 'application/json' },\n DEFAULT_COLLECTOR_RESOURCE_PATH\n );\n }\n}\n\n/**\n * Collector Metric Exporter for Web\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase<OTLPExporterBrowserProxy> {\n constructor(config?: OTLPExporterConfigBase & OTLPMetricExporterOptions) {\n super(new OTLPExporterBrowserProxy(config), config);\n }\n}\n"]}
@@ -5,7 +5,6 @@ import { OTLPExporterNodeBase, OTLPExporterNodeConfigBase } from '@opentelemetry
5
5
  import { IExportMetricsServiceResponse } from '@opentelemetry/otlp-transformer';
6
6
  declare class OTLPExporterNodeProxy extends OTLPExporterNodeBase<ResourceMetrics, IExportMetricsServiceResponse> {
7
7
  constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions);
8
- getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
9
8
  }
10
9
  /**
11
10
  * Collector Metric Exporter for Node
@@ -16,32 +16,16 @@
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.OTLPMetricExporter = void 0;
19
- const core_1 = require("@opentelemetry/core");
20
19
  const OTLPMetricExporterBase_1 = require("../../OTLPMetricExporterBase");
21
20
  const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
22
21
  const otlp_transformer_1 = require("@opentelemetry/otlp-transformer");
23
22
  const version_1 = require("../../version");
24
- const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';
25
- const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
26
23
  const USER_AGENT = {
27
24
  'User-Agent': `OTel-OTLP-Exporter-JavaScript/${version_1.VERSION}`,
28
25
  };
29
26
  class OTLPExporterNodeProxy extends otlp_exporter_base_1.OTLPExporterNodeBase {
30
27
  constructor(config) {
31
- super(config, otlp_transformer_1.JsonMetricsSerializer, Object.assign(Object.assign(Object.assign(Object.assign({}, 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)), USER_AGENT), { 'Content-Type': 'application/json' }));
32
- }
33
- getDefaultUrl(config) {
34
- if (typeof config.url === 'string') {
35
- return config.url;
36
- }
37
- const env = (0, core_1.getEnv)();
38
- if (env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0) {
39
- return (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)(env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT);
40
- }
41
- if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) {
42
- return (0, otlp_exporter_base_1.appendResourcePathToUrl)(env.OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH);
43
- }
44
- return DEFAULT_COLLECTOR_URL;
28
+ super(config, otlp_transformer_1.JsonMetricsSerializer, Object.assign(Object.assign({}, USER_AGENT), { 'Content-Type': 'application/json' }), 'METRICS', 'v1/metrics');
45
29
  }
46
30
  }
47
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPMetricExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,8CAA2D;AAE3D,yEAAsE;AACtE,0EAM2C;AAC3C,sEAGyC;AACzC,2CAAwC;AAExC,MAAM,+BAA+B,GAAG,YAAY,CAAC;AACrD,MAAM,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AACzF,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,iCAAiC,iBAAO,EAAE;CACzD,CAAC;AAEF,MAAM,qBAAsB,SAAQ,yCAGnC;IACC,YAAY,MAA+D;QACzE,KAAK,CAAC,MAAM,EAAE,wCAAqB,8DAC9B,mBAAY,CAAC,uBAAuB,CACrC,IAAA,aAAM,GAAE,CAAC,kCAAkC,CAC5C,GACE,IAAA,iCAAY,EAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,GAC7B,UAAU,KACb,cAAc,EAAE,kBAAkB,IAClC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,MAAkC;QAC9C,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,EAAE;YAClC,OAAO,MAAM,CAAC,GAAG,CAAC;SACnB;QAED,MAAM,GAAG,GAAG,IAAA,aAAM,GAAE,CAAC;QACrB,IAAI,GAAG,CAAC,mCAAmC,CAAC,MAAM,GAAG,CAAC,EAAE;YACtD,OAAO,IAAA,gDAA2B,EAChC,GAAG,CAAC,mCAAmC,CACxC,CAAC;SACH;QAED,IAAI,GAAG,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9C,OAAO,IAAA,4CAAuB,EAC5B,GAAG,CAAC,2BAA2B,EAC/B,+BAA+B,CAChC,CAAC;SACH;QAED,OAAO,qBAAqB,CAAC;IAC/B,CAAC;CACF;AAED;;GAEG;AACH,MAAa,kBAAmB,SAAQ,+CAA6C;IACnF,YAAY,MAA+D;QACzE,KAAK,CAAC,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IACnD,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 { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterNodeBase,\n OTLPExporterNodeConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\n parseHeaders,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportMetricsServiceResponse,\n JsonMetricsSerializer,\n} from '@opentelemetry/otlp-transformer';\nimport { VERSION } from '../../version';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\nclass OTLPExporterNodeProxy extends OTLPExporterNodeBase<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions) {\n super(config, JsonMetricsSerializer, {\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS\n ),\n ...parseHeaders(config?.headers),\n ...USER_AGENT,\n 'Content-Type': 'application/json',\n });\n }\n\n getDefaultUrl(config: OTLPExporterNodeConfigBase): string {\n if (typeof config.url === 'string') {\n return config.url;\n }\n\n const env = getEnv();\n if (env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0) {\n return appendRootPathToUrlIfNeeded(\n env.OTEL_EXPORTER_OTLP_METRICS_ENDPOINT\n );\n }\n\n if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) {\n return appendResourcePathToUrl(\n env.OTEL_EXPORTER_OTLP_ENDPOINT,\n DEFAULT_COLLECTOR_RESOURCE_PATH\n );\n }\n\n return DEFAULT_COLLECTOR_URL;\n }\n}\n\n/**\n * Collector Metric Exporter for Node\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase<OTLPExporterNodeProxy> {\n constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions) {\n super(new OTLPExporterNodeProxy(config), config);\n }\n}\n"]}
1
+ {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPMetricExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,yEAAsE;AACtE,0EAG2C;AAC3C,sEAGyC;AACzC,2CAAwC;AAExC,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,iCAAiC,iBAAO,EAAE;CACzD,CAAC;AAEF,MAAM,qBAAsB,SAAQ,yCAGnC;IACC,YAAY,MAA+D;QACzE,KAAK,CACH,MAAM,EACN,wCAAqB,kCAEhB,UAAU,KACb,cAAc,EAAE,kBAAkB,KAEpC,SAAS,EACT,YAAY,CACb,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAa,kBAAmB,SAAQ,+CAA6C;IACnF,YAAY,MAA+D;QACzE,KAAK,CAAC,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IACnD,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 { ResourceMetrics } from '@opentelemetry/sdk-metrics';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterNodeBase,\n OTLPExporterNodeConfigBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportMetricsServiceResponse,\n JsonMetricsSerializer,\n} from '@opentelemetry/otlp-transformer';\nimport { VERSION } from '../../version';\n\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\nclass OTLPExporterNodeProxy extends OTLPExporterNodeBase<\n ResourceMetrics,\n IExportMetricsServiceResponse\n> {\n constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions) {\n super(\n config,\n JsonMetricsSerializer,\n {\n ...USER_AGENT,\n 'Content-Type': 'application/json',\n },\n 'METRICS',\n 'v1/metrics'\n );\n }\n}\n\n/**\n * Collector Metric Exporter for Node\n */\nexport class OTLPMetricExporter extends OTLPMetricExporterBase<OTLPExporterNodeProxy> {\n constructor(config?: OTLPExporterNodeConfigBase & OTLPMetricExporterOptions) {\n super(new OTLPExporterNodeProxy(config), config);\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.53.0";
1
+ export declare const VERSION = "0.54.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.53.0';
20
+ exports.VERSION = '0.54.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.53.0';\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.54.1';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/exporter-metrics-otlp-http",
3
- "version": "0.53.0",
3
+ "version": "0.54.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
  "module": "build/esm/index.js",
@@ -17,7 +17,6 @@
17
17
  "prepublishOnly": "npm run compile",
18
18
  "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
19
19
  "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
20
- "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
21
20
  "lint": "eslint . --ext .ts",
22
21
  "lint:fix": "eslint . --ext .ts --fix",
23
22
  "tdd": "npm run test -- --watch-extensions ts --watch",
@@ -29,7 +28,6 @@
29
28
  "precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
30
29
  "prewatch": "npm run precompile",
31
30
  "peer-api-check": "node ../../../scripts/peer-api-check.js",
32
- "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
33
31
  "align-api-deps": "node ../../../scripts/align-api-deps.js"
34
32
  },
35
33
  "keywords": [
@@ -65,15 +63,14 @@
65
63
  },
66
64
  "devDependencies": {
67
65
  "@babel/core": "7.25.2",
68
- "@babel/preset-env": "7.25.3",
66
+ "@babel/preset-env": "7.25.4",
69
67
  "@opentelemetry/api": "1.9.0",
70
- "@types/mocha": "10.0.7",
68
+ "@types/mocha": "10.0.8",
71
69
  "@types/node": "18.6.5",
72
70
  "@types/sinon": "17.0.3",
73
71
  "@types/webpack-env": "1.16.3",
74
- "babel-loader": "8.3.0",
72
+ "babel-loader": "8.4.1",
75
73
  "babel-plugin-istanbul": "7.0.0",
76
- "codecov": "3.8.3",
77
74
  "cross-var": "1.1.0",
78
75
  "karma": "6.4.4",
79
76
  "karma-chrome-launcher": "3.1.0",
@@ -87,7 +84,7 @@
87
84
  "sinon": "15.1.2",
88
85
  "ts-loader": "9.5.1",
89
86
  "typescript": "4.4.4",
90
- "webpack": "5.89.0",
87
+ "webpack": "5.94.0",
91
88
  "webpack-cli": "5.1.4",
92
89
  "webpack-merge": "5.10.0"
93
90
  },
@@ -95,13 +92,13 @@
95
92
  "@opentelemetry/api": "^1.3.0"
96
93
  },
97
94
  "dependencies": {
98
- "@opentelemetry/core": "1.26.0",
99
- "@opentelemetry/otlp-exporter-base": "0.53.0",
100
- "@opentelemetry/otlp-transformer": "0.53.0",
101
- "@opentelemetry/resources": "1.26.0",
102
- "@opentelemetry/sdk-metrics": "1.26.0"
95
+ "@opentelemetry/core": "1.27.0",
96
+ "@opentelemetry/otlp-exporter-base": "0.54.1",
97
+ "@opentelemetry/otlp-transformer": "0.54.1",
98
+ "@opentelemetry/resources": "1.27.0",
99
+ "@opentelemetry/sdk-metrics": "1.27.0"
103
100
  },
104
101
  "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-http",
105
102
  "sideEffects": false,
106
- "gitHead": "720bc8c70d47029cb6b41a34ffdc3d25cbaa2f80"
103
+ "gitHead": "6f4f3fcefd8e453f0516ba15fe0c2580442dd06a"
107
104
  }