@opentelemetry/exporter-trace-otlp-http 0.52.1 → 0.54.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 (52) 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/OTLPTraceExporter.d.ts +0 -1
  4. package/build/esm/platform/browser/OTLPTraceExporter.js +2 -15
  5. package/build/esm/platform/browser/OTLPTraceExporter.js.map +1 -1
  6. package/build/esm/platform/browser/index.js +3 -0
  7. package/build/esm/platform/browser/index.js.map +1 -1
  8. package/build/esm/platform/index.js +3 -0
  9. package/build/esm/platform/index.js.map +1 -1
  10. package/build/esm/platform/node/OTLPTraceExporter.d.ts +0 -1
  11. package/build/esm/platform/node/OTLPTraceExporter.js +2 -17
  12. package/build/esm/platform/node/OTLPTraceExporter.js.map +1 -1
  13. package/build/esm/platform/node/index.js +3 -0
  14. package/build/esm/platform/node/index.js.map +1 -1
  15. package/build/esm/version.d.ts +1 -1
  16. package/build/esm/version.js +1 -1
  17. package/build/esm/version.js.map +1 -1
  18. package/build/esnext/index.js +3 -0
  19. package/build/esnext/index.js.map +1 -1
  20. package/build/esnext/platform/browser/OTLPTraceExporter.d.ts +0 -1
  21. package/build/esnext/platform/browser/OTLPTraceExporter.js +2 -14
  22. package/build/esnext/platform/browser/OTLPTraceExporter.js.map +1 -1
  23. package/build/esnext/platform/browser/index.js +3 -0
  24. package/build/esnext/platform/browser/index.js.map +1 -1
  25. package/build/esnext/platform/index.js +3 -0
  26. package/build/esnext/platform/index.js.map +1 -1
  27. package/build/esnext/platform/node/OTLPTraceExporter.d.ts +0 -1
  28. package/build/esnext/platform/node/OTLPTraceExporter.js +2 -16
  29. package/build/esnext/platform/node/OTLPTraceExporter.js.map +1 -1
  30. package/build/esnext/platform/node/index.js +3 -0
  31. package/build/esnext/platform/node/index.js.map +1 -1
  32. package/build/esnext/version.d.ts +1 -1
  33. package/build/esnext/version.js +1 -1
  34. package/build/esnext/version.js.map +1 -1
  35. package/build/src/index.js +3 -0
  36. package/build/src/index.js.map +1 -1
  37. package/build/src/platform/browser/OTLPTraceExporter.d.ts +0 -1
  38. package/build/src/platform/browser/OTLPTraceExporter.js +1 -13
  39. package/build/src/platform/browser/OTLPTraceExporter.js.map +1 -1
  40. package/build/src/platform/browser/index.js +3 -0
  41. package/build/src/platform/browser/index.js.map +1 -1
  42. package/build/src/platform/index.js +3 -0
  43. package/build/src/platform/index.js.map +1 -1
  44. package/build/src/platform/node/OTLPTraceExporter.d.ts +0 -1
  45. package/build/src/platform/node/OTLPTraceExporter.js +1 -15
  46. package/build/src/platform/node/OTLPTraceExporter.js.map +1 -1
  47. package/build/src/platform/node/index.js +3 -0
  48. package/build/src/platform/node/index.js.map +1 -1
  49. package/build/src/version.d.ts +1 -1
  50. package/build/src/version.js +1 -1
  51. package/build/src/version.js.map +1 -1
  52. package/package.json +17 -21
@@ -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 './platform';
17
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,YAAY,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';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,YAAY,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';\n"]}
@@ -6,6 +6,5 @@ import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';
6
6
  */
7
7
  export declare class OTLPTraceExporter extends OTLPExporterBrowserBase<ReadableSpan, IExportTraceServiceResponse> implements SpanExporter {
8
8
  constructor(config?: OTLPExporterConfigBase);
9
- getDefaultUrl(config: OTLPExporterConfigBase): string;
10
9
  }
11
10
  //# sourceMappingURL=OTLPTraceExporter.d.ts.map
@@ -28,11 +28,9 @@ 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 { getEnv, baggageUtils } from '@opentelemetry/core';
32
- import { appendResourcePathToUrl, appendRootPathToUrlIfNeeded, OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base';
31
+ import { OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base';
33
32
  import { JsonTraceSerializer, } from '@opentelemetry/otlp-transformer';
34
33
  var DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';
35
- var DEFAULT_COLLECTOR_URL = "http://localhost:4318/" + DEFAULT_COLLECTOR_RESOURCE_PATH;
36
34
  /**
37
35
  * Collector Trace Exporter for Web
38
36
  */
@@ -40,19 +38,8 @@ var OTLPTraceExporter = /** @class */ (function (_super) {
40
38
  __extends(OTLPTraceExporter, _super);
41
39
  function OTLPTraceExporter(config) {
42
40
  if (config === void 0) { config = {}; }
43
- var _this = _super.call(this, config, JsonTraceSerializer, 'application/json') || this;
44
- _this._headers = Object.assign(_this._headers, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS));
45
- return _this;
41
+ return _super.call(this, config, JsonTraceSerializer, { 'Content-Type': 'application/json' }, DEFAULT_COLLECTOR_RESOURCE_PATH) || this;
46
42
  }
47
- OTLPTraceExporter.prototype.getDefaultUrl = function (config) {
48
- return typeof config.url === 'string'
49
- ? config.url
50
- : getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
51
- ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)
52
- : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
53
- ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
54
- : DEFAULT_COLLECTOR_URL;
55
- };
56
43
  return OTLPTraceExporter;
57
44
  }(OTLPExporterBrowserBase));
