@opentelemetry/exporter-metrics-otlp-http 0.52.1 → 0.53.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.
Files changed (46) hide show
  1. package/build/esm/index.js +3 -0
  2. package/build/esm/index.js.map +1 -1
  3. package/build/esm/platform/browser/OTLPMetricExporter.js +6 -12
  4. package/build/esm/platform/browser/OTLPMetricExporter.js.map +1 -1
  5. package/build/esm/platform/browser/index.js +3 -0
  6. package/build/esm/platform/browser/index.js.map +1 -1
  7. package/build/esm/platform/index.js +3 -0
  8. package/build/esm/platform/index.js.map +1 -1
  9. package/build/esm/platform/node/OTLPMetricExporter.js +12 -10
  10. package/build/esm/platform/node/OTLPMetricExporter.js.map +1 -1
  11. package/build/esm/platform/node/index.js +3 -0
  12. package/build/esm/platform/node/index.js.map +1 -1
  13. package/build/esm/version.d.ts +1 -1
  14. package/build/esm/version.js +1 -1
  15. package/build/esm/version.js.map +1 -1
  16. package/build/esnext/index.js +3 -0
  17. package/build/esnext/index.js.map +1 -1
  18. package/build/esnext/platform/browser/OTLPMetricExporter.js +5 -10
  19. package/build/esnext/platform/browser/OTLPMetricExporter.js.map +1 -1
  20. package/build/esnext/platform/browser/index.js +3 -0
  21. package/build/esnext/platform/browser/index.js.map +1 -1
  22. package/build/esnext/platform/index.js +3 -0
  23. package/build/esnext/platform/index.js.map +1 -1
  24. package/build/esnext/platform/node/OTLPMetricExporter.js +12 -9
  25. package/build/esnext/platform/node/OTLPMetricExporter.js.map +1 -1
  26. package/build/esnext/platform/node/index.js +3 -0
  27. package/build/esnext/platform/node/index.js.map +1 -1
  28. package/build/esnext/version.d.ts +1 -1
  29. package/build/esnext/version.js +1 -1
  30. package/build/esnext/version.js.map +1 -1
  31. package/build/src/index.js +3 -0
  32. package/build/src/index.js.map +1 -1
  33. package/build/src/platform/browser/OTLPMetricExporter.js +4 -9
  34. package/build/src/platform/browser/OTLPMetricExporter.js.map +1 -1
  35. package/build/src/platform/browser/index.js +3 -0
  36. package/build/src/platform/browser/index.js.map +1 -1
  37. package/build/src/platform/index.js +3 -0
  38. package/build/src/platform/index.js.map +1 -1
  39. package/build/src/platform/node/OTLPMetricExporter.js +12 -9
  40. package/build/src/platform/node/OTLPMetricExporter.js.map +1 -1
  41. package/build/src/platform/node/index.js +3 -0
  42. package/build/src/platform/node/index.js.map +1 -1
  43. package/build/src/version.d.ts +1 -1
  44. package/build/src/version.js +1 -1
  45. package/build/src/version.js.map +1 -1
  46. package/package.json +14 -15
@@ -13,6 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
+ * TODO: Replace export * with named exports before next major version
18
+ */
16
19
  export * from './platform';
17
20
  export * from './OTLPMetricExporterOptions';
18
21
  export * from './OTLPMetricExporterBase';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,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\nexport * from './platform';\nexport * from './OTLPMetricExporterOptions';\nexport * from './OTLPMetricExporterBase';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,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/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\nexport * from './platform';\nexport * from './OTLPMetricExporterOptions';\nexport * from './OTLPMetricExporterBase';\n"]}
@@ -28,27 +28,21 @@ var __extends = (this && this.__extends) || (function () {
28
28
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
29
29
  };
30
30
  })();
31
- import { baggageUtils, getEnv } from '@opentelemetry/core';
32
31
  import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';
