@opentelemetry/exporter-logs-otlp-http 0.53.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/esm/platform/browser/OTLPLogExporter.d.ts +0 -1
- package/build/esm/platform/browser/OTLPLogExporter.js +3 -5
- package/build/esm/platform/browser/OTLPLogExporter.js.map +1 -1
- package/build/esm/platform/node/OTLPLogExporter.d.ts +0 -1
- package/build/esm/platform/node/OTLPLogExporter.js +2 -8
- package/build/esm/platform/node/OTLPLogExporter.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/platform/browser/OTLPLogExporter.d.ts +0 -1
- package/build/esnext/platform/browser/OTLPLogExporter.js +3 -5
- package/build/esnext/platform/browser/OTLPLogExporter.js.map +1 -1
- package/build/esnext/platform/node/OTLPLogExporter.d.ts +0 -1
- package/build/esnext/platform/node/OTLPLogExporter.js +2 -8
- package/build/esnext/platform/node/OTLPLogExporter.js.map +1 -1
- package/build/esnext/version.d.ts +1 -1
- package/build/esnext/version.js +1 -1
- package/build/esnext/version.js.map +1 -1
- package/build/src/platform/browser/OTLPLogExporter.d.ts +0 -1
- package/build/src/platform/browser/OTLPLogExporter.js +3 -5
- package/build/src/platform/browser/OTLPLogExporter.js.map +1 -1
- package/build/src/platform/node/OTLPLogExporter.d.ts +0 -1
- package/build/src/platform/node/OTLPLogExporter.js +1 -7
- package/build/src/platform/node/OTLPLogExporter.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 +13 -16
- package/build/esm/platform/config.d.ts +0 -9
- package/build/esm/platform/config.js +0 -38
- package/build/esm/platform/config.js.map +0 -1
- package/build/esnext/platform/config.d.ts +0 -9
- package/build/esnext/platform/config.js +0 -38
- package/build/esnext/platform/config.js.map +0 -1
- package/build/src/platform/config.d.ts +0 -9
- package/build/src/platform/config.js +0 -42
- package/build/src/platform/config.js.map +0 -1
|
@@ -7,6 +7,5 @@ import { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class OTLPLogExporter extends OTLPExporterBrowserBase<ReadableLogRecord, IExportLogsServiceResponse> implements LogRecordExporter {
|
|
9
9
|
constructor(config?: OTLPExporterConfigBase);
|
|
10
|
-
getDefaultUrl(config: OTLPExporterConfigBase): string;
|
|
11
10
|
}
|
|
12
11
|
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -41,7 +41,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
41
41
|
};
|
|
42
42
|
import { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
|
|
43
43
|
import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';
|
|
44
|
-
import { getDefaultUrl } from '../config';
|
|
45
44
|
/**
|
|
46
45
|
* Collector Logs Exporter for Web
|
|
47
46
|
*/
|
|
@@ -49,11 +48,10 @@ var OTLPLogExporter = /** @class */ (function (_super) {
|
|
|
49
48
|
__extends(OTLPLogExporter, _super);
|
|
50
49
|
function OTLPLogExporter(config) {
|
|
51
50
|
if (config === void 0) { config = {}; }
|
|
52
|
-
return _super.call(this, __assign({}, config), JsonLogsSerializer,
|
|
51
|
+
return _super.call(this, __assign({}, config), JsonLogsSerializer, {
|
|
52
|
+
'Content-Type': 'application/json',
|
|
53
|
+
}, 'v1/logs') || this;
|
|
53
54
|
}
|
|
54
|
-
OTLPLogExporter.prototype.getDefaultUrl = function (config) {
|
|
55
|
-
return getDefaultUrl(config);
|
|
56
|
-
};
|
|
57
55
|
return OTLPLogExporter;
|
|
58
56
|
}(OTLPExporterBrowserBase));
|
|
59
57
|
export { OTLPLogExporter };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQH,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQH,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH;IACU,mCAAsE;IAG9E,yBAAY,MAAmC;QAAnC,uBAAA,EAAA,WAAmC;eAC7C,+BAEO,MAAM,GAEX,kBAAkB,EAClB;YACE,cAAc,EAAE,kBAAkB;SACnC,EACD,SAAS,CACV;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAhBD,CACU,uBAAuB,GAehC","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 type {\n ReadableLogRecord,\n LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport type { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer';\nimport { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';\nimport { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';\n\n/**\n * Collector Logs Exporter for Web\n */\nexport class OTLPLogExporter\n extends OTLPExporterBrowserBase<ReadableLogRecord, IExportLogsServiceResponse>\n implements LogRecordExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(\n {\n ...config,\n },\n JsonLogsSerializer,\n {\n 'Content-Type': 'application/json',\n },\n 'v1/logs'\n );\n }\n}\n"]}
|
|
@@ -7,6 +7,5 @@ import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class OTLPLogExporter extends OTLPExporterNodeBase<ReadableLogRecord, IExportLogsServiceResponse> implements LogRecordExporter {
|
|
9
9
|
constructor(config?: OTLPExporterNodeConfigBase);
|
|
10
|
-
getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
|
|
11
10
|
}
|
|
12
11
|
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -39,10 +39,8 @@ var __assign = (this && this.__assign) || function () {
|
|
|
39
39
|
};
|
|
40
40
|
return __assign.apply(this, arguments);
|
|
41
41
|
};
|
|
42
|
-
import {
|
|
43
|
-
import { OTLPExporterNodeBase, parseHeaders, } from '@opentelemetry/otlp-exporter-base';
|
|
42
|
+
import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
|
|
44
43
|
import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';
|
|
45
|
-
import { getDefaultUrl } from '../config';
|
|
46
44
|
import { VERSION } from '../../version';
|
|
47
45
|
var USER_AGENT = {
|
|
48
46
|
'User-Agent': "OTel-OTLP-Exporter-JavaScript/" + VERSION,
|
|
@@ -54,12 +52,8 @@ var OTLPLogExporter = /** @class */ (function (_super) {
|
|
|
54
52
|
__extends(OTLPLogExporter, _super);
|
|
55
53
|
function OTLPLogExporter(config) {
|
|
56
54
|
if (config === void 0) { config = {}; }
|
|
57
|
-
|
|
58
|
-
return _super.call(this, __assign({ timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config), JsonLogsSerializer, __assign(__assign(__assign(__assign({}, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers)), USER_AGENT), { 'Content-Type': 'application/json' })) || this;
|
|
55
|
+
return _super.call(this, __assign({}, config), JsonLogsSerializer, __assign(__assign({}, USER_AGENT), { 'Content-Type': 'application/json' }), 'LOGS', 'v1/logs') || this;
|
|
59
56
|
}
|
|
60
|
-
OTLPLogExporter.prototype.getDefaultUrl = function (config) {
|
|
61
|
-
return getDefaultUrl(config);
|
|
62
|
-
};
|
|
63
57
|
return OTLPLogExporter;
|
|
64
58
|
}(OTLPExporterNodeBase));
|
|
65
59
|
export { OTLPLogExporter };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,IAAM,UAAU,GAAG;IACjB,YAAY,EAAE,mCAAiC,OAAS;CACzD,CAAC;AAEF;;GAEG;AACH;IACU,mCAAmE;IAG3E,yBAAY,MAAuC;QAAvC,uBAAA,EAAA,WAAuC;eACjD,+BAEO,MAAM,GAEX,kBAAkB,wBAEb,UAAU,KACb,cAAc,EAAE,kBAAkB,KAEpC,MAAM,EACN,SAAS,CACV;IACH,CAAC;IACH,sBAAC;AAAD,CAAC,AAlBD,CACU,oBAAoB,GAiB7B","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 type {\n ReadableLogRecord,\n LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport type { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer';\nimport { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';\nimport { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';\n\nimport { VERSION } from '../../version';\n\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\n/**\n * Collector Logs Exporter for Node\n */\nexport class OTLPLogExporter\n extends OTLPExporterNodeBase<ReadableLogRecord, IExportLogsServiceResponse>\n implements LogRecordExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(\n {\n ...config,\n },\n JsonLogsSerializer,\n {\n ...USER_AGENT,\n 'Content-Type': 'application/json',\n },\n 'LOGS',\n 'v1/logs'\n );\n }\n}\n"]}
|
package/build/esm/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.54.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/esm/version.js
CHANGED
package/build/esm/version.js.map
CHANGED
|
@@ -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.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.54.0';\n"]}
|
|
@@ -7,6 +7,5 @@ import { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class OTLPLogExporter extends OTLPExporterBrowserBase<ReadableLogRecord, IExportLogsServiceResponse> implements LogRecordExporter {
|
|
9
9
|
constructor(config?: OTLPExporterConfigBase);
|
|
10
|
-
getDefaultUrl(config: OTLPExporterConfigBase): string;
|
|
11
10
|
}
|
|
12
11
|
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -15,16 +15,14 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
|
|
17
17
|
import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';
|
|
18
|
-
import { getDefaultUrl } from '../config';
|
|
19
18
|
/**
|
|
20
19
|
* Collector Logs Exporter for Web
|
|
21
20
|
*/
|
|
22
21
|
export class OTLPLogExporter extends OTLPExporterBrowserBase {
|
|
23
22
|
constructor(config = {}) {
|
|
24
|
-
super(Object.assign({}, config), JsonLogsSerializer,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return getDefaultUrl(config);
|
|
23
|
+
super(Object.assign({}, config), JsonLogsSerializer, {
|
|
24
|
+
'Content-Type': 'application/json',
|
|
25
|
+
}, 'v1/logs');
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
//# sourceMappingURL=OTLPLogExporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,OAAO,eACX,SAAQ,uBAAsE;IAG9E,YAAY,SAAiC,EAAE;QAC7C,KAAK,mBAEE,MAAM,GAEX,kBAAkB,EAClB;YACE,cAAc,EAAE,kBAAkB;SACnC,EACD,SAAS,CACV,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 type {\n ReadableLogRecord,\n LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport type { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer';\nimport { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';\nimport { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';\n\n/**\n * Collector Logs Exporter for Web\n */\nexport class OTLPLogExporter\n extends OTLPExporterBrowserBase<ReadableLogRecord, IExportLogsServiceResponse>\n implements LogRecordExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(\n {\n ...config,\n },\n JsonLogsSerializer,\n {\n 'Content-Type': 'application/json',\n },\n 'v1/logs'\n );\n }\n}\n"]}
|
|
@@ -7,6 +7,5 @@ import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class OTLPLogExporter extends OTLPExporterNodeBase<ReadableLogRecord, IExportLogsServiceResponse> implements LogRecordExporter {
|
|
9
9
|
constructor(config?: OTLPExporterNodeConfigBase);
|
|
10
|
-
getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
|
|
11
10
|
}
|
|
12
11
|
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -13,10 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { OTLPExporterNodeBase, parseHeaders, } from '@opentelemetry/otlp-exporter-base';
|
|
16
|
+
import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
|
|
18
17
|
import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';
|
|
19
|
-
import { getDefaultUrl } from '../config';
|
|
20
18
|
import { VERSION } from '../../version';
|
|
21
19
|
const USER_AGENT = {
|
|
22
20
|
'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,
|
|
@@ -26,11 +24,7 @@ const USER_AGENT = {
|
|
|
26
24
|
*/
|
|
27
25
|
export class OTLPLogExporter extends OTLPExporterNodeBase {
|
|
28
26
|
constructor(config = {}) {
|
|
29
|
-
|
|
30
|
-
super(Object.assign({ timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config), JsonLogsSerializer, Object.assign(Object.assign(Object.assign(Object.assign({}, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers)), USER_AGENT), { 'Content-Type': 'application/json' }));
|
|
31
|
-
}
|
|
32
|
-
getDefaultUrl(config) {
|
|
33
|
-
return getDefaultUrl(config);
|
|
27
|
+
super(Object.assign({}, config), JsonLogsSerializer, Object.assign(Object.assign({}, USER_AGENT), { 'Content-Type': 'application/json' }), 'LOGS', 'v1/logs');
|
|
34
28
|
}
|
|
35
29
|
}
|
|
36
30
|
//# sourceMappingURL=OTLPLogExporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,iCAAiC,OAAO,EAAE;CACzD,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,eACX,SAAQ,oBAAmE;IAG3E,YAAY,SAAqC,EAAE;QACjD,KAAK,mBAEE,MAAM,GAEX,kBAAkB,kCAEb,UAAU,KACb,cAAc,EAAE,kBAAkB,KAEpC,MAAM,EACN,SAAS,CACV,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 type {\n ReadableLogRecord,\n LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport type { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer';\nimport { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';\nimport { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';\n\nimport { VERSION } from '../../version';\n\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\n/**\n * Collector Logs Exporter for Node\n */\nexport class OTLPLogExporter\n extends OTLPExporterNodeBase<ReadableLogRecord, IExportLogsServiceResponse>\n implements LogRecordExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(\n {\n ...config,\n },\n JsonLogsSerializer,\n {\n ...USER_AGENT,\n 'Content-Type': 'application/json',\n },\n 'LOGS',\n 'v1/logs'\n );\n }\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.54.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/build/esnext/version.js
CHANGED
|
@@ -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.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.54.0';\n"]}
|
|
@@ -7,6 +7,5 @@ import { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class OTLPLogExporter extends OTLPExporterBrowserBase<ReadableLogRecord, IExportLogsServiceResponse> implements LogRecordExporter {
|
|
9
9
|
constructor(config?: OTLPExporterConfigBase);
|
|
10
|
-
getDefaultUrl(config: OTLPExporterConfigBase): string;
|
|
11
10
|
}
|
|
12
11
|
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -18,16 +18,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.OTLPLogExporter = 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 config_1 = require("../config");
|
|
22
21
|
/**
|
|
23
22
|
* Collector Logs Exporter for Web
|
|
24
23
|
*/
|
|
25
24
|
class OTLPLogExporter extends otlp_exporter_base_1.OTLPExporterBrowserBase {
|
|
26
25
|
constructor(config = {}) {
|
|
27
|
-
super(Object.assign({}, config), otlp_transformer_1.JsonLogsSerializer,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return (0, config_1.getDefaultUrl)(config);
|
|
26
|
+
super(Object.assign({}, config), otlp_transformer_1.JsonLogsSerializer, {
|
|
27
|
+
'Content-Type': 'application/json',
|
|
28
|
+
}, 'v1/logs');
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
31
|
exports.OTLPLogExporter = OTLPLogExporter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPLogExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,0EAA4E;AAC5E,sEAAqE;AAErE
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPLogExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,0EAA4E;AAC5E,sEAAqE;AAErE;;GAEG;AACH,MAAa,eACX,SAAQ,4CAAsE;IAG9E,YAAY,SAAiC,EAAE;QAC7C,KAAK,mBAEE,MAAM,GAEX,qCAAkB,EAClB;YACE,cAAc,EAAE,kBAAkB;SACnC,EACD,SAAS,CACV,CAAC;IACJ,CAAC;CACF;AAhBD,0CAgBC","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 type {\n ReadableLogRecord,\n LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport type { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer';\nimport { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';\nimport { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';\n\n/**\n * Collector Logs Exporter for Web\n */\nexport class OTLPLogExporter\n extends OTLPExporterBrowserBase<ReadableLogRecord, IExportLogsServiceResponse>\n implements LogRecordExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(\n {\n ...config,\n },\n JsonLogsSerializer,\n {\n 'Content-Type': 'application/json',\n },\n 'v1/logs'\n );\n }\n}\n"]}
|
|
@@ -7,6 +7,5 @@ import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class OTLPLogExporter extends OTLPExporterNodeBase<ReadableLogRecord, IExportLogsServiceResponse> implements LogRecordExporter {
|
|
9
9
|
constructor(config?: OTLPExporterNodeConfigBase);
|
|
10
|
-
getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
|
|
11
10
|
}
|
|
12
11
|
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -16,10 +16,8 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.OTLPLogExporter = void 0;
|
|
19
|
-
const core_1 = require("@opentelemetry/core");
|
|
20
19
|
const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
|
|
21
20
|
const otlp_transformer_1 = require("@opentelemetry/otlp-transformer");
|
|
22
|
-
const config_1 = require("../config");
|
|
23
21
|
const version_1 = require("../../version");
|
|
24
22
|
const USER_AGENT = {
|
|
25
23
|
'User-Agent': `OTel-OTLP-Exporter-JavaScript/${version_1.VERSION}`,
|
|
@@ -29,11 +27,7 @@ const USER_AGENT = {
|
|
|
29
27
|
*/
|
|
30
28
|
class OTLPLogExporter extends otlp_exporter_base_1.OTLPExporterNodeBase {
|
|
31
29
|
constructor(config = {}) {
|
|
32
|
-
|
|
33
|
-
super(Object.assign({ timeoutMillis: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config), otlp_transformer_1.JsonLogsSerializer, Object.assign(Object.assign(Object.assign(Object.assign({}, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_LOGS_HEADERS)), (0, otlp_exporter_base_1.parseHeaders)(config === null || config === void 0 ? void 0 : config.headers)), USER_AGENT), { 'Content-Type': 'application/json' }));
|
|
34
|
-
}
|
|
35
|
-
getDefaultUrl(config) {
|
|
36
|
-
return (0, config_1.getDefaultUrl)(config);
|
|
30
|
+
super(Object.assign({}, config), otlp_transformer_1.JsonLogsSerializer, Object.assign(Object.assign({}, USER_AGENT), { 'Content-Type': 'application/json' }), 'LOGS', 'v1/logs');
|
|
37
31
|
}
|
|
38
32
|
}
|
|
39
33
|
exports.OTLPLogExporter = OTLPLogExporter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,0EAAyE;AACzE,sEAAqE;AAErE,2CAAwC;AAExC,MAAM,UAAU,GAAG;IACjB,YAAY,EAAE,iCAAiC,iBAAO,EAAE;CACzD,CAAC;AAEF;;GAEG;AACH,MAAa,eACX,SAAQ,yCAAmE;IAG3E,YAAY,SAAqC,EAAE;QACjD,KAAK,mBAEE,MAAM,GAEX,qCAAkB,kCAEb,UAAU,KACb,cAAc,EAAE,kBAAkB,KAEpC,MAAM,EACN,SAAS,CACV,CAAC;IACJ,CAAC;CACF;AAlBD,0CAkBC","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 type {\n ReadableLogRecord,\n LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport type { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer';\nimport { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';\nimport { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';\n\nimport { VERSION } from '../../version';\n\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n};\n\n/**\n * Collector Logs Exporter for Node\n */\nexport class OTLPLogExporter\n extends OTLPExporterNodeBase<ReadableLogRecord, IExportLogsServiceResponse>\n implements LogRecordExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(\n {\n ...config,\n },\n JsonLogsSerializer,\n {\n ...USER_AGENT,\n 'Content-Type': 'application/json',\n },\n 'LOGS',\n 'v1/logs'\n );\n }\n}\n"]}
|
package/build/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.54.0";
|
|
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.54.0';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/exporter-logs-otlp-http",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"prepublishOnly": "npm run compile",
|
|
33
33
|
"compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
|
|
34
34
|
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
|
|
35
|
-
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
|
|
36
35
|
"lint": "eslint . --ext .ts",
|
|
37
36
|
"lint:fix": "eslint . --ext .ts --fix",
|
|
38
37
|
"tdd": "npm run test -- --watch-extensions ts --watch",
|
|
@@ -44,7 +43,6 @@
|
|
|
44
43
|
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
|
|
45
44
|
"prewatch": "npm run precompile",
|
|
46
45
|
"peer-api-check": "node ../../../scripts/peer-api-check.js",
|
|
47
|
-
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
|
|
48
46
|
"align-api-deps": "node ../../../scripts/align-api-deps.js"
|
|
49
47
|
},
|
|
50
48
|
"keywords": [
|
|
@@ -73,16 +71,15 @@
|
|
|
73
71
|
"sideEffects": false,
|
|
74
72
|
"devDependencies": {
|
|
75
73
|
"@babel/core": "7.25.2",
|
|
76
|
-
"@babel/preset-env": "7.25.
|
|
74
|
+
"@babel/preset-env": "7.25.4",
|
|
77
75
|
"@opentelemetry/api": "1.9.0",
|
|
78
|
-
"@opentelemetry/resources": "1.
|
|
79
|
-
"@types/mocha": "10.0.
|
|
76
|
+
"@opentelemetry/resources": "1.27.0",
|
|
77
|
+
"@types/mocha": "10.0.8",
|
|
80
78
|
"@types/node": "18.6.5",
|
|
81
79
|
"@types/sinon": "17.0.3",
|
|
82
80
|
"@types/webpack-env": "1.16.3",
|
|
83
|
-
"babel-loader": "8.
|
|
81
|
+
"babel-loader": "8.4.1",
|
|
84
82
|
"babel-plugin-istanbul": "7.0.0",
|
|
85
|
-
"codecov": "3.8.3",
|
|
86
83
|
"cross-var": "1.1.0",
|
|
87
84
|
"karma": "6.4.4",
|
|
88
85
|
"karma-chrome-launcher": "3.1.0",
|
|
@@ -96,19 +93,19 @@
|
|
|
96
93
|
"sinon": "15.1.2",
|
|
97
94
|
"ts-loader": "9.5.1",
|
|
98
95
|
"typescript": "4.4.4",
|
|
99
|
-
"webpack": "5.
|
|
96
|
+
"webpack": "5.94.0",
|
|
100
97
|
"webpack-cli": "5.1.4",
|
|
101
98
|
"webpack-merge": "5.10.0"
|
|
102
99
|
},
|
|
103
100
|
"peerDependencies": {
|
|
104
|
-
"@opentelemetry/api": "^1.
|
|
101
|
+
"@opentelemetry/api": "^1.3.0"
|
|
105
102
|
},
|
|
106
103
|
"dependencies": {
|
|
107
|
-
"@opentelemetry/api-logs": "0.
|
|
108
|
-
"@opentelemetry/core": "1.
|
|
109
|
-
"@opentelemetry/otlp-exporter-base": "0.
|
|
110
|
-
"@opentelemetry/otlp-transformer": "0.
|
|
111
|
-
"@opentelemetry/sdk-logs": "0.
|
|
104
|
+
"@opentelemetry/api-logs": "0.54.0",
|
|
105
|
+
"@opentelemetry/core": "1.27.0",
|
|
106
|
+
"@opentelemetry/otlp-exporter-base": "0.54.0",
|
|
107
|
+
"@opentelemetry/otlp-transformer": "0.54.0",
|
|
108
|
+
"@opentelemetry/sdk-logs": "0.54.0"
|
|
112
109
|
},
|
|
113
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "eb3ca4fb07ee31c62093f5fcec56575573c902ce"
|
|
114
111
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
2
|
-
export declare const DEFAULT_COLLECTOR_URL: string;
|
|
3
|
-
/**
|
|
4
|
-
* common get default url
|
|
5
|
-
* @param config exporter config
|
|
6
|
-
* @returns url string
|
|
7
|
-
*/
|
|
8
|
-
export declare function getDefaultUrl(config: OTLPExporterConfigBase): string;
|
|
9
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1,38 +0,0 @@
|
|
|
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 } from '@opentelemetry/core';
|
|
17
|
-
import { appendResourcePathToUrl, appendRootPathToUrlIfNeeded, } from '@opentelemetry/otlp-exporter-base';
|
|
18
|
-
var DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/logs';
|
|
19
|
-
export var DEFAULT_COLLECTOR_URL = "http://localhost:4318/" + DEFAULT_COLLECTOR_RESOURCE_PATH;
|
|
20
|
-
/**
|
|
21
|
-
* common get default url
|
|
22
|
-
* @param config exporter config
|
|
23
|
-
* @returns url string
|
|
24
|
-
*/
|
|
25
|
-
export function getDefaultUrl(config) {
|
|
26
|
-
if (typeof config.url === 'string') {
|
|
27
|
-
return config.url;
|
|
28
|
-
}
|
|
29
|
-
var env = getEnv();
|
|
30
|
-
if (env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT.length > 0) {
|
|
31
|
-
return appendRootPathToUrlIfNeeded(env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT);
|
|
32
|
-
}
|
|
33
|
-
if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) {
|
|
34
|
-
return appendResourcePathToUrl(env.OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH);
|
|
35
|
-
}
|
|
36
|
-
return DEFAULT_COLLECTOR_URL;
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/platform/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,uBAAuB,EACvB,2BAA2B,GAE5B,MAAM,mCAAmC,CAAC;AAE3C,IAAM,+BAA+B,GAAG,SAAS,CAAC;AAClD,MAAM,CAAC,IAAM,qBAAqB,GAAG,2BAAyB,+BAAiC,CAAC;AAEhG;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,MAA8B;IAC1D,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,EAAE;QAClC,OAAO,MAAM,CAAC,GAAG,CAAC;KACnB;IAED,IAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,IAAI,GAAG,CAAC,gCAAgC,CAAC,MAAM,GAAG,CAAC,EAAE;QACnD,OAAO,2BAA2B,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;KAC1E;IAED,IAAI,GAAG,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC,EAAE;QAC9C,OAAO,uBAAuB,CAC5B,GAAG,CAAC,2BAA2B,EAC/B,+BAA+B,CAChC,CAAC;KACH;IAED,OAAO,qBAAqB,CAAC;AAC/B,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\nimport { getEnv } from '@opentelemetry/core';\nimport {\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\n OTLPExporterConfigBase,\n} from '@opentelemetry/otlp-exporter-base';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/logs';\nexport const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\n\n/**\n * common get default url\n * @param config exporter config\n * @returns url string\n */\nexport function getDefaultUrl(config: OTLPExporterConfigBase): string {\n if (typeof config.url === 'string') {\n return config.url;\n }\n\n const env = getEnv();\n if (env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT.length > 0) {\n return appendRootPathToUrlIfNeeded(env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT);\n }\n\n if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) {\n return appendResourcePathToUrl(\n env.OTEL_EXPORTER_OTLP_ENDPOINT,\n DEFAULT_COLLECTOR_RESOURCE_PATH\n );\n }\n\n return DEFAULT_COLLECTOR_URL;\n}\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
2
|
-
export declare const DEFAULT_COLLECTOR_URL: string;
|
|
3
|
-
/**
|
|
4
|
-
* common get default url
|
|
5
|
-
* @param config exporter config
|
|
6
|
-
* @returns url string
|
|
7
|
-
*/
|
|
8
|
-
export declare function getDefaultUrl(config: OTLPExporterConfigBase): string;
|
|
9
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1,38 +0,0 @@
|
|
|
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 } from '@opentelemetry/core';
|
|
17
|
-
import { appendResourcePathToUrl, appendRootPathToUrlIfNeeded, } from '@opentelemetry/otlp-exporter-base';
|
|
18
|
-
const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/logs';
|
|
19
|
-
export const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
|
|
20
|
-
/**
|
|
21
|
-
* common get default url
|
|
22
|
-
* @param config exporter config
|
|
23
|
-
* @returns url string
|
|
24
|
-
*/
|
|
25
|
-
export function getDefaultUrl(config) {
|
|
26
|
-
if (typeof config.url === 'string') {
|
|
27
|
-
return config.url;
|
|
28
|
-
}
|
|
29
|
-
const env = getEnv();
|
|
30
|
-
if (env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT.length > 0) {
|
|
31
|
-
return appendRootPathToUrlIfNeeded(env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT);
|
|
32
|
-
}
|
|
33
|
-
if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) {
|
|
34
|
-
return appendResourcePathToUrl(env.OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH);
|
|
35
|
-
}
|
|
36
|
-
return DEFAULT_COLLECTOR_URL;
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/platform/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,uBAAuB,EACvB,2BAA2B,GAE5B,MAAM,mCAAmC,CAAC;AAE3C,MAAM,+BAA+B,GAAG,SAAS,CAAC;AAClD,MAAM,CAAC,MAAM,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AAEhG;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,MAA8B;IAC1D,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,EAAE;QAClC,OAAO,MAAM,CAAC,GAAG,CAAC;KACnB;IAED,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,IAAI,GAAG,CAAC,gCAAgC,CAAC,MAAM,GAAG,CAAC,EAAE;QACnD,OAAO,2BAA2B,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;KAC1E;IAED,IAAI,GAAG,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC,EAAE;QAC9C,OAAO,uBAAuB,CAC5B,GAAG,CAAC,2BAA2B,EAC/B,+BAA+B,CAChC,CAAC;KACH;IAED,OAAO,qBAAqB,CAAC;AAC/B,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\nimport { getEnv } from '@opentelemetry/core';\nimport {\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\n OTLPExporterConfigBase,\n} from '@opentelemetry/otlp-exporter-base';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/logs';\nexport const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\n\n/**\n * common get default url\n * @param config exporter config\n * @returns url string\n */\nexport function getDefaultUrl(config: OTLPExporterConfigBase): string {\n if (typeof config.url === 'string') {\n return config.url;\n }\n\n const env = getEnv();\n if (env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT.length > 0) {\n return appendRootPathToUrlIfNeeded(env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT);\n }\n\n if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) {\n return appendResourcePathToUrl(\n env.OTEL_EXPORTER_OTLP_ENDPOINT,\n DEFAULT_COLLECTOR_RESOURCE_PATH\n );\n }\n\n return DEFAULT_COLLECTOR_URL;\n}\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
2
|
-
export declare const DEFAULT_COLLECTOR_URL: string;
|
|
3
|
-
/**
|
|
4
|
-
* common get default url
|
|
5
|
-
* @param config exporter config
|
|
6
|
-
* @returns url string
|
|
7
|
-
*/
|
|
8
|
-
export declare function getDefaultUrl(config: OTLPExporterConfigBase): string;
|
|
9
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright The OpenTelemetry Authors
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.getDefaultUrl = exports.DEFAULT_COLLECTOR_URL = void 0;
|
|
19
|
-
const core_1 = require("@opentelemetry/core");
|
|
20
|
-
const otlp_exporter_base_1 = require("@opentelemetry/otlp-exporter-base");
|
|
21
|
-
const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/logs';
|
|
22
|
-
exports.DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;
|
|
23
|
-
/**
|
|
24
|
-
* common get default url
|
|
25
|
-
* @param config exporter config
|
|
26
|
-
* @returns url string
|
|
27
|
-
*/
|
|
28
|
-
function getDefaultUrl(config) {
|
|
29
|
-
if (typeof config.url === 'string') {
|
|
30
|
-
return config.url;
|
|
31
|
-
}
|
|
32
|
-
const env = (0, core_1.getEnv)();
|
|
33
|
-
if (env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT.length > 0) {
|
|
34
|
-
return (0, otlp_exporter_base_1.appendRootPathToUrlIfNeeded)(env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT);
|
|
35
|
-
}
|
|
36
|
-
if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) {
|
|
37
|
-
return (0, otlp_exporter_base_1.appendResourcePathToUrl)(env.OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH);
|
|
38
|
-
}
|
|
39
|
-
return exports.DEFAULT_COLLECTOR_URL;
|
|
40
|
-
}
|
|
41
|
-
exports.getDefaultUrl = getDefaultUrl;
|
|
42
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/platform/config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,8CAA6C;AAC7C,0EAI2C;AAE3C,MAAM,+BAA+B,GAAG,SAAS,CAAC;AACrC,QAAA,qBAAqB,GAAG,yBAAyB,+BAA+B,EAAE,CAAC;AAEhG;;;;GAIG;AACH,SAAgB,aAAa,CAAC,MAA8B;IAC1D,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ,EAAE;QAClC,OAAO,MAAM,CAAC,GAAG,CAAC;KACnB;IAED,MAAM,GAAG,GAAG,IAAA,aAAM,GAAE,CAAC;IACrB,IAAI,GAAG,CAAC,gCAAgC,CAAC,MAAM,GAAG,CAAC,EAAE;QACnD,OAAO,IAAA,gDAA2B,EAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;KAC1E;IAED,IAAI,GAAG,CAAC,2BAA2B,CAAC,MAAM,GAAG,CAAC,EAAE;QAC9C,OAAO,IAAA,4CAAuB,EAC5B,GAAG,CAAC,2BAA2B,EAC/B,+BAA+B,CAChC,CAAC;KACH;IAED,OAAO,6BAAqB,CAAC;AAC/B,CAAC;AAlBD,sCAkBC","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 { getEnv } from '@opentelemetry/core';\nimport {\n appendResourcePathToUrl,\n appendRootPathToUrlIfNeeded,\n OTLPExporterConfigBase,\n} from '@opentelemetry/otlp-exporter-base';\n\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/logs';\nexport const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\n\n/**\n * common get default url\n * @param config exporter config\n * @returns url string\n */\nexport function getDefaultUrl(config: OTLPExporterConfigBase): string {\n if (typeof config.url === 'string') {\n return config.url;\n }\n\n const env = getEnv();\n if (env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT.length > 0) {\n return appendRootPathToUrlIfNeeded(env.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT);\n }\n\n if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) {\n return appendResourcePathToUrl(\n env.OTEL_EXPORTER_OTLP_ENDPOINT,\n DEFAULT_COLLECTOR_RESOURCE_PATH\n );\n }\n\n return DEFAULT_COLLECTOR_URL;\n}\n"]}
|