@opentelemetry/exporter-trace-otlp-http 0.27.0 → 0.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -21
- package/build/esm/index.d.ts +0 -4
- package/build/esm/index.js +0 -5
- package/build/esm/index.js.map +1 -1
- package/build/esm/platform/browser/OTLPTraceExporter.d.ts +4 -5
- package/build/esm/platform/browser/OTLPTraceExporter.js +7 -8
- package/build/esm/platform/browser/OTLPTraceExporter.js.map +1 -1
- package/build/esm/platform/browser/index.d.ts +0 -1
- package/build/esm/platform/browser/index.js +0 -1
- package/build/esm/platform/browser/index.js.map +1 -1
- package/build/esm/platform/index.d.ts +0 -1
- package/build/esm/platform/index.js +0 -1
- package/build/esm/platform/index.js.map +1 -1
- package/build/esm/platform/node/OTLPTraceExporter.d.ts +5 -5
- package/build/esm/platform/node/OTLPTraceExporter.js +8 -8
- package/build/esm/platform/node/OTLPTraceExporter.js.map +1 -1
- package/build/esm/platform/node/index.d.ts +0 -3
- package/build/esm/platform/node/index.js +0 -3
- package/build/esm/platform/node/index.js.map +1 -1
- package/build/esm/version.d.ts +1 -1
- package/build/esm/version.js +1 -1
- package/build/esm/version.js.map +1 -1
- package/build/esnext/index.d.ts +2 -0
- package/build/esnext/index.js +17 -0
- package/build/esnext/index.js.map +1 -0
- package/build/esnext/platform/browser/OTLPTraceExporter.d.ts +12 -0
- package/build/esnext/platform/browser/OTLPTraceExporter.js +42 -0
- package/build/esnext/platform/browser/OTLPTraceExporter.js.map +1 -0
- package/build/esnext/platform/browser/index.d.ts +2 -0
- package/build/esnext/platform/browser/index.js +17 -0
- package/build/esnext/platform/browser/index.js.map +1 -0
- package/build/esnext/platform/index.d.ts +2 -0
- package/build/esnext/platform/index.js +17 -0
- package/build/esnext/platform/index.js.map +1 -0
- package/build/esnext/platform/node/OTLPTraceExporter.d.ts +13 -0
- package/build/esnext/platform/node/OTLPTraceExporter.js +43 -0
- package/build/esnext/platform/node/OTLPTraceExporter.js.map +1 -0
- package/build/esnext/platform/node/index.d.ts +2 -0
- package/build/esnext/platform/node/index.js +17 -0
- package/build/esnext/platform/node/index.js.map +1 -0
- package/build/esnext/version.d.ts +2 -0
- package/build/esnext/version.js +18 -0
- package/build/esnext/version.js.map +1 -0
- package/build/src/index.d.ts +0 -4
- package/build/src/index.js +0 -8
- package/build/src/index.js.map +1 -1
- package/build/src/platform/browser/OTLPTraceExporter.d.ts +4 -5
- package/build/src/platform/browser/OTLPTraceExporter.js +11 -12
- package/build/src/platform/browser/OTLPTraceExporter.js.map +1 -1
- package/build/src/platform/browser/index.d.ts +0 -1
- package/build/src/platform/browser/index.js +0 -1
- package/build/src/platform/browser/index.js.map +1 -1
- package/build/src/platform/index.d.ts +0 -1
- package/build/src/platform/index.js +0 -3
- package/build/src/platform/index.js.map +1 -1
- package/build/src/platform/node/OTLPTraceExporter.d.ts +5 -5
- package/build/src/platform/node/OTLPTraceExporter.js +12 -12
- package/build/src/platform/node/OTLPTraceExporter.js.map +1 -1
- package/build/src/platform/node/index.d.ts +0 -3
- package/build/src/platform/node/index.js +0 -3
- package/build/src/platform/node/index.js.map +1 -1
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +1 -1
- package/build/src/version.js.map +1 -1
- package/package.json +32 -22
- package/build/esm/OTLPExporterBase.d.ts +0 -36
- package/build/esm/OTLPExporterBase.js +0 -114
- package/build/esm/OTLPExporterBase.js.map +0 -1
- package/build/esm/platform/browser/OTLPExporterBrowserBase.d.ts +0 -18
- package/build/esm/platform/browser/OTLPExporterBrowserBase.js +0 -91
- package/build/esm/platform/browser/OTLPExporterBrowserBase.js.map +0 -1
- package/build/esm/platform/browser/util.d.ts +0 -17
- package/build/esm/platform/browser/util.js +0 -77
- package/build/esm/platform/browser/util.js.map +0 -1
- package/build/esm/platform/node/OTLPExporterNodeBase.d.ts +0 -20
- package/build/esm/platform/node/OTLPExporterNodeBase.js +0 -82
- package/build/esm/platform/node/OTLPExporterNodeBase.js.map +0 -1
- package/build/esm/platform/node/types.d.ts +0 -17
- package/build/esm/platform/node/types.js +0 -6
- package/build/esm/platform/node/types.js.map +0 -1
- package/build/esm/platform/node/util.d.ts +0 -17
- package/build/esm/platform/node/util.js +0 -113
- package/build/esm/platform/node/util.js.map +0 -1
- package/build/esm/transform.d.ts +0 -80
- package/build/esm/transform.js +0 -271
- package/build/esm/transform.js.map +0 -1
- package/build/esm/types.d.ts +0 -241
- package/build/esm/types.js +0 -176
- package/build/esm/types.js.map +0 -1
- package/build/esm/util.d.ts +0 -7
- package/build/esm/util.js +0 -40
- package/build/esm/util.js.map +0 -1
- package/build/src/OTLPExporterBase.d.ts +0 -36
- package/build/src/OTLPExporterBase.js +0 -113
- package/build/src/OTLPExporterBase.js.map +0 -1
- package/build/src/platform/browser/OTLPExporterBrowserBase.d.ts +0 -18
- package/build/src/platform/browser/OTLPExporterBrowserBase.js +0 -74
- package/build/src/platform/browser/OTLPExporterBrowserBase.js.map +0 -1
- package/build/src/platform/browser/util.d.ts +0 -17
- package/build/src/platform/browser/util.js +0 -70
- package/build/src/platform/browser/util.js.map +0 -1
- package/build/src/platform/node/OTLPExporterNodeBase.d.ts +0 -20
- package/build/src/platform/node/OTLPExporterNodeBase.js +0 -65
- package/build/src/platform/node/OTLPExporterNodeBase.js.map +0 -1
- package/build/src/platform/node/types.d.ts +0 -17
- package/build/src/platform/node/types.js +0 -9
- package/build/src/platform/node/types.js.map +0 -1
- package/build/src/platform/node/util.d.ts +0 -17
- package/build/src/platform/node/util.js +0 -107
- package/build/src/platform/node/util.js.map +0 -1
- package/build/src/transform.d.ts +0 -80
- package/build/src/transform.js +0 -282
- package/build/src/transform.js.map +0 -1
- package/build/src/types.d.ts +0 -241
- package/build/src/types.js +0 -160
- package/build/src/types.js.map +0 -1
- package/build/src/util.d.ts +0 -7
- package/build/src/util.js +0 -43
- package/build/src/util.js.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright The OpenTelemetry Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { getEnv, baggageUtils } from '@opentelemetry/core';
|
|
17
|
+
import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
|
|
18
|
+
import { appendResourcePathToUrl, appendRootPathToUrlIfNeeded } from '@opentelemetry/otlp-exporter-base';
|
|
19
|
+
import { createExportTraceServiceRequest } from '@opentelemetry/otlp-transformer';
|
|
20
|
+
const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';
|
|
21
|
+
const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
|
|
22
|
+
/**
|
|
23
|
+
* Collector Trace Exporter for Node
|
|
24
|
+
*/
|
|
25
|
+
export class OTLPTraceExporter extends OTLPExporterNodeBase {
|
|
26
|
+
constructor(config = {}) {
|
|
27
|
+
super(config);
|
|
28
|
+
this.headers = Object.assign(this.headers, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS));
|
|
29
|
+
}
|
|
30
|
+
convert(spans) {
|
|
31
|
+
return createExportTraceServiceRequest(spans, true);
|
|
32
|
+
}
|
|
33
|
+
getDefaultUrl(config) {
|
|
34
|
+
return typeof config.url === 'string'
|
|
35
|
+
? config.url
|
|
36
|
+
: getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
|
|
37
|
+
? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
|
|
38
|
+
: getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
|
|
39
|
+
? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
|
|
40
|
+
: DEFAULT_COLLECTOR_URL;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=OTLPTraceExporter.js.map
|
|
@@ -0,0 +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,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAEL,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,+BAA+B,EAA8B,MAAM,iCAAiC,CAAC;AAE9G,MAAM,+BAA+B,GAAG,WAAW,CAAC;AACpD,MAAM,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AAEzF;;GAEG;AACH,MAAM,OAAO,iBACX,SAAQ,oBACqB;IAE7B,YAAY,SAAqC,EAAE;QACjD,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAC1B,IAAI,CAAC,OAAO,EACZ,YAAY,CAAC,uBAAuB,CAClC,MAAM,EAAE,CAAC,iCAAiC,CAC3C,CACF,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,KAAqB;QAC3B,OAAO,+BAA+B,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACtD,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;gBACtD,CAAC,CAAC,2BAA2B,CAAC,MAAM,EAAE,CAAC,kCAAkC,EAAE,+BAA+B,CAAC;gBAC3G,CAAC,CAAC,MAAM,EAAE,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC;oBAC/C,CAAC,CAAC,uBAAuB,CAAC,MAAM,EAAE,CAAC,2BAA2B,EAAE,+BAA+B,CAAC;oBAChG,CAAC,CAAC,qBAAqB,CAAC;IAChC,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 { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';\nimport {\n OTLPExporterNodeConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded\n} from '@opentelemetry/otlp-exporter-base';\nimport { createExportTraceServiceRequest, IExportTraceServiceRequest } 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 Node\n */\nexport class OTLPTraceExporter\n extends OTLPExporterNodeBase<ReadableSpan,\n IExportTraceServiceRequest>\n implements SpanExporter {\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(config);\n this.headers = Object.assign(\n this.headers,\n baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS\n )\n );\n }\n\n convert(spans: ReadableSpan[]): IExportTraceServiceRequest {\n return createExportTraceServiceRequest(spans, true);\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, DEFAULT_COLLECTOR_RESOURCE_PATH)\n : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)\n : DEFAULT_COLLECTOR_URL;\n }\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright The OpenTelemetry Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export * from './OTLPTraceExporter';
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright The OpenTelemetry Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
// this is autogenerated file, see scripts/version-update.js
|
|
17
|
+
export const VERSION = '0.29.1';
|
|
18
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +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.29.1';\n"]}
|
package/build/src/index.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export * from './OTLPExporterBase';
|
|
2
1
|
export * from './platform';
|
|
3
|
-
export * as otlpTypes from './types';
|
|
4
|
-
export { toCollectorResource, toOTLPExportTraceServiceRequest } from './transform';
|
|
5
|
-
export { appendResourcePathToUrlIfNotPresent } from './util';
|
|
6
2
|
//# sourceMappingURL=index.d.ts.map
|
package/build/src/index.js
CHANGED
|
@@ -25,13 +25,5 @@ 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
|
-
exports.appendResourcePathToUrlIfNotPresent = exports.toOTLPExportTraceServiceRequest = exports.toCollectorResource = exports.otlpTypes = void 0;
|
|
29
|
-
__exportStar(require("./OTLPExporterBase"), exports);
|
|
30
28
|
__exportStar(require("./platform"), exports);
|
|
31
|
-
exports.otlpTypes = require("./types");
|
|
32
|
-
var transform_1 = require("./transform");
|
|
33
|
-
Object.defineProperty(exports, "toCollectorResource", { enumerable: true, get: function () { return transform_1.toCollectorResource; } });
|
|
34
|
-
Object.defineProperty(exports, "toOTLPExportTraceServiceRequest", { enumerable: true, get: function () { return transform_1.toOTLPExportTraceServiceRequest; } });
|
|
35
|
-
var util_1 = require("./util");
|
|
36
|
-
Object.defineProperty(exports, "appendResourcePathToUrlIfNotPresent", { enumerable: true, get: function () { return util_1.appendResourcePathToUrlIfNotPresent; } });
|
|
37
29
|
//# sourceMappingURL=index.js.map
|
package/build/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
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,13 +1,12 @@
|
|
|
1
|
-
import { OTLPExporterConfigBase } from '../../types';
|
|
2
|
-
import { OTLPExporterBrowserBase } from './OTLPExporterBrowserBase';
|
|
3
1
|
import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
|
|
4
|
-
import
|
|
2
|
+
import { OTLPExporterConfigBase, OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
|
|
3
|
+
import { IExportTraceServiceRequest } from '@opentelemetry/otlp-transformer';
|
|
5
4
|
/**
|
|
6
5
|
* Collector Trace Exporter for Web
|
|
7
6
|
*/
|
|
8
|
-
export declare class OTLPTraceExporter extends OTLPExporterBrowserBase<ReadableSpan,
|
|
7
|
+
export declare class OTLPTraceExporter extends OTLPExporterBrowserBase<ReadableSpan, IExportTraceServiceRequest> implements SpanExporter {
|
|
9
8
|
constructor(config?: OTLPExporterConfigBase);
|
|
10
|
-
convert(spans: ReadableSpan[]):
|
|
9
|
+
convert(spans: ReadableSpan[]): IExportTraceServiceRequest;
|
|
11
10
|
getDefaultUrl(config: OTLPExporterConfigBase): string;
|
|
12
11
|
}
|
|
13
12
|
//# sourceMappingURL=OTLPTraceExporter.d.ts.map
|
|
@@ -16,30 +16,29 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.OTLPTraceExporter = void 0;
|
|
19
|
-
const OTLPExporterBrowserBase_1 = require("./OTLPExporterBrowserBase");
|
|
20
|
-
const transform_1 = require("../../transform");
|
|
21
19
|
const core_1 = require("@opentelemetry/core");
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
20
|
+
const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
|
|
21
|
+
const otlp_transformer_1 = require("@opentelemetry/otlp-transformer");
|
|
22
|
+
const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';
|
|
23
|
+
const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
|
|
25
24
|
/**
|
|
26
25
|
* Collector Trace Exporter for Web
|
|
27
26
|
*/
|
|
28
|
-
class OTLPTraceExporter extends
|
|
27
|
+
class OTLPTraceExporter extends otlp_exporter_base_1.OTLPExporterBrowserBase {
|
|
29
28
|
constructor(config = {}) {
|
|
30
29
|
super(config);
|
|
31
|
-
this._headers = Object.assign(this._headers, core_1.baggageUtils.parseKeyPairsIntoRecord(core_1.getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS));
|
|
30
|
+
this._headers = Object.assign(this._headers, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS));
|
|
32
31
|
}
|
|
33
32
|
convert(spans) {
|
|
34
|
-
return
|
|
33
|
+
return (0, otlp_transformer_1.createExportTraceServiceRequest)(spans, true);
|
|
35
34
|
}
|
|
36
35
|
getDefaultUrl(config) {
|
|
37
36
|
return typeof config.url === 'string'
|
|
38
37
|
? config.url
|
|
39
|
-
: core_1.getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
|
|
40
|
-
? core_1.getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
|
41
|
-
: core_1.getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
|
|
42
|
-
?
|
|
38
|
+
: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
|
|
39
|
+
? (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
|
|
40
|
+
: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
|
|
41
|
+
? (0, otlp_exporter_base_1.appendResourcePathToUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
|
|
43
42
|
: DEFAULT_COLLECTOR_URL;
|
|
44
43
|
}
|
|
45
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPTraceExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPTraceExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,8CAA2D;AAC3D,0EAK2C;AAC3C,sEAA8G;AAE9G,MAAM,+BAA+B,GAAG,WAAW,CAAC;AACpD,MAAM,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AAEzF;;GAEG;AACH,MAAa,iBACX,SAAQ,4CAGP;IAED,YAAY,SAAiC,EAAE;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,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;IACD,OAAO,CAAC,KAAqB;QAC3B,OAAO,IAAA,kDAA+B,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACtD,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;gBACtD,CAAC,CAAC,IAAA,gDAA2B,EAAC,IAAA,aAAM,GAAE,CAAC,kCAAkC,EAAE,+BAA+B,CAAC;gBAC3G,CAAC,CAAC,IAAA,aAAM,GAAE,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC;oBAC/C,CAAC,CAAC,IAAA,4CAAuB,EAAC,IAAA,aAAM,GAAE,CAAC,2BAA2B,EAAE,+BAA+B,CAAC;oBAChG,CAAC,CAAC,qBAAqB,CAAC;IAChC,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 OTLPExporterConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\n OTLPExporterBrowserBase\n} from '@opentelemetry/otlp-exporter-base';\nimport { createExportTraceServiceRequest, IExportTraceServiceRequest } 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<\n ReadableSpan,\n IExportTraceServiceRequest\n >\n implements SpanExporter {\n constructor(config: OTLPExporterConfigBase = {}) {\n super(config);\n this._headers = Object.assign(\n this._headers,\n baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS\n )\n );\n }\n convert(spans: ReadableSpan[]): IExportTraceServiceRequest {\n return createExportTraceServiceRequest(spans, true);\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, DEFAULT_COLLECTOR_RESOURCE_PATH)\n : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)\n : DEFAULT_COLLECTOR_URL;\n }\n}\n"]}
|
|
@@ -26,5 +26,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
__exportStar(require("./OTLPTraceExporter"), exports);
|
|
29
|
-
__exportStar(require("./OTLPExporterBrowserBase"), exports);
|
|
30
29
|
//# 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
|
|
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"]}
|
|
@@ -25,8 +25,5 @@ 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
|
-
exports.OTLPExporterBrowserBase = void 0;
|
|
29
28
|
__exportStar(require("./node"), exports);
|
|
30
|
-
var browser_1 = require("./browser");
|
|
31
|
-
Object.defineProperty(exports, "OTLPExporterBrowserBase", { enumerable: true, get: function () { return browser_1.OTLPExporterBrowserBase; } });
|
|
32
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
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,13 +1,13 @@
|
|
|
1
1
|
import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
|
|
2
|
-
import { OTLPExporterNodeBase } from '
|
|
3
|
-
import { OTLPExporterNodeConfigBase } from '
|
|
4
|
-
import
|
|
2
|
+
import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
|
|
3
|
+
import { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
4
|
+
import { IExportTraceServiceRequest } from '@opentelemetry/otlp-transformer';
|
|
5
5
|
/**
|
|
6
6
|
* Collector Trace Exporter for Node
|
|
7
7
|
*/
|
|
8
|
-
export declare class OTLPTraceExporter extends OTLPExporterNodeBase<ReadableSpan,
|
|
8
|
+
export declare class OTLPTraceExporter extends OTLPExporterNodeBase<ReadableSpan, IExportTraceServiceRequest> implements SpanExporter {
|
|
9
9
|
constructor(config?: OTLPExporterNodeConfigBase);
|
|
10
|
-
convert(spans: ReadableSpan[]):
|
|
10
|
+
convert(spans: ReadableSpan[]): IExportTraceServiceRequest;
|
|
11
11
|
getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=OTLPTraceExporter.d.ts.map
|
|
@@ -16,30 +16,30 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.OTLPTraceExporter = void 0;
|
|
19
|
-
const OTLPExporterNodeBase_1 = require("./OTLPExporterNodeBase");
|
|
20
|
-
const transform_1 = require("../../transform");
|
|
21
19
|
const core_1 = require("@opentelemetry/core");
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
20
|
+
const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
|
|
21
|
+
const otlp_exporter_base_2 = require("@opentelemetry/otlp-exporter-base");
|
|
22
|
+
const otlp_transformer_1 = require("@opentelemetry/otlp-transformer");
|
|
23
|
+
const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';
|
|
24
|
+
const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
|
|
25
25
|
/**
|
|
26
26
|
* Collector Trace Exporter for Node
|
|
27
27
|
*/
|
|
28
|
-
class OTLPTraceExporter extends
|
|
28
|
+
class OTLPTraceExporter extends otlp_exporter_base_1.OTLPExporterNodeBase {
|
|
29
29
|
constructor(config = {}) {
|
|
30
30
|
super(config);
|
|
31
|
-
this.headers = Object.assign(this.headers, core_1.baggageUtils.parseKeyPairsIntoRecord(core_1.getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS));
|
|
31
|
+
this.headers = Object.assign(this.headers, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS));
|
|
32
32
|
}
|
|
33
33
|
convert(spans) {
|
|
34
|
-
return
|
|
34
|
+
return (0, otlp_transformer_1.createExportTraceServiceRequest)(spans, true);
|
|
35
35
|
}
|
|
36
36
|
getDefaultUrl(config) {
|
|
37
37
|
return typeof config.url === 'string'
|
|
38
38
|
? config.url
|
|
39
|
-
: core_1.getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
|
|
40
|
-
? core_1.getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
|
|
41
|
-
: core_1.getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
|
|
42
|
-
?
|
|
39
|
+
: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0
|
|
40
|
+
? (0, otlp_exporter_base_2.appendRootPathToUrlIfNeeded)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
|
|
41
|
+
: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0
|
|
42
|
+
? (0, otlp_exporter_base_2.appendResourcePathToUrl)((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)
|
|
43
43
|
: DEFAULT_COLLECTOR_URL;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPTraceExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"OTLPTraceExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPTraceExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,8CAA2D;AAC3D,0EAAyE;AACzE,0EAI2C;AAC3C,sEAA8G;AAE9G,MAAM,+BAA+B,GAAG,WAAW,CAAC;AACpD,MAAM,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AAEzF;;GAEG;AACH,MAAa,iBACX,SAAQ,yCACqB;IAE7B,YAAY,SAAqC,EAAE;QACjD,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAC1B,IAAI,CAAC,OAAO,EACZ,mBAAY,CAAC,uBAAuB,CAClC,IAAA,aAAM,GAAE,CAAC,iCAAiC,CAC3C,CACF,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,KAAqB;QAC3B,OAAO,IAAA,kDAA+B,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACtD,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;gBACtD,CAAC,CAAC,IAAA,gDAA2B,EAAC,IAAA,aAAM,GAAE,CAAC,kCAAkC,EAAE,+BAA+B,CAAC;gBAC3G,CAAC,CAAC,IAAA,aAAM,GAAE,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC;oBAC/C,CAAC,CAAC,IAAA,4CAAuB,EAAC,IAAA,aAAM,GAAE,CAAC,2BAA2B,EAAE,+BAA+B,CAAC;oBAChG,CAAC,CAAC,qBAAqB,CAAC;IAChC,CAAC;CACF;AA3BD,8CA2BC","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 { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';\nimport {\n OTLPExporterNodeConfigBase,\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded\n} from '@opentelemetry/otlp-exporter-base';\nimport { createExportTraceServiceRequest, IExportTraceServiceRequest } 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 Node\n */\nexport class OTLPTraceExporter\n extends OTLPExporterNodeBase<ReadableSpan,\n IExportTraceServiceRequest>\n implements SpanExporter {\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(config);\n this.headers = Object.assign(\n this.headers,\n baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS\n )\n );\n }\n\n convert(spans: ReadableSpan[]): IExportTraceServiceRequest {\n return createExportTraceServiceRequest(spans, true);\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, DEFAULT_COLLECTOR_RESOURCE_PATH)\n : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)\n : DEFAULT_COLLECTOR_URL;\n }\n}\n"]}
|
|
@@ -26,7 +26,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
__exportStar(require("./OTLPTraceExporter"), exports);
|
|
29
|
-
__exportStar(require("./OTLPExporterNodeBase"), exports);
|
|
30
|
-
__exportStar(require("./util"), exports);
|
|
31
|
-
__exportStar(require("./types"), exports);
|
|
32
29
|
//# 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
|
|
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"]}
|
package/build/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.29.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/src/version.js
CHANGED
package/build/src/version.js.map
CHANGED
|
@@ -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.
|
|
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.29.1';\n"]}
|
package/package.json
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/exporter-trace-otlp-http",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.1",
|
|
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",
|
|
7
|
+
"esnext": "build/esnext/index.js",
|
|
7
8
|
"types": "build/src/index.d.ts",
|
|
8
9
|
"repository": "open-telemetry/opentelemetry-js",
|
|
9
10
|
"browser": {
|
|
10
11
|
"./src/platform/index.ts": "./src/platform/browser/index.ts",
|
|
11
12
|
"./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
|
|
13
|
+
"./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js",
|
|
12
14
|
"./build/src/platform/index.js": "./build/src/platform/browser/index.js"
|
|
13
15
|
},
|
|
14
16
|
"scripts": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
17
|
+
"prepublishOnly": "npm run compile",
|
|
18
|
+
"compile": "tsc --build tsconfig.all.json",
|
|
19
|
+
"clean": "tsc --build --clean tsconfig.all.json",
|
|
20
|
+
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
|
|
18
21
|
"lint": "eslint . --ext .ts",
|
|
19
22
|
"lint:fix": "eslint . --ext .ts --fix",
|
|
20
23
|
"tdd": "npm run test -- --watch-extensions ts --watch",
|
|
@@ -22,9 +25,11 @@
|
|
|
22
25
|
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
|
|
23
26
|
"test:browser": "nyc karma start --single-run",
|
|
24
27
|
"version": "node ../../../scripts/version-update.js",
|
|
25
|
-
"watch": "tsc --build --watch tsconfig.
|
|
26
|
-
"precompile": "lerna run version --scope $(npm pkg get name) --include-
|
|
27
|
-
"prewatch": "npm run precompile"
|
|
28
|
+
"watch": "tsc --build --watch tsconfig.all.json",
|
|
29
|
+
"precompile": "lerna run version --scope $(npm pkg get name) --include-dependencies",
|
|
30
|
+
"prewatch": "npm run precompile",
|
|
31
|
+
"peer-api-check": "node ../../../scripts/peer-api-check.js",
|
|
32
|
+
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../"
|
|
28
33
|
},
|
|
29
34
|
"keywords": [
|
|
30
35
|
"opentelemetry",
|
|
@@ -38,12 +43,15 @@
|
|
|
38
43
|
"author": "OpenTelemetry Authors",
|
|
39
44
|
"license": "Apache-2.0",
|
|
40
45
|
"engines": {
|
|
41
|
-
"node": ">=8.
|
|
46
|
+
"node": ">=8.12.0"
|
|
42
47
|
},
|
|
43
48
|
"files": [
|
|
44
49
|
"build/esm/**/*.js",
|
|
45
50
|
"build/esm/**/*.js.map",
|
|
46
51
|
"build/esm/**/*.d.ts",
|
|
52
|
+
"build/esnext/**/*.js",
|
|
53
|
+
"build/esnext/**/*.js.map",
|
|
54
|
+
"build/esnext/**/*.d.ts",
|
|
47
55
|
"build/src/**/*.js",
|
|
48
56
|
"build/src/**/*.js.map",
|
|
49
57
|
"build/src/**/*.d.ts",
|
|
@@ -55,17 +63,17 @@
|
|
|
55
63
|
"access": "public"
|
|
56
64
|
},
|
|
57
65
|
"devDependencies": {
|
|
58
|
-
"@babel/core": "7.
|
|
59
|
-
"@opentelemetry/api": "^1.0.
|
|
66
|
+
"@babel/core": "7.16.0",
|
|
67
|
+
"@opentelemetry/api": "^1.0.0",
|
|
60
68
|
"@types/mocha": "8.2.3",
|
|
61
|
-
"@types/node": "14.17.
|
|
62
|
-
"@types/sinon": "10.0.
|
|
63
|
-
"@types/webpack-env": "1.16.
|
|
64
|
-
"babel-loader": "8.2.
|
|
69
|
+
"@types/node": "14.17.33",
|
|
70
|
+
"@types/sinon": "10.0.6",
|
|
71
|
+
"@types/webpack-env": "1.16.3",
|
|
72
|
+
"babel-loader": "8.2.3",
|
|
65
73
|
"codecov": "3.8.3",
|
|
66
74
|
"cpx": "1.5.0",
|
|
67
75
|
"istanbul-instrumenter-loader": "3.0.1",
|
|
68
|
-
"karma": "6.3.
|
|
76
|
+
"karma": "6.3.16",
|
|
69
77
|
"karma-chrome-launcher": "3.1.0",
|
|
70
78
|
"karma-coverage-istanbul-reporter": "3.0.3",
|
|
71
79
|
"karma-mocha": "2.0.1",
|
|
@@ -76,19 +84,21 @@
|
|
|
76
84
|
"rimraf": "3.0.2",
|
|
77
85
|
"sinon": "12.0.1",
|
|
78
86
|
"ts-loader": "8.3.0",
|
|
79
|
-
"ts-mocha": "
|
|
80
|
-
"typescript": "4.
|
|
87
|
+
"ts-mocha": "9.0.2",
|
|
88
|
+
"typescript": "4.4.4",
|
|
81
89
|
"webpack": "4.46.0",
|
|
82
|
-
"webpack-cli": "4.
|
|
90
|
+
"webpack-cli": "4.9.1",
|
|
83
91
|
"webpack-merge": "5.8.0"
|
|
84
92
|
},
|
|
85
93
|
"peerDependencies": {
|
|
86
94
|
"@opentelemetry/api": "^1.0.0"
|
|
87
95
|
},
|
|
88
96
|
"dependencies": {
|
|
89
|
-
"@opentelemetry/core": "1.0
|
|
90
|
-
"@opentelemetry/
|
|
91
|
-
"@opentelemetry/
|
|
97
|
+
"@opentelemetry/core": "1.3.0",
|
|
98
|
+
"@opentelemetry/otlp-exporter-base": "0.29.1",
|
|
99
|
+
"@opentelemetry/otlp-transformer": "0.29.1",
|
|
100
|
+
"@opentelemetry/resources": "1.3.0",
|
|
101
|
+
"@opentelemetry/sdk-trace-base": "1.3.0"
|
|
92
102
|
},
|
|
93
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "094f016ac6697fc45ba5d7b5765f5c3e56f18d1e"
|
|
94
104
|
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { SpanAttributes } from '@opentelemetry/api';
|
|
2
|
-
import { ExportResult } from '@opentelemetry/core';
|
|
3
|
-
import { OTLPExporterError, OTLPExporterConfigBase } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Collector Exporter abstract base class
|
|
6
|
-
*/
|
|
7
|
-
export declare abstract class OTLPExporterBase<T extends OTLPExporterConfigBase, ExportItem, ServiceRequest> {
|
|
8
|
-
readonly url: string;
|
|
9
|
-
readonly hostname: string | undefined;
|
|
10
|
-
readonly attributes?: SpanAttributes;
|
|
11
|
-
protected _concurrencyLimit: number;
|
|
12
|
-
protected _isShutdown: boolean;
|
|
13
|
-
private _shuttingDownPromise;
|
|
14
|
-
protected _sendingPromises: Promise<unknown>[];
|
|
15
|
-
/**
|
|
16
|
-
* @param config
|
|
17
|
-
*/
|
|
18
|
-
constructor(config?: T);
|
|
19
|
-
/**
|
|
20
|
-
* Export items.
|
|
21
|
-
* @param items
|
|
22
|
-
* @param resultCallback
|
|
23
|
-
*/
|
|
24
|
-
export(items: ExportItem[], resultCallback: (result: ExportResult) => void): void;
|
|
25
|
-
private _export;
|
|
26
|
-
/**
|
|
27
|
-
* Shutdown the exporter.
|
|
28
|
-
*/
|
|
29
|
-
shutdown(): Promise<void>;
|
|
30
|
-
abstract onShutdown(): void;
|
|
31
|
-
abstract onInit(config: T): void;
|
|
32
|
-
abstract send(items: ExportItem[], onSuccess: () => void, onError: (error: OTLPExporterError) => void): void;
|
|
33
|
-
abstract getDefaultUrl(config: T): string;
|
|
34
|
-
abstract convert(objects: ExportItem[]): ServiceRequest;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=OTLPExporterBase.d.ts.map
|