33
- import { OTLPExporterBrowserBase, appendResourcePathToUrl, appendRootPathToUrlIfNeeded, } from '@opentelemetry/otlp-exporter-base';
32
+ import { OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base';
34
33
  import { JsonMetricsSerializer, } from '@opentelemetry/otlp-transformer';
35
34
  var DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';
36
35
  var DEFAULT_COLLECTOR_URL = "http://localhost:4318/" + DEFAULT_COLLECTOR_RESOURCE_PATH;
37
36
  var OTLPExporterBrowserProxy = /** @class */ (function (_super) {
38
37
  __extends(OTLPExporterBrowserProxy, _super);
39
38
  function OTLPExporterBrowserProxy(config) {
40
- var _this = _super.call(this, config, JsonMetricsSerializer, 'application/json') || this;
41
- _this._headers = Object.assign(_this._headers, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS));
42
- return _this;
39
+ return _super.call(this, config, JsonMetricsSerializer, 'application/json') || this;
43
40
  }
44
41
  OTLPExporterBrowserProxy.prototype.getDefaultUrl = function (config) {
45
- return typeof config.url === 'string'
46
- ? config.url
47
- : getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0
48
- ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT)
49
- : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
50
- ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
51
- : DEFAULT_COLLECTOR_URL;
42
+ if (typeof config.url === 'string') {
43
+ return config.url;
44
+ }
45
+ return DEFAULT_COLLECTOR_URL;
52
46
  };
53
47
  return OTLPExporterBrowserProxy;
54
48
  }(OTLPExporterBrowserBase));
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPMetricExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACL,uBAAuB,EAEvB,uBAAuB,EACvB,2BAA2B,GAC5B,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;QAAvE,YACE,kBAAM,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,CAAC,SAOzD;QANC,KAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAC3B,KAAI,CAAC,QAAQ,EACb,YAAY,CAAC,uBAAuB,CAClC,MAAM,EAAE,CAAC,kCAAkC,CAC5C,CACF,CAAC;;IACJ,CAAC;IAED,gDAAa,GAAb,UAAc,MAA8B;QAC1C,OAAO,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ;YACnC,CAAC,CAAC,MAAM,CAAC,GAAG;YACZ,CAAC,CAAC,MAAM,EAAE,CAAC,mCAAmC,CAAC,MAAM,GAAG,CAAC;gBACzD,CAAC,CAAC,2BAA2B,CACzB,MAAM,EAAE,CAAC,mCAAmC,CAC7C;gBACH,CAAC,CAAC,MAAM,EAAE,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC;oBACjD,CAAC,CAAC,uBAAuB,CACrB,MAAM,EAAE,CAAC,2BAA2B,EACpC,+BAA+B,CAChC;oBACH,CAAC,CAAC,qBAAqB,CAAC;IAC5B,CAAC;IACH,+BAAC;AAAD,CAAC,AA5BD,CAAuC,uBAAuB,GA4B7D;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 { baggageUtils, getEnv } from '@opentelemetry/core';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterBrowserBase,\n OTLPExporterConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\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 this._headers = Object.assign(\n this._headers,\n baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS\n )\n );\n }\n\n getDefaultUrl(config: OTLPExporterConfigBase): string {\n return typeof config.url === 'string'\n ? config.url\n : getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT\n )\n : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? appendResourcePathToUrl(\n getEnv().OTEL_EXPORTER_OTLP_ENDPOINT,\n DEFAULT_COLLECTOR_RESOURCE_PATH\n )\n : 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;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"]}
@@ -13,5 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
+ * TODO: Replace export * with named exports before next major version
18
+ */
16
19
  export * from './OTLPMetricExporter';
17
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,sBAAsB,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\nexport * from './OTLPMetricExporter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,sBAAsB,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/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\nexport * from './OTLPMetricExporter';\n"]}
@@ -13,5 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
+ * TODO: Replace export * with named exports before next major version
18
+ */
16
19
  export * from './node';
