@opentelemetry/exporter-trace-otlp-http 0.54.2 → 0.56.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 (53) hide show
  1. package/README.md +24 -18
  2. package/build/esm/index.js +1 -1
  3. package/build/esm/index.js.map +1 -1
  4. package/build/esm/platform/browser/OTLPTraceExporter.d.ts +2 -3
  5. package/build/esm/platform/browser/OTLPTraceExporter.js +5 -5
  6. package/build/esm/platform/browser/OTLPTraceExporter.js.map +1 -1
  7. package/build/esm/platform/browser/index.js +1 -1
  8. package/build/esm/platform/browser/index.js.map +1 -1
  9. package/build/esm/platform/index.js +1 -1
  10. package/build/esm/platform/index.js.map +1 -1
  11. package/build/esm/platform/node/OTLPTraceExporter.d.ts +2 -4
  12. package/build/esm/platform/node/OTLPTraceExporter.js +7 -17
  13. package/build/esm/platform/node/OTLPTraceExporter.js.map +1 -1
  14. package/build/esm/platform/node/index.js +1 -1
  15. package/build/esm/platform/node/index.js.map +1 -1
  16. package/build/esm/version.d.ts +1 -1
  17. package/build/esm/version.js +1 -1
  18. package/build/esm/version.js.map +1 -1
  19. package/build/esnext/index.js +1 -1
  20. package/build/esnext/index.js.map +1 -1
  21. package/build/esnext/platform/browser/OTLPTraceExporter.d.ts +2 -3
  22. package/build/esnext/platform/browser/OTLPTraceExporter.js +5 -5
  23. package/build/esnext/platform/browser/OTLPTraceExporter.js.map +1 -1
  24. package/build/esnext/platform/browser/index.js +1 -1
  25. package/build/esnext/platform/browser/index.js.map +1 -1
  26. package/build/esnext/platform/index.js +1 -1
  27. package/build/esnext/platform/index.js.map +1 -1
  28. package/build/esnext/platform/node/OTLPTraceExporter.d.ts +2 -4
  29. package/build/esnext/platform/node/OTLPTraceExporter.js +7 -6
  30. package/build/esnext/platform/node/OTLPTraceExporter.js.map +1 -1
  31. package/build/esnext/platform/node/index.js +1 -1
  32. package/build/esnext/platform/node/index.js.map +1 -1
  33. package/build/esnext/version.d.ts +1 -1
  34. package/build/esnext/version.js +1 -1
  35. package/build/esnext/version.js.map +1 -1
  36. package/build/src/index.js +1 -1
  37. package/build/src/index.js.map +1 -1
  38. package/build/src/platform/browser/OTLPTraceExporter.d.ts +2 -3
  39. package/build/src/platform/browser/OTLPTraceExporter.js +3 -3
  40. package/build/src/platform/browser/OTLPTraceExporter.js.map +1 -1
  41. package/build/src/platform/browser/index.js +1 -1
  42. package/build/src/platform/browser/index.js.map +1 -1
  43. package/build/src/platform/index.js +1 -1
  44. package/build/src/platform/index.js.map +1 -1
  45. package/build/src/platform/node/OTLPTraceExporter.d.ts +2 -4
  46. package/build/src/platform/node/OTLPTraceExporter.js +6 -5
  47. package/build/src/platform/node/OTLPTraceExporter.js.map +1 -1
  48. package/build/src/platform/node/index.js +1 -1
  49. package/build/src/platform/node/index.js.map +1 -1
  50. package/build/src/version.d.ts +1 -1
  51. package/build/src/version.js +1 -1
  52. package/build/src/version.js.map +1 -1
  53. package/package.json +12 -12
package/README.md CHANGED
@@ -36,18 +36,21 @@ const collectorOptions = {
36
36
  concurrencyLimit: 10, // an optional limit on pending requests
37
37
  };
38
38
 
39
- const provider = new WebTracerProvider();
40
39
  const exporter = new OTLPTraceExporter(collectorOptions);