58
45
  export { OTLPTraceExporter };
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPTraceExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAGH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAEL,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AAEzC,IAAM,+BAA+B,GAAG,WAAW,CAAC;AACpD,IAAM,qBAAqB,GAAG,2BAAyB,+BAAiC,CAAC;AAEzF;;GAEG;AACH;IACU,qCAAkE;IAG1E,2BAAY,MAAmC;QAAnC,uBAAA,EAAA,WAAmC;QAA/C,YACE,kBAAM,MAAM,EAAE,mBAAmB,EAAE,kBAAkB,CAAC,SAOvD;QANC,KAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAC3B,KAAI,CAAC,QAAQ,EACb,YAAY,CAAC,uBAAuB,CAClC,MAAM,EAAE,CAAC,iCAAiC,CAC3C,CACF,CAAC;;IACJ,CAAC;IAED,yCAAa,GAAb,UAAc,MAA8B;QAC1C,OAAO,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ;YACnC,CAAC,CAAC,MAAM,CAAC,GAAG;YACZ,CAAC,CAAC,MAAM,EAAE,CAAC,kCAAkC,CAAC,MAAM,GAAG,CAAC;gBACxD,CAAC,CAAC,2BAA2B,CAAC,MAAM,EAAE,CAAC,kCAAkC,CAAC;gBAC1E,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,wBAAC;AAAD,CAAC,AA1BD,CACU,uBAAuB,GAyBhC","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 { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport {\n OTLPExporterConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\n OTLPExporterBrowserBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportTraceServiceResponse,\n JsonTraceSerializer,\n} from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\n\n/**\n * Collector Trace Exporter for Web\n */\nexport class OTLPTraceExporter\n extends OTLPExporterBrowserBase<ReadableSpan, IExportTraceServiceResponse>\n implements SpanExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(config, JsonTraceSerializer, 'application/json');\n this._headers = Object.assign(\n this._headers,\n baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS\n )\n );\n }\n\n getDefaultUrl(config: OTLPExporterConfigBase): string {\n return typeof config.url === 'string'\n ? config.url\n : getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)\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"]}
1
+ {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPTraceExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAGH,OAAO,EAEL,uBAAuB,GACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AAEzC,IAAM,+BAA+B,GAAG,WAAW,CAAC;AAEpD;;GAEG;AACH;IACU,qCAAkE;IAG1E,2BAAY,MAAmC;QAAnC,uBAAA,EAAA,WAAmC;eAC7C,kBACE,MAAM,EACN,mBAAmB,EACnB,EAAE,cAAc,EAAE,kBAAkB,EAAE,EACtC,+BAA+B,CAChC;IACH,CAAC;IACH,wBAAC;AAAD,CAAC,AAZD,CACU,uBAAuB,GAWhC","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 { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';\nimport {\n OTLPExporterConfigBase,\n OTLPExporterBrowserBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportTraceServiceResponse,\n JsonTraceSerializer,\n} from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';\n\n/**\n * Collector Trace Exporter for Web\n */\nexport class OTLPTraceExporter\n extends OTLPExporterBrowserBase<ReadableSpan, IExportTraceServiceResponse>\n implements SpanExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(\n config,\n JsonTraceSerializer,\n { 'Content-Type': 'application/json' },\n DEFAULT_COLLECTOR_RESOURCE_PATH\n );\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 './OTLPTraceExporter';
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,qBAAqB,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 './OTLPTraceExporter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,qBAAqB,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 './OTLPTraceExporter';\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"]}
@@ -7,6 +7,5 @@ import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';
7
7
  */
8
8
  export declare class OTLPTraceExporter extends OTLPExporterNodeBase<ReadableSpan, IExportTraceServiceResponse> implements SpanExporter {
9
9
  constructor(config?: OTLPExporterNodeConfigBase);
10
- getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
11
10
  }
12
11
  //# sourceMappingURL=OTLPTraceExporter.d.ts.map
@@ -39,13 +39,9 @@ var __assign = (this && this.__assign) || function () {
39
39
  };
40
40
  return __assign.apply(this, arguments);
41
41
  };
42
- import { getEnv, baggageUtils } from '@opentelemetry/core';
43
- import { OTLPExporterNodeBase, parseHeaders, } from '@opentelemetry/otlp-exporter-base';
44
- import { appendResourcePathToUrl, appendRootPathToUrlIfNeeded, } from '@opentelemetry/otlp-exporter-base';
42
+ import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
45
43
  import { VERSION } from '../../version';
46
44
  import { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';
47
- var DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';
48
- var DEFAULT_COLLECTOR_URL = "http://localhost:4318/" + DEFAULT_COLLECTOR_RESOURCE_PATH;
49
45
  var USER_AGENT = {
50
46
  'User-Agent': "OTel-OTLP-Exporter-JavaScript/" + VERSION,
51
47
  };
@@ -56,19 +52,8 @@ var OTLPTraceExporter = /** @class */ (function (_super) {
56
52
  __extends(OTLPTraceExporter, _super);
57
53
  function OTLPTraceExporter(config) {
58
54
  if (config === void 0) { config = {}; }
59
- var _this = _super.call(this, config, JsonTraceSerializer, 'application/json') || this;
60
- _this.headers = __assign(__assign(__assign(__assign({}, _this.headers), USER_AGENT), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers));
61
- return _this;
55
+ return _super.call(this, config, JsonTraceSerializer, __assign(__assign({}, USER_AGENT), { 'Content-Type': 'application/json' }), 'TRACES', 'v1/traces') || this;
62
56
  }
63
- OTLPTraceExporter.prototype.getDefaultUrl = function (config) {
64
- return typeof config.url === 'string'
65
- ? config.url
66
- : getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
67
- ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)
68
- : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
69
- ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
70
- : DEFAULT_COLLECTOR_URL;
71
- };
72
57
  return OTLPTraceExporter;
73
58
  }(OTLPExporterNodeBase));
74
59
  export { OTLPTraceExporter };
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPTraceExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,YAAY,GACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,IAAM,+BAA+B,GAAG,WAAW,CAAC;AACpD,IAAM,qBAAqB,GAAG,2BAAyB,+BAAiC,CAAC;AACzF,IAAM,UAAU,GAAG;IACjB,YAAY,EAAE,mCAAiC,OAAS;CACzD,CAAC;AAEF;;GAEG;AACH;IACU,qCAA+D;IAGvE,2BAAY,MAAuC;QAAvC,uBAAA,EAAA,WAAuC;QAAnD,YACE,kBAAM,MAAM,EAAE,mBAAmB,EAAE,kBAAkB,CAAC,SASvD;QARC,KAAI,CAAC,OAAO,2CACP,KAAI,CAAC,OAAO,GACZ,UAAU,GACV,YAAY,CAAC,uBAAuB,CACrC,MAAM,EAAE,CAAC,iCAAiC,CAC3C,GACE,YAAY,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,CACjC,CAAC;;IACJ,CAAC;IAED,yCAAa,GAAb,UAAc,MAAkC;QAC9C,OAAO,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ;YACnC,CAAC,CAAC,MAAM,CAAC,GAAG;YACZ,CAAC,CAAC,MAAM,EAAE,CAAC,kCAAkC,CAAC,MAAM,GAAG,CAAC;gBACxD,CAAC,CAAC,2BAA2B,CAAC,MAAM,EAAE,CAAC,kCAAkC,CAAC;gBAC1E,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,wBAAC;AAAD,CAAC,AA5BD,CACU,oBAAoB,GA2B7B","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 { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport {\n OTLPExporterNodeBase,\n parseHeaders,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n OTLPExporterNodeConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\n} from '@opentelemetry/otlp-exporter-base';\nimport { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';\nimport { VERSION } from '../../version';\nimport { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\n/**\n * Collector Trace Exporter for Node\n */\nexport class OTLPTraceExporter\n extends OTLPExporterNodeBase<ReadableSpan, IExportTraceServiceResponse>\n implements SpanExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(config, JsonTraceSerializer, 'application/json');\n this.headers = {\n ...this.headers,\n ...USER_AGENT,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_TRACES_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_TRACES_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)\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"]}
1
+ {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPTraceExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAGzE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,IAAM,UAAU,GAAG;IACjB,YAAY,EAAE,mCAAiC,OAAS;CACzD,CAAC;AAEF;;GAEG;AACH;IACU,qCAA+D;IAGvE,2BAAY,MAAuC;QAAvC,uBAAA,EAAA,WAAuC;eACjD,kBACE,MAAM,EACN,mBAAmB,wBAEd,UAAU,KACb,cAAc,EAAE,kBAAkB,KAEpC,QAAQ,EACR,WAAW,CACZ;IACH,CAAC;IACH,wBAAC;AAAD,CAAC,AAhBD,CACU,oBAAoB,GAe7B","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 { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';\nimport { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';\nimport { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';\nimport { VERSION } from '../../version';\nimport { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';\n\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\n/**\n * Collector Trace Exporter for Node\n */\nexport class OTLPTraceExporter\n extends OTLPExporterNodeBase<ReadableSpan, IExportTraceServiceResponse>\n implements SpanExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(\n config,\n JsonTraceSerializer,\n {\n ...USER_AGENT,\n 'Content-Type': 'application/json',\n },\n 'TRACES',\n 'v1/traces'\n );\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 './OTLPTraceExporter';
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,qBAAqB,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 './OTLPTraceExporter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,qBAAqB,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 './OTLPTraceExporter';\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.52.1";
1
+ export declare const VERSION = "0.54.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.54.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.54.0';\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 './platform';
17
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,YAAY,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';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,YAAY,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';\n"]}
@@ -6,6 +6,5 @@ import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';
6
6
  */
7
7
  export declare class OTLPTraceExporter extends OTLPExporterBrowserBase<ReadableSpan, IExportTraceServiceResponse> implements SpanExporter {
8
8
  constructor(config?: OTLPExporterConfigBase);
9
- getDefaultUrl(config: OTLPExporterConfigBase): string;
10
9
  }
11
10
  //# sourceMappingURL=OTLPTraceExporter.d.ts.map
@@ -13,27 +13,15 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { getEnv, baggageUtils } from '@opentelemetry/core';
17
- import { appendResourcePathToUrl, appendRootPathToUrlIfNeeded, OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base';
16
+ import { OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base';
18
17
  import { JsonTraceSerializer, } from '@opentelemetry/otlp-transformer';
19
18
  const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';
20
- const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
21
19
  /**
22
20
  * Collector Trace Exporter for Web
23
21
  */
24
22
  export class OTLPTraceExporter extends OTLPExporterBrowserBase {
25
23
  constructor(config = {}) {
26
- super(config, JsonTraceSerializer, 'application/json');
27
- this._headers = Object.assign(this._headers, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS));
28
- }
29
- getDefaultUrl(config) {
30
- return typeof config.url === 'string'
31
- ? config.url
32
- : getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
33
- ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)
34
- : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
35
- ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
36
- : DEFAULT_COLLECTOR_URL;
24
+ super(config, JsonTraceSerializer, { 'Content-Type': 'application/json' }, DEFAULT_COLLECTOR_RESOURCE_PATH);
37
25
  }
38
26
  }
39
27
  //# sourceMappingURL=OTLPTraceExporter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPTraceExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAEL,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,+BAA+B,GAAG,WAAW,CAAC;AACpD,MAAM,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AAEzF;;GAEG;AACH,MAAM,OAAO,iBACX,SAAQ,uBAAkE;IAG1E,YAAY,SAAiC,EAAE;QAC7C,KAAK,CAAC,MAAM,EAAE,mBAAmB,EAAE,kBAAkB,CAAC,CAAC;QACvD,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAC3B,IAAI,CAAC,QAAQ,EACb,YAAY,CAAC,uBAAuB,CAClC,MAAM,EAAE,CAAC,iCAAiC,CAC3C,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,kCAAkC,CAAC,MAAM,GAAG,CAAC;gBACxD,CAAC,CAAC,2BAA2B,CAAC,MAAM,EAAE,CAAC,kCAAkC,CAAC;gBAC1E,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","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 { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport {\n OTLPExporterConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\n OTLPExporterBrowserBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportTraceServiceResponse,\n JsonTraceSerializer,\n} from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\n\n/**\n * Collector Trace Exporter for Web\n */\nexport class OTLPTraceExporter\n extends OTLPExporterBrowserBase<ReadableSpan, IExportTraceServiceResponse>\n implements SpanExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(config, JsonTraceSerializer, 'application/json');\n this._headers = Object.assign(\n this._headers,\n baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS\n )\n );\n }\n\n getDefaultUrl(config: OTLPExporterConfigBase): string {\n return typeof config.url === 'string'\n ? config.url\n : getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)\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"]}
1
+ {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPTraceExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAEL,uBAAuB,GACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAEpD;;GAEG;AACH,MAAM,OAAO,iBACX,SAAQ,uBAAkE;IAG1E,YAAY,SAAiC,EAAE;QAC7C,KAAK,CACH,MAAM,EACN,mBAAmB,EACnB,EAAE,cAAc,EAAE,kBAAkB,EAAE,EACtC,+BAA+B,CAChC,CAAC;IACJ,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 { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';\nimport {\n OTLPExporterConfigBase,\n OTLPExporterBrowserBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportTraceServiceResponse,\n JsonTraceSerializer,\n} from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';\n\n/**\n * Collector Trace Exporter for Web\n */\nexport class OTLPTraceExporter\n extends OTLPExporterBrowserBase<ReadableSpan, IExportTraceServiceResponse>\n implements SpanExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(\n config,\n JsonTraceSerializer,\n { 'Content-Type': 'application/json' },\n DEFAULT_COLLECTOR_RESOURCE_PATH\n );\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 './OTLPTraceExporter';
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,qBAAqB,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 './OTLPTraceExporter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,qBAAqB,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 './OTLPTraceExporter';\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"]}
@@ -7,6 +7,5 @@ import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';
7
7
  */
8
8
  export declare class OTLPTraceExporter extends OTLPExporterNodeBase<ReadableSpan, IExportTraceServiceResponse> implements SpanExporter {
9
9
  constructor(config?: OTLPExporterNodeConfigBase);
10
- getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
11
10
  }
12
11
  //# sourceMappingURL=OTLPTraceExporter.d.ts.map
@@ -13,13 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { getEnv, baggageUtils } from '@opentelemetry/core';
17
- import { OTLPExporterNodeBase, parseHeaders, } from '@opentelemetry/otlp-exporter-base';
18
- import { appendResourcePathToUrl, appendRootPathToUrlIfNeeded, } from '@opentelemetry/otlp-exporter-base';
16
+ import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
19
17
  import { VERSION } from '../../version';
20
18
  import { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';
21
- const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';
22
- const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
23
19
  const USER_AGENT = {
24
20
  'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,
25
21
  };
@@ -28,17 +24,7 @@ const USER_AGENT = {
28
24
  */
29
25
  export class OTLPTraceExporter extends OTLPExporterNodeBase {
30
26
  constructor(config = {}) {
31
- super(config, JsonTraceSerializer, 'application/json');
32
- this.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, this.headers), USER_AGENT), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers));
33
- }
34
- getDefaultUrl(config) {
35
- return typeof config.url === 'string'
36
- ? config.url
37
- : getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
38
- ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)
39
- : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
40
- ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
41
- : DEFAULT_COLLECTOR_URL;
27
+ super(config, JsonTraceSerializer, Object.assign(Object.assign({}, USER_AGENT), { 'Content-Type': 'application/json' }), 'TRACES', 'v1/traces');
42
28
  }
43
29
  }
44
30
  //# sourceMappingURL=OTLPTraceExporter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPTraceExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,YAAY,GACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAEL,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,MAAM,+BAA+B,GAAG,WAAW,CAAC;AACpD,MAAM,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AACzF,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,iCAAiC,OAAO,EAAE;CACzD,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,iBACX,SAAQ,oBAA+D;IAGvE,YAAY,SAAqC,EAAE;QACjD,KAAK,CAAC,MAAM,EAAE,mBAAmB,EAAE,kBAAkB,CAAC,CAAC;QACvD,IAAI,CAAC,OAAO,+DACP,IAAI,CAAC,OAAO,GACZ,UAAU,GACV,YAAY,CAAC,uBAAuB,CACrC,MAAM,EAAE,CAAC,iCAAiC,CAC3C,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,kCAAkC,CAAC,MAAM,GAAG,CAAC;gBACxD,CAAC,CAAC,2BAA2B,CAAC,MAAM,EAAE,CAAC,kCAAkC,CAAC;gBAC1E,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","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 { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport {\n OTLPExporterNodeBase,\n parseHeaders,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n OTLPExporterNodeConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\n} from '@opentelemetry/otlp-exporter-base';\nimport { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';\nimport { VERSION } from '../../version';\nimport { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\n/**\n * Collector Trace Exporter for Node\n */\nexport class OTLPTraceExporter\n extends OTLPExporterNodeBase<ReadableSpan, IExportTraceServiceResponse>\n implements SpanExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(config, JsonTraceSerializer, 'application/json');\n this.headers = {\n ...this.headers,\n ...USER_AGENT,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_TRACES_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_TRACES_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)\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"]}
1
+ {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPTraceExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAGzE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,iCAAiC,OAAO,EAAE;CACzD,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,iBACX,SAAQ,oBAA+D;IAGvE,YAAY,SAAqC,EAAE;QACjD,KAAK,CACH,MAAM,EACN,mBAAmB,kCAEd,UAAU,KACb,cAAc,EAAE,kBAAkB,KAEpC,QAAQ,EACR,WAAW,CACZ,CAAC;IACJ,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 { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';\nimport { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';\nimport { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';\nimport { VERSION } from '../../version';\nimport { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';\n\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\n/**\n * Collector Trace Exporter for Node\n */\nexport class OTLPTraceExporter\n extends OTLPExporterNodeBase<ReadableSpan, IExportTraceServiceResponse>\n implements SpanExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(\n config,\n JsonTraceSerializer,\n {\n ...USER_AGENT,\n 'Content-Type': 'application/json',\n },\n 'TRACES',\n 'v1/traces'\n );\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 './OTLPTraceExporter';
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,qBAAqB,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 './OTLPTraceExporter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,cAAc,qBAAqB,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 './OTLPTraceExporter';\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.52.1";
1
+ export declare const VERSION = "0.54.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.54.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.54.0';\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("./platform"), exports);
29
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH,6CAA2B","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';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH;;GAEG;AACH,6CAA2B","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';\n"]}
@@ -6,6 +6,5 @@ import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';
6
6
  */
7
7
  export declare class OTLPTraceExporter extends OTLPExporterBrowserBase<ReadableSpan, IExportTraceServiceResponse> implements SpanExporter {
8
8
  constructor(config?: OTLPExporterConfigBase);
9
- getDefaultUrl(config: OTLPExporterConfigBase): string;
10
9
  }
11
10
  //# sourceMappingURL=OTLPTraceExporter.d.ts.map
@@ -16,27 +16,15 @@
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.OTLPTraceExporter = void 0;
19
- const core_1 = require("@opentelemetry/core");
20
19
  const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
21
20
  const otlp_transformer_1 = require("@opentelemetry/otlp-transformer");
22
21
  const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';
23
- const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
24
22
  /**
25
23
  * Collector Trace Exporter for Web
26
24
  */
27
25
  class OTLPTraceExporter extends otlp_exporter_base_1.OTLPExporterBrowserBase {
28
26
  constructor(config = {}) {
29
- super(config, otlp_transformer_1.JsonTraceSerializer, 'application/json');
30
- this._headers = Object.assign(this._headers, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS));
31
- }
32
- getDefaultUrl(config) {
33
- return typeof config.url === 'string'
34
- ? config.url
35
- : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
36
- ? (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)
37
- : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
38
- ? (0, otlp_exporter_base_1.appendResourcePathToUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
39
- : DEFAULT_COLLECTOR_URL;
27
+ super(config, otlp_transformer_1.JsonTraceSerializer, { 'Content-Type': 'application/json' }, DEFAULT_COLLECTOR_RESOURCE_PATH);
40
28
  }
41
29
  }
42
30
  exports.OTLPTraceExporter = OTLPTraceExporter;
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPTraceExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,8CAA2D;AAC3D,0EAK2C;AAC3C,sEAGyC;AAEzC,MAAM,+BAA+B,GAAG,WAAW,CAAC;AACpD,MAAM,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AAEzF;;GAEG;AACH,MAAa,iBACX,SAAQ,4CAAkE;IAG1E,YAAY,SAAiC,EAAE;QAC7C,KAAK,CAAC,MAAM,EAAE,sCAAmB,EAAE,kBAAkB,CAAC,CAAC;QACvD,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAC3B,IAAI,CAAC,QAAQ,EACb,mBAAY,CAAC,uBAAuB,CAClC,IAAA,aAAM,GAAE,CAAC,iCAAiC,CAC3C,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,kCAAkC,CAAC,MAAM,GAAG,CAAC;gBACxD,CAAC,CAAC,IAAA,gDAA2B,EAAC,IAAA,aAAM,GAAE,CAAC,kCAAkC,CAAC;gBAC1E,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;AA1BD,8CA0BC","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 { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport {\n OTLPExporterConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\n OTLPExporterBrowserBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportTraceServiceResponse,\n JsonTraceSerializer,\n} from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\n\n/**\n * Collector Trace Exporter for Web\n */\nexport class OTLPTraceExporter\n extends OTLPExporterBrowserBase<ReadableSpan, IExportTraceServiceResponse>\n implements SpanExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(config, JsonTraceSerializer, 'application/json');\n this._headers = Object.assign(\n this._headers,\n baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS\n )\n );\n }\n\n getDefaultUrl(config: OTLPExporterConfigBase): string {\n return typeof config.url === 'string'\n ? config.url\n : getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)\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"]}
1
+ {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPTraceExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,0EAG2C;AAC3C,sEAGyC;AAEzC,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAEpD;;GAEG;AACH,MAAa,iBACX,SAAQ,4CAAkE;IAG1E,YAAY,SAAiC,EAAE;QAC7C,KAAK,CACH,MAAM,EACN,sCAAmB,EACnB,EAAE,cAAc,EAAE,kBAAkB,EAAE,EACtC,+BAA+B,CAChC,CAAC;IACJ,CAAC;CACF;AAZD,8CAYC","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 { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';\nimport {\n OTLPExporterConfigBase,\n OTLPExporterBrowserBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n IExportTraceServiceResponse,\n JsonTraceSerializer,\n} from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';\n\n/**\n * Collector Trace Exporter for Web\n */\nexport class OTLPTraceExporter\n extends OTLPExporterBrowserBase<ReadableSpan, IExportTraceServiceResponse>\n implements SpanExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(\n config,\n JsonTraceSerializer,\n { 'Content-Type': 'application/json' },\n DEFAULT_COLLECTOR_RESOURCE_PATH\n );\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("./OTLPTraceExporter"), 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,sDAAoC","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 './OTLPTraceExporter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH;;GAEG;AACH,sDAAoC","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 './OTLPTraceExporter';\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"]}
@@ -7,6 +7,5 @@ import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';
7
7
  */
8
8
  export declare class OTLPTraceExporter extends OTLPExporterNodeBase<ReadableSpan, IExportTraceServiceResponse> implements SpanExporter {
9
9
  constructor(config?: OTLPExporterNodeConfigBase);
10
- getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
11
10
  }
12
11
  //# sourceMappingURL=OTLPTraceExporter.d.ts.map
@@ -16,13 +16,9 @@
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.OTLPTraceExporter = void 0;
19
- const core_1 = require("@opentelemetry/core");
20
19
  const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
21
- const otlp_exporter_base_2 = require("@opentelemetry/otlp-exporter-base");
22
20
  const version_1 = require("../../version");
23
21
  const otlp_transformer_1 = require("@opentelemetry/otlp-transformer");
24
- const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';
25
- const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
26
22
  const USER_AGENT = {
27
23
  'User-Agent': `OTel-OTLP-Exporter-JavaScript/${version_1.VERSION}`,
28
24
  };
@@ -31,17 +27,7 @@ const USER_AGENT = {
31
27
  */
32
28
  class OTLPTraceExporter extends otlp_exporter_base_1.OTLPExporterNodeBase {
33
29
  constructor(config = {}) {
34
- super(config, otlp_transformer_1.JsonTraceSerializer, 'application/json');
35
- 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_TRACES_HEADERS)), (0, otlp_exporter_base_1.parseHeaders)(config === null || config === void 0 ? void 0 : config.headers));
36
- }
37
- getDefaultUrl(config) {
38
- return typeof config.url === 'string'
39
- ? config.url
40
- : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
41
- ? (0, otlp_exporter_base_2.appendRootPathToUrlIfNeeded)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)
42
- : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
43
- ? (0, otlp_exporter_base_2.appendResourcePathToUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
44
- : DEFAULT_COLLECTOR_URL;
30
+ super(config, otlp_transformer_1.JsonTraceSerializer, Object.assign(Object.assign({}, USER_AGENT), { 'Content-Type': 'application/json' }), 'TRACES', 'v1/traces');
45
31
  }
46
32
  }
47
33
  exports.OTLPTraceExporter = OTLPTraceExporter;
@@ -1 +1 @@
1
- {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPTraceExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,8CAA2D;AAC3D,0EAG2C;AAC3C,0EAI2C;AAE3C,2CAAwC;AACxC,sEAAsE;AAEtE,MAAM,+BAA+B,GAAG,WAAW,CAAC;AACpD,MAAM,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AACzF,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,iCAAiC,iBAAO,EAAE;CACzD,CAAC;AAEF;;GAEG;AACH,MAAa,iBACX,SAAQ,yCAA+D;IAGvE,YAAY,SAAqC,EAAE;QACjD,KAAK,CAAC,MAAM,EAAE,sCAAmB,EAAE,kBAAkB,CAAC,CAAC;QACvD,IAAI,CAAC,OAAO,+DACP,IAAI,CAAC,OAAO,GACZ,UAAU,GACV,mBAAY,CAAC,uBAAuB,CACrC,IAAA,aAAM,GAAE,CAAC,iCAAiC,CAC3C,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,kCAAkC,CAAC,MAAM,GAAG,CAAC;gBACxD,CAAC,CAAC,IAAA,gDAA2B,EAAC,IAAA,aAAM,GAAE,CAAC,kCAAkC,CAAC;gBAC1E,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;AA5BD,8CA4BC","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 { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport {\n OTLPExporterNodeBase,\n parseHeaders,\n} from '@opentelemetry/otlp-exporter-base';\nimport {\n OTLPExporterNodeConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\n} from '@opentelemetry/otlp-exporter-base';\nimport { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';\nimport { VERSION } from '../../version';\nimport { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\n/**\n * Collector Trace Exporter for Node\n */\nexport class OTLPTraceExporter\n extends OTLPExporterNodeBase<ReadableSpan, IExportTraceServiceResponse>\n implements SpanExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(config, JsonTraceSerializer, 'application/json');\n this.headers = {\n ...this.headers,\n ...USER_AGENT,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_TRACES_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_TRACES_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)\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"]}
1
+ {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPTraceExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,0EAAyE;AAGzE,2CAAwC;AACxC,sEAAsE;AAEtE,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,iCAAiC,iBAAO,EAAE;CACzD,CAAC;AAEF;;GAEG;AACH,MAAa,iBACX,SAAQ,yCAA+D;IAGvE,YAAY,SAAqC,EAAE;QACjD,KAAK,CACH,MAAM,EACN,sCAAmB,kCAEd,UAAU,KACb,cAAc,EAAE,kBAAkB,KAEpC,QAAQ,EACR,WAAW,CACZ,CAAC;IACJ,CAAC;CACF;AAhBD,8CAgBC","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 { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';\nimport { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';\nimport { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';\nimport { VERSION } from '../../version';\nimport { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';\n\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\n/**\n * Collector Trace Exporter for Node\n */\nexport class OTLPTraceExporter\n extends OTLPExporterNodeBase<ReadableSpan, IExportTraceServiceResponse>\n implements SpanExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(\n config,\n JsonTraceSerializer,\n {\n ...USER_AGENT,\n 'Content-Type': 'application/json',\n },\n 'TRACES',\n 'v1/traces'\n );\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("./OTLPTraceExporter"), 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,sDAAoC","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 './OTLPTraceExporter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;AAEH;;GAEG;AACH,sDAAoC","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 './OTLPTraceExporter';\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.52.1";
1
+ export declare const VERSION = "0.54.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.54.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.54.0';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/exporter-trace-otlp-http",
3
- "version": "0.52.1",
3
+ "version": "0.54.0",
4
4
  "description": "OpenTelemetry Collector Trace Exporter allows user to send collected traces to the OpenTelemetry Collector",
5
5
  "main": "build/src/index.js",
6
6
  "module": "build/esm/index.js",
@@ -17,19 +17,17 @@
17
17
  "prepublishOnly": "npm run compile",
18
18
  "compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
19
19
  "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
20
- "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
21
20
  "lint": "eslint . --ext .ts",
22
21
  "lint:fix": "eslint . --ext .ts --fix",
23
22
  "tdd": "npm run test -- --watch-extensions ts --watch",
24
23
  "tdd:browser": "karma start",
25
- "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
24
+ "test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
26
25
  "test:browser": "karma start --single-run",
27
26
  "version": "node ../../../scripts/version-update.js",
28
27
  "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
29
28
  "precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
30
29
  "prewatch": "npm run precompile",
31
30
  "peer-api-check": "node ../../../scripts/peer-api-check.js",
32
- "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
33
31
  "align-api-deps": "node ../../../scripts/align-api-deps.js"
34
32
  },
35
33
  "keywords": [
@@ -64,45 +62,43 @@
64
62
  "access": "public"
65
63
  },
66
64
  "devDependencies": {
67
- "@babel/core": "7.24.7",
68
- "@babel/preset-env": "7.24.7",
65
+ "@babel/core": "7.25.2",
66
+ "@babel/preset-env": "7.25.4",
69
67
  "@opentelemetry/api": "1.9.0",
70
- "@types/mocha": "10.0.6",
68
+ "@types/mocha": "10.0.8",
71
69
  "@types/node": "18.6.5",
72
70
  "@types/sinon": "17.0.3",
73
71
  "@types/webpack-env": "1.16.3",
74
- "babel-loader": "8.3.0",
75
- "babel-plugin-istanbul": "6.1.1",
76
- "codecov": "3.8.3",
72
+ "babel-loader": "8.4.1",
73
+ "babel-plugin-istanbul": "7.0.0",
77
74
  "cross-var": "1.1.0",
78
- "karma": "6.4.3",
75
+ "karma": "6.4.4",
79
76
  "karma-chrome-launcher": "3.1.0",
80
77
  "karma-coverage": "2.2.1",
81
78
  "karma-mocha": "2.0.1",
82
79
  "karma-spec-reporter": "0.0.36",
83
80
  "karma-webpack": "5.0.1",
84
81
  "lerna": "6.6.2",
85
- "mocha": "10.2.0",
82
+ "mocha": "10.7.3",
86
83
  "nyc": "15.1.0",
87
84
  "sinon": "15.1.2",
88
85
  "ts-loader": "9.5.1",
89
- "ts-mocha": "10.0.0",
90
86
  "typescript": "4.4.4",
91
- "webpack": "5.89.0",
87
+ "webpack": "5.94.0",
92
88
  "webpack-cli": "5.1.4",
93
89
  "webpack-merge": "5.10.0"
94
90
  },
95
91
  "peerDependencies": {
96
- "@opentelemetry/api": "^1.0.0"
92
+ "@opentelemetry/api": "^1.3.0"
97
93
  },
98
94
  "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-trace-base": "1.25.1"
95
+ "@opentelemetry/core": "1.27.0",
96
+ "@opentelemetry/otlp-exporter-base": "0.54.0",
97
+ "@opentelemetry/otlp-transformer": "0.54.0",
98
+ "@opentelemetry/resources": "1.27.0",
99
+ "@opentelemetry/sdk-trace-base": "1.27.0"
104
100
  },
105
101
  "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-http",
106
102
  "sideEffects": false,
107
- "gitHead": "0608f405573901e54db01e44c533009cf28be262"
103
+ "gitHead": "eb3ca4fb07ee31c62093f5fcec56575573c902ce"
108
104
  }