17
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,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\nexport * from './node';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,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/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\nexport * from './node';\n"]}
@@ -52,18 +52,20 @@ var USER_AGENT = {
52
52
  var OTLPExporterNodeProxy = /** @class */ (function (_super) {
53
53
  __extends(OTLPExporterNodeProxy, _super);
54
54
  function OTLPExporterNodeProxy(config) {
55
- var _this = _super.call(this, config, JsonMetricsSerializer, 'application/json') || this;
56
- _this.headers = __assign(__assign(__assign(__assign({}, _this.headers), USER_AGENT), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers));
57
- return _this;
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;
58
56
  }
59
57
  OTLPExporterNodeProxy.prototype.getDefaultUrl = function (config) {
60
- return typeof config.url === 'string'
61
- ? config.url
62
- : getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0
63
- ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT)
64
- : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
65
- ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
66
- : DEFAULT_COLLECTOR_URL;
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;
67
69
  };
68
70
  return OTLPExporterNodeProxy;
69
71
  }(OTLPExporterNodeBase));
@@ -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;QAA3E,YACE,kBAAM,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,CAAC,SASzD;QARC,KAAI,CAAC,OAAO,2CACP,KAAI,CAAC,OAAO,GACZ,UAAU,GACV,YAAY,CAAC,uBAAuB,CACrC,MAAM,EAAE,CAAC,kCAAkC,CAC5C,GACE,YAAY,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,CACjC,CAAC;;IACJ,CAAC;IAED,6CAAa,GAAb,UAAc,MAAkC;QAC9C,OAAO,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ;YACnC,CAAC,CAAC,MAAM,CAAC,GAAG;YACZ,CAAC,CAAC,MAAM,EAAE,CAAC,mCAAmC,CAAC,MAAM,GAAG,CAAC;gBACzD,CAAC,CAAC,2BAA2B,CACzB,MAAM,EAAE,CAAC,mCAAmC,CAC7C;gBACH,CAAC,CAAC,MAAM,EAAE,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC;oBACjD,CAAC,CAAC,uBAAuB,CACrB,MAAM,EAAE,CAAC,2BAA2B,EACpC,+BAA+B,CAChC;oBACH,CAAC,CAAC,qBAAqB,CAAC;IAC5B,CAAC;IACH,4BAAC;AAAD,CAAC,AA9BD,CAAoC,oBAAoB,GA8BvD;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, 'application/json');\n this.headers = {\n ...this.headers,\n ...USER_AGENT,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS\n ),\n ...parseHeaders(config?.headers),\n };\n }\n\n getDefaultUrl(config: OTLPExporterNodeConfigBase): string {\n return typeof config.url === 'string'\n ? config.url\n : getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT\n )\n : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? appendResourcePathToUrl(\n getEnv().OTEL_EXPORTER_OTLP_ENDPOINT,\n DEFAULT_COLLECTOR_RESOURCE_PATH\n )\n : 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;;;;;;;;;;;;;;;;;;;;;;;;;;;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"]}
@@ -13,5 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
+ * TODO: Replace export * with named exports before next major version
18
+ */
16
19
  export * from './OTLPMetricExporter';
17
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,sBAAsB,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\nexport * from './OTLPMetricExporter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,sBAAsB,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/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\nexport * from './OTLPMetricExporter';\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.52.1";
1
+ export declare const VERSION = "0.53.0";
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.52.1';
17
+ export var VERSION = '0.53.0';
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.52.1';\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.53.0';\n"]}
@@ -13,6 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
+ * TODO: Replace export * with named exports before next major version
18
+ */
16
19
  export * from './platform';
17
20
  export * from './OTLPMetricExporterOptions';
18
21
  export * from './OTLPMetricExporterBase';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,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\nexport * from './platform';\nexport * from './OTLPMetricExporterOptions';\nexport * from './OTLPMetricExporterBase';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,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/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\nexport * from './platform';\nexport * from './OTLPMetricExporterOptions';\nexport * from './OTLPMetricExporterBase';\n"]}
@@ -13,25 +13,20 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { baggageUtils, getEnv } from '@opentelemetry/core';
17
16
  import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';