41
- provider.addSpanProcessor(new BatchSpanProcessor(exporter, {
42
- // The maximum queue size. After the size is reached spans are dropped.
43
- maxQueueSize: 100,
44
- // The maximum batch size of every export. It must be smaller or equal to maxQueueSize.
45
- maxExportBatchSize: 10,
46
- // The interval between two consecutive exports
47
- scheduledDelayMillis: 500,
48
- // How long the export can run before it is cancelled
49
- exportTimeoutMillis: 30000,
50
- }));
40
+ const provider = new WebTracerProvider({
41
+ spanProcessors: [
42
+ new BatchSpanProcessor(exporter, {
43
+ // The maximum queue size. After the size is reached spans are dropped.
44
+ maxQueueSize: 100,
45
+ // The maximum batch size of every export. It must be smaller or equal to maxQueueSize.
46
+ maxExportBatchSize: 10,
47
+ // The interval between two consecutive exports
48
+ scheduledDelayMillis: 500,
49
+ // How long the export can run before it is cancelled
50
+ exportTimeoutMillis: 30000,
51
+ })
52
+ ]
53
+ });
51
54
 
52
55
  provider.register();
53
56
 
@@ -67,14 +70,17 @@ const collectorOptions = {
67
70
  concurrencyLimit: 10, // an optional limit on pending requests
68
71
  };
69
72
 
70
- const provider = new BasicTracerProvider();
71
73
  const exporter = new OTLPTraceExporter(collectorOptions);
72
- provider.addSpanProcessor(new BatchSpanProcessor(exporter, {
73
- // The maximum queue size. After the size is reached spans are dropped.
74
- maxQueueSize: 1000,
75
- // The interval between two consecutive exports
76
- scheduledDelayMillis: 30000,
77
- }));
74
+ const provider = new BasicTracerProvider({
75
+ spanProcessors: [
76
+ new BatchSpanProcessor(exporter, {
77
+ // The maximum queue size. After the size is reached spans are dropped.
78
+ maxQueueSize: 1000,
79
+ // The interval between two consecutive exports
80
+ scheduledDelayMillis: 30000,
81
+ })
82
+ ]
83
+ });
78
84
 
79
85
  provider.register();
80
86
 
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
- * TODO: Replace export * with named exports before next major version
17
+ * TODO: Replace wildcard export with named exports before next major version
18
18
  */
19
19
  export * from './platform';
20
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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"]}
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 wildcard export with named exports before next major version\n */\nexport * from './platform';\n"]}
@@ -1,10 +1,9 @@
1
1
  import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