18
- import { OTLPExporterBrowserBase, appendResourcePathToUrl, appendRootPathToUrlIfNeeded, } from '@opentelemetry/otlp-exporter-base';
17
+ import { OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base';
19
18
  import { JsonMetricsSerializer, } from '@opentelemetry/otlp-transformer';
20
19
  const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';
21
20
  const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
22
21
  class OTLPExporterBrowserProxy extends OTLPExporterBrowserBase {
23
22
  constructor(config) {
24
23
  super(config, JsonMetricsSerializer, 'application/json');
25
- this._headers = Object.assign(this._headers, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS));
26
24
  }
27
25
  getDefaultUrl(config) {
28
- return typeof config.url === 'string'
29
- ? config.url
30
- : getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0
31
- ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT)
32
- : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
33
- ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
34
- : DEFAULT_COLLECTOR_URL;
26
+ if (typeof config.url === 'string') {
27
+ return config.url;
28
+ }
29
+ return DEFAULT_COLLECTOR_URL;
35
30
  }
36
31
  }
37
32
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPMetricExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACL,uBAAuB,EAEvB,uBAAuB,EACvB,2BAA2B,GAC5B,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;QACzD,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAC3B,IAAI,CAAC,QAAQ,EACb,YAAY,CAAC,uBAAuB,CAClC,MAAM,EAAE,CAAC,kCAAkC,CAC5C,CACF,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,MAA8B;QAC1C,OAAO,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ;YACnC,CAAC,CAAC,MAAM,CAAC,GAAG;YACZ,CAAC,CAAC,MAAM,EAAE,CAAC,mCAAmC,CAAC,MAAM,GAAG,CAAC;gBACzD,CAAC,CAAC,2BAA2B,CACzB,MAAM,EAAE,CAAC,mCAAmC,CAC7C;gBACH,CAAC,CAAC,MAAM,EAAE,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC;oBACjD,CAAC,CAAC,uBAAuB,CACrB,MAAM,EAAE,CAAC,2BAA2B,EACpC,+BAA+B,CAChC;oBACH,CAAC,CAAC,qBAAqB,CAAC;IAC5B,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 { baggageUtils, getEnv } from '@opentelemetry/core';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterBrowserBase,\n OTLPExporterConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\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 this._headers = Object.assign(\n this._headers,\n baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS\n )\n );\n }\n\n getDefaultUrl(config: OTLPExporterConfigBase): string {\n return typeof config.url === 'string'\n ? config.url\n : getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT\n )\n : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? appendResourcePathToUrl(\n getEnv().OTEL_EXPORTER_OTLP_ENDPOINT,\n DEFAULT_COLLECTOR_RESOURCE_PATH\n )\n : 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;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"]}
@@ -13,5 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
+ * TODO: Replace export * with named exports before next major version
18
+ */
16
19
  export * from './OTLPMetricExporter';
17
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,sBAAsB,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\nexport * from './OTLPMetricExporter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,sBAAsB,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/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\nexport * from './OTLPMetricExporter';\n"]}
@@ -13,5 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
+ * TODO: Replace export * with named exports before next major version
18
+ */
16
19
  export * from './node';
17
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,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\nexport * from './node';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,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/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\nexport * from './node';\n"]}
@@ -25,17 +25,20 @@ const USER_AGENT = {
25
25
  };
26
26
  class OTLPExporterNodeProxy extends OTLPExporterNodeBase {
27
27
  constructor(config) {
28
- super(config, JsonMetricsSerializer, 'application/json');
29
- this.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, this.headers), USER_AGENT), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers));
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' }));
30
29
  }
31
30
  getDefaultUrl(config) {
32
- return typeof config.url === 'string'
33
- ? config.url
34
- : getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0
35
- ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT)
36
- : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
37
- ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
38
- : DEFAULT_COLLECTOR_URL;
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;
39
42
  }
40
43
  }
41
44
  /**
@@ -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,EAAE,kBAAkB,CAAC,CAAC;QACzD,IAAI,CAAC,OAAO,+DACP,IAAI,CAAC,OAAO,GACZ,UAAU,GACV,YAAY,CAAC,uBAAuB,CACrC,MAAM,EAAE,CAAC,kCAAkC,CAC5C,GACE,YAAY,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,CACjC,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,MAAkC;QAC9C,OAAO,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ;YACnC,CAAC,CAAC,MAAM,CAAC,GAAG;YACZ,CAAC,CAAC,MAAM,EAAE,CAAC,mCAAmC,CAAC,MAAM,GAAG,CAAC;gBACzD,CAAC,CAAC,2BAA2B,CACzB,MAAM,EAAE,CAAC,mCAAmC,CAC7C;gBACH,CAAC,CAAC,MAAM,EAAE,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC;oBACjD,CAAC,CAAC,uBAAuB,CACrB,MAAM,EAAE,CAAC,2BAA2B,EACpC,+BAA+B,CAChC;oBACH,CAAC,CAAC,qBAAqB,CAAC;IAC5B,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, 'application/json');\n this.headers = {\n ...this.headers,\n ...USER_AGENT,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS\n ),\n ...parseHeaders(config?.headers),\n };\n }\n\n getDefaultUrl(config: OTLPExporterNodeConfigBase): string {\n return typeof config.url === 'string'\n ? config.url\n : getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT\n )\n : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? appendResourcePathToUrl(\n getEnv().OTEL_EXPORTER_OTLP_ENDPOINT,\n DEFAULT_COLLECTOR_RESOURCE_PATH\n )\n : 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;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"]}
@@ -13,5 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
+ * TODO: Replace export * with named exports before next major version
18
+ */
16
19
  export * from './OTLPMetricExporter';
17
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,sBAAsB,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\nexport * from './OTLPMetricExporter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,sBAAsB,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/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\nexport * from './OTLPMetricExporter';\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.52.1";
1
+ export declare const VERSION = "0.53.0";
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.52.1';
17
+ export const VERSION = '0.53.0';
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.52.1';\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.53.0';\n"]}
@@ -25,6 +25,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
25
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
+ /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
29
+ * TODO: Replace export * with named exports before next major version
30
+ */
28
31
  __exportStar(require("./platform"), exports);
29
32
  __exportStar(require("./OTLPMetricExporterOptions"), exports);