2
- import { OTLPExporterConfigBase, OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
3
- import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';
2
+ import { OTLPExporterConfigBase, OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
4
3
  /**
5
4
  * Collector Trace Exporter for Web
6
5
  */
7
- export declare class OTLPTraceExporter extends OTLPExporterBrowserBase<ReadableSpan, IExportTraceServiceResponse> implements SpanExporter {
6
+ export declare class OTLPTraceExporter extends OTLPExporterBase<ReadableSpan[]> implements SpanExporter {
8
7
  constructor(config?: OTLPExporterConfigBase);
9
8
  }
10
9
  //# sourceMappingURL=OTLPTraceExporter.d.ts.map
@@ -28,9 +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 { OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base';
32
- import { JsonTraceSerializer, } from '@opentelemetry/otlp-transformer';
33
- var DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';
31
+ import { OTLPExporterBase, } from '@opentelemetry/otlp-exporter-base';
32
+ import { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';
33
+ import { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http';
34
34
  /**
35
35
  * Collector Trace Exporter for Web
36
36
  */
@@ -38,9 +38,9 @@ var OTLPTraceExporter = /** @class */ (function (_super) {
38
38
  __extends(OTLPTraceExporter, _super);
39
39
  function OTLPTraceExporter(config) {
40
40
  if (config === void 0) { config = {}; }
41
- return _super.call(this, config, JsonTraceSerializer, { 'Content-Type': 'application/json' }, DEFAULT_COLLECTOR_RESOURCE_PATH) || this;
41
+ return _super.call(this, createLegacyOtlpBrowserExportDelegate(config, JsonTraceSerializer, 'v1/traces', { 'Content-Type': 'application/json' })) || this;
42
42
  }
43
43
  return OTLPTraceExporter;
44
- }(OTLPExporterBrowserBase));
44
+ }(OTLPExporterBase));
45
45
  export { OTLPTraceExporter };
46
46
  //# 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,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"]}
1
+ {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPTraceExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAGH,OAAO,EAEL,gBAAgB,GACjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,qCAAqC,EAAE,MAAM,gDAAgD,CAAC;AAEvG;;GAEG;AACH;IACU,qCAAgC;IAGxC,2BAAY,MAAmC;QAAnC,uBAAA,EAAA,WAAmC;eAC7C,kBACE,qCAAqC,CACnC,MAAM,EACN,mBAAmB,EACnB,WAAW,EACX,EAAE,cAAc,EAAE,kBAAkB,EAAE,CACvC,CACF;IACH,CAAC;IACH,wBAAC;AAAD,CAAC,AAdD,CACU,gBAAgB,GAazB","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 OTLPExporterBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';\nimport { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http';\n\n/**\n * Collector Trace Exporter for Web\n */\nexport class OTLPTraceExporter\n extends OTLPExporterBase<ReadableSpan[]>\n implements SpanExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(\n createLegacyOtlpBrowserExportDelegate(\n config,\n JsonTraceSerializer,\n 'v1/traces',\n { 'Content-Type': 'application/json' }\n )\n );\n }\n}\n"]}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
- * TODO: Replace export * with named exports before next major version
17
+ * TODO: Replace wildcard export with named exports before next major version
18
18
  */
19
19
  export * from './OTLPTraceExporter';
20
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;;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
+ {"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 wildcard export with named exports before next major version\n */\nexport * from './OTLPTraceExporter';\n"]}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
- * TODO: Replace export * with named exports before next major version
17
+ * TODO: Replace wildcard export with named exports before next major version
18
18
  */
19
19
  export * from './node';
20
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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"]}
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 wildcard export with named exports before next major version\n */\nexport * from './node';\n"]}
@@ -1,11 +1,9 @@
1
1
  import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
2
- import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
3
- import { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';
4
- import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';
2
+ import { OTLPExporterNodeConfigBase, OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
5
3
  /**
6
4
  * Collector Trace Exporter for Node
7
5
  */
8
- export declare class OTLPTraceExporter extends OTLPExporterNodeBase<ReadableSpan, IExportTraceServiceResponse> implements SpanExporter {
6
+ export declare class OTLPTraceExporter extends OTLPExporterBase<ReadableSpan[]> implements SpanExporter {
9
7
  constructor(config?: OTLPExporterNodeConfigBase);
10
8
  }
11
9
  //# sourceMappingURL=OTLPTraceExporter.d.ts.map
@@ -28,23 +28,10 @@ var __extends = (this && this.__extends) || (function () {
28
28
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
29
29
  };
30
30
  })();
31
- var __assign = (this && this.__assign) || function () {
32
- __assign = Object.assign || function(t) {
33
- for (var s, i = 1, n = arguments.length; i < n; i++) {
34
- s = arguments[i];
35
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
36
- t[p] = s[p];
37
- }
38
- return t;
39
- };
40
- return __assign.apply(this, arguments);
41
- };
42
- import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
31
+ import { OTLPExporterBase, } from '@opentelemetry/otlp-exporter-base';
43
32
  import { VERSION } from '../../version';
44
33
  import { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';
45
- var USER_AGENT = {
46
- 'User-Agent': "OTel-OTLP-Exporter-JavaScript/" + VERSION,
47
- };
34
+ import { convertLegacyHttpOptions, createOtlpHttpExportDelegate, } from '@opentelemetry/otlp-exporter-base/node-http';
48
35
  /**
49
36
  * Collector Trace Exporter for Node
50
37
  */
@@ -52,9 +39,12 @@ var OTLPTraceExporter = /** @class */ (function (_super) {
52
39
  __extends(OTLPTraceExporter, _super);
53
40
  function OTLPTraceExporter(config) {
54
41
  if (config === void 0) { config = {}; }
55
- return _super.call(this, config, JsonTraceSerializer, __assign(__assign({}, USER_AGENT), { 'Content-Type': 'application/json' }), 'TRACES', 'v1/traces') || this;
42
+ return _super.call(this, createOtlpHttpExportDelegate(convertLegacyHttpOptions(config, 'TRACES', 'v1/traces', {
43
+ 'User-Agent': "OTel-OTLP-Exporter-JavaScript/" + VERSION,
44
+ 'Content-Type': 'application/json',
45
+ }), JsonTraceSerializer)) || this;
56
46
  }
57
47
  return OTLPTraceExporter;
58
- }(OTLPExporterNodeBase));
48
+ }(OTLPExporterBase));
59
49
  export { OTLPTraceExporter };
60
50
  //# 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,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"]}
1
+ {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPTraceExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAGH,OAAO,EAEL,gBAAgB,GACjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EACL,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,6CAA6C,CAAC;AAErD;;GAEG;AACH;IACU,qCAAgC;IAGxC,2BAAY,MAAuC;QAAvC,uBAAA,EAAA,WAAuC;eACjD,kBACE,4BAA4B,CAC1B,wBAAwB,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE;YACtD,YAAY,EAAE,mCAAiC,OAAS;YACxD,cAAc,EAAE,kBAAkB;SACnC,CAAC,EACF,mBAAmB,CACpB,CACF;IACH,CAAC;IACH,wBAAC;AAAD,CAAC,AAfD,CACU,gBAAgB,GAczB","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 OTLPExporterNodeConfigBase,\n OTLPExporterBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport { VERSION } from '../../version';\nimport { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';\nimport {\n convertLegacyHttpOptions,\n createOtlpHttpExportDelegate,\n} from '@opentelemetry/otlp-exporter-base/node-http';\n\n/**\n * Collector Trace Exporter for Node\n */\nexport class OTLPTraceExporter\n extends OTLPExporterBase<ReadableSpan[]>\n implements SpanExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(\n createOtlpHttpExportDelegate(\n convertLegacyHttpOptions(config, 'TRACES', 'v1/traces', {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n 'Content-Type': 'application/json',\n }),\n JsonTraceSerializer\n )\n );\n }\n}\n"]}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
- * TODO: Replace export * with named exports before next major version
17
+ * TODO: Replace wildcard export with named exports before next major version
18
18
  */
19
19
  export * from './OTLPTraceExporter';
20
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;;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
+ {"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 wildcard export with named exports before next major version\n */\nexport * from './OTLPTraceExporter';\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.54.2";
1
+ export declare const VERSION = "0.56.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.54.2';
17
+ export var VERSION = '0.56.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.54.2';\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.56.0';\n"]}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
- * TODO: Replace export * with named exports before next major version
17
+ * TODO: Replace wildcard export with named exports before next major version
18
18
  */
19
19
  export * from './platform';
20
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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"]}
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 wildcard export with named exports before next major version\n */\nexport * from './platform';\n"]}
@@ -1,10 +1,9 @@
1
1
  import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
2
- import { OTLPExporterConfigBase, OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
3
- import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';
2
+ import { OTLPExporterConfigBase, OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
4
3
  /**
5
4
  * Collector Trace Exporter for Web
6
5
  */
7
- export declare class OTLPTraceExporter extends OTLPExporterBrowserBase<ReadableSpan, IExportTraceServiceResponse> implements SpanExporter {
6
+ export declare class OTLPTraceExporter extends OTLPExporterBase<ReadableSpan[]> implements SpanExporter {
8
7
  constructor(config?: OTLPExporterConfigBase);
9
8
  }
10
9
  //# sourceMappingURL=OTLPTraceExporter.d.ts.map
@@ -13,15 +13,15 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base';
17
- import { JsonTraceSerializer, } from '@opentelemetry/otlp-transformer';
18
- const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';
16
+ import { OTLPExporterBase, } from '@opentelemetry/otlp-exporter-base';
17
+ import { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';
18
+ import { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http';
19
19
  /**
20
20
  * Collector Trace Exporter for Web
21
21
  */
22
- export class OTLPTraceExporter extends OTLPExporterBrowserBase {
22
+ export class OTLPTraceExporter extends OTLPExporterBase {
23
23
  constructor(config = {}) {
24
- super(config, JsonTraceSerializer, { 'Content-Type': 'application/json' }, DEFAULT_COLLECTOR_RESOURCE_PATH);
24
+ super(createLegacyOtlpBrowserExportDelegate(config, JsonTraceSerializer, 'v1/traces', { 'Content-Type': 'application/json' }));
25
25
  }
26
26
  }
27
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,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"]}
1
+ {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPTraceExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAEL,gBAAgB,GACjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,qCAAqC,EAAE,MAAM,gDAAgD,CAAC;AAEvG;;GAEG;AACH,MAAM,OAAO,iBACX,SAAQ,gBAAgC;IAGxC,YAAY,SAAiC,EAAE;QAC7C,KAAK,CACH,qCAAqC,CACnC,MAAM,EACN,mBAAmB,EACnB,WAAW,EACX,EAAE,cAAc,EAAE,kBAAkB,EAAE,CACvC,CACF,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 OTLPExporterBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';\nimport { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http';\n\n/**\n * Collector Trace Exporter for Web\n */\nexport class OTLPTraceExporter\n extends OTLPExporterBase<ReadableSpan[]>\n implements SpanExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(\n createLegacyOtlpBrowserExportDelegate(\n config,\n JsonTraceSerializer,\n 'v1/traces',\n { 'Content-Type': 'application/json' }\n )\n );\n }\n}\n"]}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
- * TODO: Replace export * with named exports before next major version
17
+ * TODO: Replace wildcard export with named exports before next major version
18
18
  */
19
19
  export * from './OTLPTraceExporter';
20
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;;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
+ {"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 wildcard export with named exports before next major version\n */\nexport * from './OTLPTraceExporter';\n"]}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
- * TODO: Replace export * with named exports before next major version
17
+ * TODO: Replace wildcard export with named exports before next major version
18
18
  */
19
19
  export * from './node';
20
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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"]}
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 wildcard export with named exports before next major version\n */\nexport * from './node';\n"]}
@@ -1,11 +1,9 @@
1
1
  import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
2
- import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
3
- import { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';
4
- import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';
2
+ import { OTLPExporterNodeConfigBase, OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
5
3
  /**
6
4
  * Collector Trace Exporter for Node
7
5
  */
8
- export declare class OTLPTraceExporter extends OTLPExporterNodeBase<ReadableSpan, IExportTraceServiceResponse> implements SpanExporter {
6
+ export declare class OTLPTraceExporter extends OTLPExporterBase<ReadableSpan[]> implements SpanExporter {
9
7
  constructor(config?: OTLPExporterNodeConfigBase);
10
8
  }
11
9
  //# sourceMappingURL=OTLPTraceExporter.d.ts.map
@@ -13,18 +13,19 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
16
+ import { OTLPExporterBase, } from '@opentelemetry/otlp-exporter-base';
17
17
  import { VERSION } from '../../version';
18
18
  import { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';
19
- const USER_AGENT = {
20
- 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,
21
- };
19
+ import { convertLegacyHttpOptions, createOtlpHttpExportDelegate, } from '@opentelemetry/otlp-exporter-base/node-http';
22
20
  /**
23
21
  * Collector Trace Exporter for Node
24
22
  */
25
- export class OTLPTraceExporter extends OTLPExporterNodeBase {
23
+ export class OTLPTraceExporter extends OTLPExporterBase {
26
24
  constructor(config = {}) {
27
- super(config, JsonTraceSerializer, Object.assign(Object.assign({}, USER_AGENT), { 'Content-Type': 'application/json' }), 'TRACES', 'v1/traces');
25
+ super(createOtlpHttpExportDelegate(convertLegacyHttpOptions(config, 'TRACES', 'v1/traces', {
26
+ 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,
27
+ 'Content-Type': 'application/json',
28
+ }), JsonTraceSerializer));
28
29
  }
29
30
  }
30
31
  //# 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,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"]}
1
+ {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPTraceExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAEL,gBAAgB,GACjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EACL,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,6CAA6C,CAAC;AAErD;;GAEG;AACH,MAAM,OAAO,iBACX,SAAQ,gBAAgC;IAGxC,YAAY,SAAqC,EAAE;QACjD,KAAK,CACH,4BAA4B,CAC1B,wBAAwB,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE;YACtD,YAAY,EAAE,iCAAiC,OAAO,EAAE;YACxD,cAAc,EAAE,kBAAkB;SACnC,CAAC,EACF,mBAAmB,CACpB,CACF,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 OTLPExporterNodeConfigBase,\n OTLPExporterBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport { VERSION } from '../../version';\nimport { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';\nimport {\n convertLegacyHttpOptions,\n createOtlpHttpExportDelegate,\n} from '@opentelemetry/otlp-exporter-base/node-http';\n\n/**\n * Collector Trace Exporter for Node\n */\nexport class OTLPTraceExporter\n extends OTLPExporterBase<ReadableSpan[]>\n implements SpanExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(\n createOtlpHttpExportDelegate(\n convertLegacyHttpOptions(config, 'TRACES', 'v1/traces', {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n 'Content-Type': 'application/json',\n }),\n JsonTraceSerializer\n )\n );\n }\n}\n"]}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
17
- * TODO: Replace export * with named exports before next major version
17
+ * TODO: Replace wildcard export with named exports before next major version
18
18
  */
19
19
  export * from './OTLPTraceExporter';
20
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;;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
+ {"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 wildcard export with named exports before next major version\n */\nexport * from './OTLPTraceExporter';\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.54.2";
1
+ export declare const VERSION = "0.56.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.54.2';
17
+ export const VERSION = '0.56.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.54.2';\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.56.0';\n"]}
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
28
  /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
29
- * TODO: Replace export * with named exports before next major version
29
+ * TODO: Replace wildcard export with named exports before next major version
30
30
  */
31
31
  __exportStar(require("./platform"), exports);
32
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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"]}
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 wildcard export with named exports before next major version\n */\nexport * from './platform';\n"]}
@@ -1,10 +1,9 @@
1
1
  import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
2
- import { OTLPExporterConfigBase, OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
3
- import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';
2
+ import { OTLPExporterConfigBase, OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
4
3
  /**
5
4
  * Collector Trace Exporter for Web
6
5
  */
7
- export declare class OTLPTraceExporter extends OTLPExporterBrowserBase<ReadableSpan, IExportTraceServiceResponse> implements SpanExporter {
6
+ export declare class OTLPTraceExporter extends OTLPExporterBase<ReadableSpan[]> implements SpanExporter {
8
7
  constructor(config?: OTLPExporterConfigBase);
9
8
  }
10
9
  //# sourceMappingURL=OTLPTraceExporter.d.ts.map
@@ -18,13 +18,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.OTLPTraceExporter = void 0;
19
19
  const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
20
20
  const otlp_transformer_1 = require("@opentelemetry/otlp-transformer");
21
- const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';
21
+ const browser_http_1 = require("@opentelemetry/otlp-exporter-base/browser-http");
22
22
  /**
23
23
  * Collector Trace Exporter for Web
24
24
  */
25
- class OTLPTraceExporter extends otlp_exporter_base_1.OTLPExporterBrowserBase {
25
+ class OTLPTraceExporter extends otlp_exporter_base_1.OTLPExporterBase {
26
26
  constructor(config = {}) {
27
- super(config, otlp_transformer_1.JsonTraceSerializer, { 'Content-Type': 'application/json' }, DEFAULT_COLLECTOR_RESOURCE_PATH);
27
+ super((0, browser_http_1.createLegacyOtlpBrowserExportDelegate)(config, otlp_transformer_1.JsonTraceSerializer, 'v1/traces', { 'Content-Type': 'application/json' }));
28
28
  }
29
29
  }
30
30
  exports.OTLPTraceExporter = OTLPTraceExporter;
@@ -1 +1 @@
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"]}
1
+ {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPTraceExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,0EAG2C;AAC3C,sEAAsE;AACtE,iFAAuG;AAEvG;;GAEG;AACH,MAAa,iBACX,SAAQ,qCAAgC;IAGxC,YAAY,SAAiC,EAAE;QAC7C,KAAK,CACH,IAAA,oDAAqC,EACnC,MAAM,EACN,sCAAmB,EACnB,WAAW,EACX,EAAE,cAAc,EAAE,kBAAkB,EAAE,CACvC,CACF,CAAC;IACJ,CAAC;CACF;AAdD,8CAcC","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 OTLPExporterBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';\nimport { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http';\n\n/**\n * Collector Trace Exporter for Web\n */\nexport class OTLPTraceExporter\n extends OTLPExporterBase<ReadableSpan[]>\n implements SpanExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(\n createLegacyOtlpBrowserExportDelegate(\n config,\n JsonTraceSerializer,\n 'v1/traces',\n { 'Content-Type': 'application/json' }\n )\n );\n }\n}\n"]}
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
28
  /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
29
- * TODO: Replace export * with named exports before next major version
29
+ * TODO: Replace wildcard export with named exports before next major version
30
30
  */
31
31
  __exportStar(require("./OTLPTraceExporter"), exports);
32
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;;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
+ {"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 wildcard export with named exports before next major version\n */\nexport * from './OTLPTraceExporter';\n"]}
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
28
  /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
29
- * TODO: Replace export * with named exports before next major version
29
+ * TODO: Replace wildcard export with named exports before next major version
30
30
  */
31
31
  __exportStar(require("./node"), exports);
32
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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"]}
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 wildcard export with named exports before next major version\n */\nexport * from './node';\n"]}
@@ -1,11 +1,9 @@
1
1
  import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
2
- import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
3
- import { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';
4
- import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer';
2
+ import { OTLPExporterNodeConfigBase, OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
5
3
  /**
6
4
  * Collector Trace Exporter for Node
7
5
  */
8
- export declare class OTLPTraceExporter extends OTLPExporterNodeBase<ReadableSpan, IExportTraceServiceResponse> implements SpanExporter {
6
+ export declare class OTLPTraceExporter extends OTLPExporterBase<ReadableSpan[]> implements SpanExporter {
9
7
  constructor(config?: OTLPExporterNodeConfigBase);
10
8
  }
11
9
  //# sourceMappingURL=OTLPTraceExporter.d.ts.map
@@ -19,15 +19,16 @@ exports.OTLPTraceExporter = void 0;
19
19
  const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
20
20
  const version_1 = require("../../version");
21
21
  const otlp_transformer_1 = require("@opentelemetry/otlp-transformer");
22
- const USER_AGENT = {
23
- 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${version_1.VERSION}`,
24
- };
22
+ const node_http_1 = require("@opentelemetry/otlp-exporter-base/node-http");
25
23
  /**
26
24
  * Collector Trace Exporter for Node
27
25
  */
28
- class OTLPTraceExporter extends otlp_exporter_base_1.OTLPExporterNodeBase {
26
+ class OTLPTraceExporter extends otlp_exporter_base_1.OTLPExporterBase {
29
27
  constructor(config = {}) {
30
- super(config, otlp_transformer_1.JsonTraceSerializer, Object.assign(Object.assign({}, USER_AGENT), { 'Content-Type': 'application/json' }), 'TRACES', 'v1/traces');
28
+ super((0, node_http_1.createOtlpHttpExportDelegate)((0, node_http_1.convertLegacyHttpOptions)(config, 'TRACES', 'v1/traces', {
29
+ 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${version_1.VERSION}`,
30
+ 'Content-Type': 'application/json',
31
+ }), otlp_transformer_1.JsonTraceSerializer));
31
32
  }
32
33
  }
33
34
  exports.OTLPTraceExporter = OTLPTraceExporter;
@@ -1 +1 @@
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"]}
1
+ {"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPTraceExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,0EAG2C;AAC3C,2CAAwC;AACxC,sEAAsE;AACtE,2EAGqD;AAErD;;GAEG;AACH,MAAa,iBACX,SAAQ,qCAAgC;IAGxC,YAAY,SAAqC,EAAE;QACjD,KAAK,CACH,IAAA,wCAA4B,EAC1B,IAAA,oCAAwB,EAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE;YACtD,YAAY,EAAE,iCAAiC,iBAAO,EAAE;YACxD,cAAc,EAAE,kBAAkB;SACnC,CAAC,EACF,sCAAmB,CACpB,CACF,CAAC;IACJ,CAAC;CACF;AAfD,8CAeC","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 OTLPExporterNodeConfigBase,\n OTLPExporterBase,\n} from '@opentelemetry/otlp-exporter-base';\nimport { VERSION } from '../../version';\nimport { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';\nimport {\n convertLegacyHttpOptions,\n createOtlpHttpExportDelegate,\n} from '@opentelemetry/otlp-exporter-base/node-http';\n\n/**\n * Collector Trace Exporter for Node\n */\nexport class OTLPTraceExporter\n extends OTLPExporterBase<ReadableSpan[]>\n implements SpanExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(\n createOtlpHttpExportDelegate(\n convertLegacyHttpOptions(config, 'TRACES', 'v1/traces', {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n 'Content-Type': 'application/json',\n }),\n JsonTraceSerializer\n )\n );\n }\n}\n"]}
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
28
  /* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
29
- * TODO: Replace export * with named exports before next major version
29
+ * TODO: Replace wildcard export with named exports before next major version
30
30
  */
31
31
  __exportStar(require("./OTLPTraceExporter"), exports);
32
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;;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
+ {"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 wildcard export with named exports before next major version\n */\nexport * from './OTLPTraceExporter';\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.54.2";
1
+ export declare const VERSION = "0.56.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.54.2';
20
+ exports.VERSION = '0.56.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.54.2';\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.56.0';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/exporter-trace-otlp-http",
3
- "version": "0.54.2",
3
+ "version": "0.56.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",
@@ -62,10 +62,10 @@
62
62
  "access": "public"
63
63
  },
64
64
  "devDependencies": {
65
- "@babel/core": "7.25.2",
66
- "@babel/preset-env": "7.25.4",
65
+ "@babel/core": "7.26.0",
66
+ "@babel/preset-env": "7.26.0",
67
67
  "@opentelemetry/api": "1.9.0",
68
- "@types/mocha": "10.0.8",
68
+ "@types/mocha": "10.0.10",
69
69
  "@types/node": "18.6.5",
70
70
  "@types/sinon": "17.0.3",
71
71
  "@types/webpack-env": "1.16.3",
@@ -79,12 +79,12 @@
79
79
  "karma-spec-reporter": "0.0.36",
80
80
  "karma-webpack": "5.0.1",
81
81
  "lerna": "6.6.2",
82
- "mocha": "10.7.3",
82
+ "mocha": "10.8.2",
83
83
  "nyc": "15.1.0",
84
84
  "sinon": "15.1.2",
85
85
  "ts-loader": "9.5.1",
86
86
  "typescript": "4.4.4",
87
- "webpack": "5.94.0",
87
+ "webpack": "5.96.1",
88
88
  "webpack-cli": "5.1.4",
89
89
  "webpack-merge": "5.10.0"
90
90
  },
@@ -92,13 +92,13 @@
92
92
  "@opentelemetry/api": "^1.3.0"
93
93
  },
94
94
  "dependencies": {
95
- "@opentelemetry/core": "1.27.0",
96
- "@opentelemetry/otlp-exporter-base": "0.54.2",
97
- "@opentelemetry/otlp-transformer": "0.54.2",
98
- "@opentelemetry/resources": "1.27.0",
99
- "@opentelemetry/sdk-trace-base": "1.27.0"
95
+ "@opentelemetry/core": "1.29.0",
96
+ "@opentelemetry/otlp-exporter-base": "0.56.0",
97
+ "@opentelemetry/otlp-transformer": "0.56.0",
98
+ "@opentelemetry/resources": "1.29.0",
99
+ "@opentelemetry/sdk-trace-base": "1.29.0"
100
100
  },
101
101
  "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-http",
102
102
  "sideEffects": false,
103
- "gitHead": "72c9af91983e4b7aade98c901bd45c6cefee0da4"
103
+ "gitHead": "85dcbc7c55f002837f1bf1bf01145dbb34a55b40"
104
104
  }