30
33
  __exportStar(require("./OTLPMetricExporterBase"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,6CAA2B;AAC3B,8DAA4C;AAC5C,2DAAyC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './platform';\nexport * from './OTLPMetricExporterOptions';\nexport * from './OTLPMetricExporterBase';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH;;GAEG;AACH,6CAA2B;AAC3B,8DAA4C;AAC5C,2DAAyC","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/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\nexport * from './platform';\nexport * from './OTLPMetricExporterOptions';\nexport * from './OTLPMetricExporterBase';\n"]}
@@ -16,7 +16,6 @@
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");
@@ -25,16 +24,12 @@ const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURC
25
24
  class OTLPExporterBrowserProxy extends otlp_exporter_base_1.OTLPExporterBrowserBase {
26
25
  constructor(config) {
27
26
  super(config, otlp_transformer_1.JsonMetricsSerializer, 'application/json');
28
- this._headers = Object.assign(this._headers, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_HEADERS));
29
27
  }
30
28
  getDefaultUrl(config) {
31
- return typeof config.url === 'string'
32
- ? config.url
33
- : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0
34
- ? (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT)
35
- : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
36
- ? (0, otlp_exporter_base_1.appendResourcePathToUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
37
- : DEFAULT_COLLECTOR_URL;
29
+ if (typeof config.url === 'string') {
30
+ return config.url;
31
+ }
32
+ return DEFAULT_COLLECTOR_URL;
38
33
  }
39
34
  }
40
35
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPMetricExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPMetricExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,8CAA2D;AAE3D,yEAAsE;AACtE,0EAK2C;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;QACzD,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAC3B,IAAI,CAAC,QAAQ,EACb,mBAAY,CAAC,uBAAuB,CAClC,IAAA,aAAM,GAAE,CAAC,kCAAkC,CAC5C,CACF,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,MAA8B;QAC1C,OAAO,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ;YACnC,CAAC,CAAC,MAAM,CAAC,GAAG;YACZ,CAAC,CAAC,IAAA,aAAM,GAAE,CAAC,mCAAmC,CAAC,MAAM,GAAG,CAAC;gBACzD,CAAC,CAAC,IAAA,gDAA2B,EACzB,IAAA,aAAM,GAAE,CAAC,mCAAmC,CAC7C;gBACH,CAAC,CAAC,IAAA,aAAM,GAAE,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC;oBACjD,CAAC,CAAC,IAAA,4CAAuB,EACrB,IAAA,aAAM,GAAE,CAAC,2BAA2B,EACpC,+BAA+B,CAChC;oBACH,CAAC,CAAC,qBAAqB,CAAC;IAC5B,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 { baggageUtils, getEnv } from '@opentelemetry/core';\nimport { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport {\n OTLPExporterBrowserBase,\n OTLPExporterConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\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 this._headers = Object.assign(\n this._headers,\n baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS\n )\n );\n }\n\n getDefaultUrl(config: OTLPExporterConfigBase): string {\n return typeof config.url === 'string'\n ? config.url\n : getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT\n )\n : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? appendResourcePathToUrl(\n getEnv().OTEL_EXPORTER_OTLP_ENDPOINT,\n DEFAULT_COLLECTOR_RESOURCE_PATH\n )\n : 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;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"]}
@@ -25,5 +25,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
25
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
+ /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
29
+ * TODO: Replace export * with named exports before next major version
30
+ */
28
31
  __exportStar(require("./OTLPMetricExporter"), exports);
29
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,uDAAqC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './OTLPMetricExporter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH;;GAEG;AACH,uDAAqC","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/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\nexport * from './OTLPMetricExporter';\n"]}
@@ -25,5 +25,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
25
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
+ /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
29
+ * TODO: Replace export * with named exports before next major version
30
+ */
28
31
  __exportStar(require("./node"), exports);
29
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,yCAAuB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './node';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH;;GAEG;AACH,yCAAuB","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/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\nexport * from './node';\n"]}
@@ -28,17 +28,20 @@ const USER_AGENT = {
28
28
  };
29
29
  class OTLPExporterNodeProxy extends otlp_exporter_base_1.OTLPExporterNodeBase {
30
30
  constructor(config) {
31
- super(config, otlp_transformer_1.JsonMetricsSerializer, 'application/json');
32
- this.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, this.headers), 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, 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' }));
33
32
  }
34
33
  getDefaultUrl(config) {
35
- return typeof config.url === 'string'
36
- ? config.url
37
- : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0
38
- ? (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT)
39
- : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
40
- ? (0, otlp_exporter_base_1.appendResourcePathToUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
41
- : DEFAULT_COLLECTOR_URL;
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;
42
45
  }
43
46
  }
44
47
  /**
@@ -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,EAAE,kBAAkB,CAAC,CAAC;QACzD,IAAI,CAAC,OAAO,+DACP,IAAI,CAAC,OAAO,GACZ,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;IACJ,CAAC;IAED,aAAa,CAAC,MAAkC;QAC9C,OAAO,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ;YACnC,CAAC,CAAC,MAAM,CAAC,GAAG;YACZ,CAAC,CAAC,IAAA,aAAM,GAAE,CAAC,mCAAmC,CAAC,MAAM,GAAG,CAAC;gBACzD,CAAC,CAAC,IAAA,gDAA2B,EACzB,IAAA,aAAM,GAAE,CAAC,mCAAmC,CAC7C;gBACH,CAAC,CAAC,IAAA,aAAM,GAAE,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC;oBACjD,CAAC,CAAC,IAAA,4CAAuB,EACrB,IAAA,aAAM,GAAE,CAAC,2BAA2B,EACpC,+BAA+B,CAChC;oBACH,CAAC,CAAC,qBAAqB,CAAC;IAC5B,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, 'application/json');\n this.headers = {\n ...this.headers,\n ...USER_AGENT,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS\n ),\n ...parseHeaders(config?.headers),\n };\n }\n\n getDefaultUrl(config: OTLPExporterNodeConfigBase): string {\n return typeof config.url === 'string'\n ? config.url\n : getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(\n getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT\n )\n : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? appendResourcePathToUrl(\n getEnv().OTEL_EXPORTER_OTLP_ENDPOINT,\n DEFAULT_COLLECTOR_RESOURCE_PATH\n )\n : 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;;;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"]}
@@ -25,5 +25,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
25
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
+ /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
29
+ * TODO: Replace export * with named exports before next major version
30
+ */
28
31
  __exportStar(require("./OTLPMetricExporter"), exports);
29
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,uDAAqC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './OTLPMetricExporter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH;;GAEG;AACH,uDAAqC","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/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\nexport * from './OTLPMetricExporter';\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.52.1";
1
+ export declare const VERSION = "0.53.0";
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.52.1';
20
+ exports.VERSION = '0.53.0';
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.52.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.53.0';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/exporter-metrics-otlp-http",
3
- "version": "0.52.1",
3
+ "version": "0.53.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
  "module": "build/esm/index.js",
@@ -22,7 +22,7 @@
22
22
  "lint:fix": "eslint . --ext .ts --fix",
23
23
  "tdd": "npm run test -- --watch-extensions ts --watch",
24
24
  "tdd:browser": "karma start",
25
- "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
25
+ "test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
26
26
  "test:browser": "karma start --single-run",
27
27
  "version": "node ../../../scripts/version-update.js",
28
28
  "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
@@ -64,29 +64,28 @@
64
64
  "access": "public"
65
65
  },
66
66
  "devDependencies": {
67
- "@babel/core": "7.24.7",
68
- "@babel/preset-env": "7.24.7",
67
+ "@babel/core": "7.25.2",
68
+ "@babel/preset-env": "7.25.3",
69
69
  "@opentelemetry/api": "1.9.0",
70
- "@types/mocha": "10.0.6",
70
+ "@types/mocha": "10.0.7",
71
71
  "@types/node": "18.6.5",
72
72
  "@types/sinon": "17.0.3",
73
73
  "@types/webpack-env": "1.16.3",
74
74
  "babel-loader": "8.3.0",
75
- "babel-plugin-istanbul": "6.1.1",
75
+ "babel-plugin-istanbul": "7.0.0",
76
76
  "codecov": "3.8.3",
77
77
  "cross-var": "1.1.0",
78
- "karma": "6.4.3",
78
+ "karma": "6.4.4",
79
79
  "karma-chrome-launcher": "3.1.0",
80
80
  "karma-coverage": "2.2.1",
81
81
  "karma-mocha": "2.0.1",
82
82
  "karma-spec-reporter": "0.0.36",
83
83
  "karma-webpack": "5.0.1",
84
84
  "lerna": "6.6.2",
85
- "mocha": "10.2.0",
85
+ "mocha": "10.7.3",
86
86
  "nyc": "15.1.0",
87
87
  "sinon": "15.1.2",
88
88
  "ts-loader": "9.5.1",
89
- "ts-mocha": "10.0.0",
90
89
  "typescript": "4.4.4",
91
90
  "webpack": "5.89.0",
92
91
  "webpack-cli": "5.1.4",
@@ -96,13 +95,13 @@
96
95
  "@opentelemetry/api": "^1.3.0"
97
96
  },
98
97
  "dependencies": {
99
- "@opentelemetry/core": "1.25.1",
100
- "@opentelemetry/otlp-exporter-base": "0.52.1",
101
- "@opentelemetry/otlp-transformer": "0.52.1",
102
- "@opentelemetry/resources": "1.25.1",
103
- "@opentelemetry/sdk-metrics": "1.25.1"
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"
104
103
  },
105
104
  "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-http",
106
105
  "sideEffects": false,
107
- "gitHead": "0608f405573901e54db01e44c533009cf28be262"
106
+ "gitHead": "720bc8c70d47029cb6b41a34ffdc3d25cbaa2f80"
108
107
  }