@opentelemetry/exporter-logs-otlp-http 0.51.1 → 0.52.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 +1 -3
- package/build/esm/platform/browser/OTLPLogExporter.d.ts +2 -3
- package/build/esm/platform/browser/OTLPLogExporter.js +2 -8
- package/build/esm/platform/browser/OTLPLogExporter.js.map +1 -1
- package/build/esm/platform/node/OTLPLogExporter.d.ts +2 -3
- 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 +2 -3
- package/build/esnext/platform/browser/OTLPLogExporter.js +2 -8
- package/build/esnext/platform/browser/OTLPLogExporter.js.map +1 -1
- package/build/esnext/platform/node/OTLPLogExporter.d.ts +2 -3
- 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 +2 -3
- package/build/src/platform/browser/OTLPLogExporter.js +1 -7
- package/build/src/platform/browser/OTLPLogExporter.js.map +1 -1
- package/build/src/platform/node/OTLPLogExporter.d.ts +2 -3
- 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 +17 -17
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
LoggerProvider,
|
|
59
59
|
BatchLogRecordProcessor,
|
|
60
60
|
} from '@opentelemetry/sdk-logs';
|
|
61
|
-
import {
|
|
61
|
+
import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http';
|
|
62
62
|
|
|
63
63
|
// exporter options. see all options in OTLPExporterNodeConfigBase
|
|
64
64
|
const collectorOptions = {
|
|
@@ -108,7 +108,5 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
|
|
|
108
108
|
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
|
|
109
109
|
[npm-url]: https://www.npmjs.com/package/@opentelemetry/exporter-logs-otlp-http
|
|
110
110
|
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fexporter-logs-otlp-http.svg
|
|
111
|
-
[opentelemetry-collector-url]: https://github.com/open-telemetry/opentelemetry-collector
|
|
112
|
-
[semconv-resource-service-name]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/README.md#service
|
|
113
111
|
[trace-exporter-url]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/exporter-trace-otlp-http
|
|
114
112
|
[metrics-exporter-url]: https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-http
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { ReadableLogRecord, LogRecordExporter } from '@opentelemetry/sdk-logs';
|
|
2
2
|
import type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer';
|
|
4
4
|
import { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
|
|
5
5
|
/**
|
|
6
6
|
* Collector Logs Exporter for Web
|
|
7
7
|
*/
|
|
8
|
-
export declare class OTLPLogExporter extends OTLPExporterBrowserBase<ReadableLogRecord,
|
|
8
|
+
export declare class OTLPLogExporter extends OTLPExporterBrowserBase<ReadableLogRecord, IExportLogsServiceResponse> implements LogRecordExporter {
|
|
9
9
|
constructor(config?: OTLPExporterConfigBase);
|
|
10
|
-
convert(logRecords: ReadableLogRecord[]): IExportLogsServiceRequest;
|
|
11
10
|
getDefaultUrl(config: OTLPExporterConfigBase): string;
|
|
12
11
|
}
|
|
13
12
|
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -41,7 +41,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
41
41
|
};
|
|
42
42
|
import { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
|
|
43
43
|
import { baggageUtils, getEnv } from '@opentelemetry/core';
|
|
44
|
-
import {
|
|
44
|
+
import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';
|
|
45
45
|
import { getDefaultUrl } from '../config';
|
|
46
46
|
/**
|
|
47
47
|
* Collector Logs Exporter for Web
|
|
@@ -52,16 +52,10 @@ var OTLPLogExporter = /** @class */ (function (_super) {
|
|
|
52
52
|
if (config === void 0) { config = {}; }
|
|
53
53
|
var _this =
|
|
54
54
|
// load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env var
|
|
55
|
-
_super.call(this, __assign({ timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config)) || this;
|
|
55
|
+
_super.call(this, __assign({ timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config), JsonLogsSerializer, 'application/json') || this;
|
|
56
56
|
_this._headers = __assign(__assign({}, _this._headers), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS));
|
|
57
57
|
return _this;
|
|
58
58
|
}
|
|
59
|
-
OTLPLogExporter.prototype.convert = function (logRecords) {
|
|
60
|
-
return createExportLogsServiceRequest(logRecords, {
|
|
61
|
-
useHex: true,
|
|
62
|
-
useLongBits: false,
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
59
|
OTLPLogExporter.prototype.getDefaultUrl = function (config) {
|
|
66
60
|
return getDefaultUrl(config);
|
|
67
61
|
};
|
|
@@ -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,YAAY,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,
|
|
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,YAAY,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C;;GAEG;AACH;IACU,mCAAsE;IAG9E,yBAAY,MAAmC;QAAnC,uBAAA,EAAA,WAAmC;QAA/C;QACE,gDAAgD;QAChD,6BAEI,aAAa,EAAE,MAAM,EAAE,CAAC,+BAA+B,IACpD,MAAM,GAEX,kBAAkB,EAClB,kBAAkB,CACnB,SAOF;QANC,KAAI,CAAC,QAAQ,yBACR,KAAI,CAAC,QAAQ,GACb,YAAY,CAAC,uBAAuB,CACrC,MAAM,EAAE,CAAC,+BAA+B,CACzC,CACF,CAAC;;IACJ,CAAC;IAED,uCAAa,GAAb,UAAc,MAA8B;QAC1C,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;IACH,sBAAC;AAAD,CAAC,AAzBD,CACU,uBAAuB,GAwBhC","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 { baggageUtils, getEnv } from '@opentelemetry/core';\nimport { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';\n\nimport { getDefaultUrl } from '../config';\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 // load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env var\n super(\n {\n timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT,\n ...config,\n },\n JsonLogsSerializer,\n 'application/json'\n );\n this._headers = {\n ...this._headers,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS\n ),\n };\n }\n\n getDefaultUrl(config: OTLPExporterConfigBase): string {\n return getDefaultUrl(config);\n }\n}\n"]}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { ReadableLogRecord, LogRecordExporter } from '@opentelemetry/sdk-logs';
|
|
2
2
|
import type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer';
|
|
4
4
|
import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
|
|
5
5
|
/**
|
|
6
6
|
* Collector Logs Exporter for Node
|
|
7
7
|
*/
|
|
8
|
-
export declare class OTLPLogExporter extends OTLPExporterNodeBase<ReadableLogRecord,
|
|
8
|
+
export declare class OTLPLogExporter extends OTLPExporterNodeBase<ReadableLogRecord, IExportLogsServiceResponse> implements LogRecordExporter {
|
|
9
9
|
constructor(config?: OTLPExporterNodeConfigBase);
|
|
10
|
-
convert(logRecords: ReadableLogRecord[]): IExportLogsServiceRequest;
|
|
11
10
|
getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
|
|
12
11
|
}
|
|
13
12
|
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -41,7 +41,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
41
41
|
};
|
|
42
42
|
import { getEnv, baggageUtils } from '@opentelemetry/core';
|
|
43
43
|
import { OTLPExporterNodeBase, parseHeaders, } from '@opentelemetry/otlp-exporter-base';
|
|
44
|
-
import {
|
|
44
|
+
import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';
|
|
45
45
|
import { getDefaultUrl } from '../config';
|
|
46
46
|
import { VERSION } from '../../version';
|
|
47
47
|
var USER_AGENT = {
|
|
@@ -56,16 +56,10 @@ var OTLPLogExporter = /** @class */ (function (_super) {
|
|
|
56
56
|
if (config === void 0) { config = {}; }
|
|
57
57
|
var _this =
|
|
58
58
|
// load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env
|
|
59
|
-
_super.call(this, __assign({ timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config)) || this;
|
|
59
|
+
_super.call(this, __assign({ timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config), JsonLogsSerializer, 'application/json') || this;
|
|
60
60
|
_this.headers = __assign(__assign(__assign(__assign({}, _this.headers), USER_AGENT), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers));
|
|
61
61
|
return _this;
|
|
62
62
|
}
|
|
63
|
-
OTLPLogExporter.prototype.convert = function (logRecords) {
|
|
64
|
-
return createExportLogsServiceRequest(logRecords, {
|
|
65
|
-
useHex: true,
|
|
66
|
-
useLongBits: false,
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
63
|
OTLPLogExporter.prototype.getDefaultUrl = function (config) {
|
|
70
64
|
return getDefaultUrl(config);
|
|
71
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,YAAY,GACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,YAAY,GACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,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;QAAnD;QACE,4CAA4C;QAC5C,6BAEI,aAAa,EAAE,MAAM,EAAE,CAAC,+BAA+B,IACpD,MAAM,GAEX,kBAAkB,EAClB,kBAAkB,CACnB,SASF;QARC,KAAI,CAAC,OAAO,2CACP,KAAI,CAAC,OAAO,GACZ,UAAU,GACV,YAAY,CAAC,uBAAuB,CACrC,MAAM,EAAE,CAAC,+BAA+B,CACzC,GACE,YAAY,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,CACjC,CAAC;;IACJ,CAAC;IAED,uCAAa,GAAb,UAAc,MAAkC;QAC9C,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;IACH,sBAAC;AAAD,CAAC,AA3BD,CACU,oBAAoB,GA0B7B","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 { getEnv, baggageUtils } from '@opentelemetry/core';\nimport {\n OTLPExporterNodeBase,\n parseHeaders,\n} from '@opentelemetry/otlp-exporter-base';\nimport { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';\n\nimport { getDefaultUrl } from '../config';\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 // load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env\n super(\n {\n timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT,\n ...config,\n },\n JsonLogsSerializer,\n 'application/json'\n );\n this.headers = {\n ...this.headers,\n ...USER_AGENT,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS\n ),\n ...parseHeaders(config?.headers),\n };\n }\n\n getDefaultUrl(config: OTLPExporterNodeConfigBase): string {\n return getDefaultUrl(config);\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.52.1";
|
|
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.52.1';\n"]}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { ReadableLogRecord, LogRecordExporter } from '@opentelemetry/sdk-logs';
|
|
2
2
|
import type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer';
|
|
4
4
|
import { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
|
|
5
5
|
/**
|
|
6
6
|
* Collector Logs Exporter for Web
|
|
7
7
|
*/
|
|
8
|
-
export declare class OTLPLogExporter extends OTLPExporterBrowserBase<ReadableLogRecord,
|
|
8
|
+
export declare class OTLPLogExporter extends OTLPExporterBrowserBase<ReadableLogRecord, IExportLogsServiceResponse> implements LogRecordExporter {
|
|
9
9
|
constructor(config?: OTLPExporterConfigBase);
|
|
10
|
-
convert(logRecords: ReadableLogRecord[]): IExportLogsServiceRequest;
|
|
11
10
|
getDefaultUrl(config: OTLPExporterConfigBase): string;
|
|
12
11
|
}
|
|
13
12
|
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
|
|
17
17
|
import { baggageUtils, getEnv } from '@opentelemetry/core';
|
|
18
|
-
import {
|
|
18
|
+
import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';
|
|
19
19
|
import { getDefaultUrl } from '../config';
|
|
20
20
|
/**
|
|
21
21
|
* Collector Logs Exporter for Web
|
|
@@ -23,15 +23,9 @@ import { getDefaultUrl } from '../config';
|
|
|
23
23
|
export class OTLPLogExporter extends OTLPExporterBrowserBase {
|
|
24
24
|
constructor(config = {}) {
|
|
25
25
|
// load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env var
|
|
26
|
-
super(Object.assign({ timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config));
|
|
26
|
+
super(Object.assign({ timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config), JsonLogsSerializer, 'application/json');
|
|
27
27
|
this._headers = Object.assign(Object.assign({}, this._headers), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS));
|
|
28
28
|
}
|
|
29
|
-
convert(logRecords) {
|
|
30
|
-
return createExportLogsServiceRequest(logRecords, {
|
|
31
|
-
useHex: true,
|
|
32
|
-
useLongBits: false,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
29
|
getDefaultUrl(config) {
|
|
36
30
|
return getDefaultUrl(config);
|
|
37
31
|
}
|
|
@@ -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,YAAY,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,
|
|
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,YAAY,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C;;GAEG;AACH,MAAM,OAAO,eACX,SAAQ,uBAAsE;IAG9E,YAAY,SAAiC,EAAE;QAC7C,gDAAgD;QAChD,KAAK,iBAED,aAAa,EAAE,MAAM,EAAE,CAAC,+BAA+B,IACpD,MAAM,GAEX,kBAAkB,EAClB,kBAAkB,CACnB,CAAC;QACF,IAAI,CAAC,QAAQ,mCACR,IAAI,CAAC,QAAQ,GACb,YAAY,CAAC,uBAAuB,CACrC,MAAM,EAAE,CAAC,+BAA+B,CACzC,CACF,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,MAA8B;QAC1C,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,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 { baggageUtils, getEnv } from '@opentelemetry/core';\nimport { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';\n\nimport { getDefaultUrl } from '../config';\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 // load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env var\n super(\n {\n timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT,\n ...config,\n },\n JsonLogsSerializer,\n 'application/json'\n );\n this._headers = {\n ...this._headers,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS\n ),\n };\n }\n\n getDefaultUrl(config: OTLPExporterConfigBase): string {\n return getDefaultUrl(config);\n }\n}\n"]}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { ReadableLogRecord, LogRecordExporter } from '@opentelemetry/sdk-logs';
|
|
2
2
|
import type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer';
|
|
4
4
|
import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
|
|
5
5
|
/**
|
|
6
6
|
* Collector Logs Exporter for Node
|
|
7
7
|
*/
|
|
8
|
-
export declare class OTLPLogExporter extends OTLPExporterNodeBase<ReadableLogRecord,
|
|
8
|
+
export declare class OTLPLogExporter extends OTLPExporterNodeBase<ReadableLogRecord, IExportLogsServiceResponse> implements LogRecordExporter {
|
|
9
9
|
constructor(config?: OTLPExporterNodeConfigBase);
|
|
10
|
-
convert(logRecords: ReadableLogRecord[]): IExportLogsServiceRequest;
|
|
11
10
|
getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
|
|
12
11
|
}
|
|
13
12
|
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { getEnv, baggageUtils } from '@opentelemetry/core';
|
|
17
17
|
import { OTLPExporterNodeBase, parseHeaders, } from '@opentelemetry/otlp-exporter-base';
|
|
18
|
-
import {
|
|
18
|
+
import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';
|
|
19
19
|
import { getDefaultUrl } from '../config';
|
|
20
20
|
import { VERSION } from '../../version';
|
|
21
21
|
const USER_AGENT = {
|
|
@@ -27,15 +27,9 @@ const USER_AGENT = {
|
|
|
27
27
|
export class OTLPLogExporter extends OTLPExporterNodeBase {
|
|
28
28
|
constructor(config = {}) {
|
|
29
29
|
// load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env
|
|
30
|
-
super(Object.assign({ timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config));
|
|
30
|
+
super(Object.assign({ timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config), JsonLogsSerializer, 'application/json');
|
|
31
31
|
this.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, this.headers), USER_AGENT), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS)), parseHeaders(config === null || config === void 0 ? void 0 : config.headers));
|
|
32
32
|
}
|
|
33
|
-
convert(logRecords) {
|
|
34
|
-
return createExportLogsServiceRequest(logRecords, {
|
|
35
|
-
useHex: true,
|
|
36
|
-
useLongBits: false,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
33
|
getDefaultUrl(config) {
|
|
40
34
|
return getDefaultUrl(config);
|
|
41
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,YAAY,GACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,YAAY,GACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,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,4CAA4C;QAC5C,KAAK,iBAED,aAAa,EAAE,MAAM,EAAE,CAAC,+BAA+B,IACpD,MAAM,GAEX,kBAAkB,EAClB,kBAAkB,CACnB,CAAC;QACF,IAAI,CAAC,OAAO,+DACP,IAAI,CAAC,OAAO,GACZ,UAAU,GACV,YAAY,CAAC,uBAAuB,CACrC,MAAM,EAAE,CAAC,+BAA+B,CACzC,GACE,YAAY,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,CACjC,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,MAAkC;QAC9C,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,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 { getEnv, baggageUtils } from '@opentelemetry/core';\nimport {\n OTLPExporterNodeBase,\n parseHeaders,\n} from '@opentelemetry/otlp-exporter-base';\nimport { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';\n\nimport { getDefaultUrl } from '../config';\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 // load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env\n super(\n {\n timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT,\n ...config,\n },\n JsonLogsSerializer,\n 'application/json'\n );\n this.headers = {\n ...this.headers,\n ...USER_AGENT,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS\n ),\n ...parseHeaders(config?.headers),\n };\n }\n\n getDefaultUrl(config: OTLPExporterNodeConfigBase): string {\n return getDefaultUrl(config);\n }\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.52.1";
|
|
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.52.1';\n"]}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { ReadableLogRecord, LogRecordExporter } from '@opentelemetry/sdk-logs';
|
|
2
2
|
import type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer';
|
|
4
4
|
import { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';
|
|
5
5
|
/**
|
|
6
6
|
* Collector Logs Exporter for Web
|
|
7
7
|
*/
|
|
8
|
-
export declare class OTLPLogExporter extends OTLPExporterBrowserBase<ReadableLogRecord,
|
|
8
|
+
export declare class OTLPLogExporter extends OTLPExporterBrowserBase<ReadableLogRecord, IExportLogsServiceResponse> implements LogRecordExporter {
|
|
9
9
|
constructor(config?: OTLPExporterConfigBase);
|
|
10
|
-
convert(logRecords: ReadableLogRecord[]): IExportLogsServiceRequest;
|
|
11
10
|
getDefaultUrl(config: OTLPExporterConfigBase): string;
|
|
12
11
|
}
|
|
13
12
|
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -26,15 +26,9 @@ const config_1 = require("../config");
|
|
|
26
26
|
class OTLPLogExporter extends otlp_exporter_base_1.OTLPExporterBrowserBase {
|
|
27
27
|
constructor(config = {}) {
|
|
28
28
|
// load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env var
|
|
29
|
-
super(Object.assign({ timeoutMillis: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config));
|
|
29
|
+
super(Object.assign({ timeoutMillis: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config), otlp_transformer_1.JsonLogsSerializer, 'application/json');
|
|
30
30
|
this._headers = Object.assign(Object.assign({}, this._headers), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_LOGS_HEADERS));
|
|
31
31
|
}
|
|
32
|
-
convert(logRecords) {
|
|
33
|
-
return (0, otlp_transformer_1.createExportLogsServiceRequest)(logRecords, {
|
|
34
|
-
useHex: true,
|
|
35
|
-
useLongBits: false,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
32
|
getDefaultUrl(config) {
|
|
39
33
|
return (0, config_1.getDefaultUrl)(config);
|
|
40
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPLogExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,0EAA4E;AAC5E,8CAA2D;AAC3D,
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPLogExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,0EAA4E;AAC5E,8CAA2D;AAC3D,sEAAqE;AAErE,sCAA0C;AAE1C;;GAEG;AACH,MAAa,eACX,SAAQ,4CAAsE;IAG9E,YAAY,SAAiC,EAAE;QAC7C,gDAAgD;QAChD,KAAK,iBAED,aAAa,EAAE,IAAA,aAAM,GAAE,CAAC,+BAA+B,IACpD,MAAM,GAEX,qCAAkB,EAClB,kBAAkB,CACnB,CAAC;QACF,IAAI,CAAC,QAAQ,mCACR,IAAI,CAAC,QAAQ,GACb,mBAAY,CAAC,uBAAuB,CACrC,IAAA,aAAM,GAAE,CAAC,+BAA+B,CACzC,CACF,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,MAA8B;QAC1C,OAAO,IAAA,sBAAa,EAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACF;AAzBD,0CAyBC","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 { baggageUtils, getEnv } from '@opentelemetry/core';\nimport { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';\n\nimport { getDefaultUrl } from '../config';\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 // load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env var\n super(\n {\n timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT,\n ...config,\n },\n JsonLogsSerializer,\n 'application/json'\n );\n this._headers = {\n ...this._headers,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS\n ),\n };\n }\n\n getDefaultUrl(config: OTLPExporterConfigBase): string {\n return getDefaultUrl(config);\n }\n}\n"]}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { ReadableLogRecord, LogRecordExporter } from '@opentelemetry/sdk-logs';
|
|
2
2
|
import type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer';
|
|
4
4
|
import { OTLPExporterNodeBase } from '@opentelemetry/otlp-exporter-base';
|
|
5
5
|
/**
|
|
6
6
|
* Collector Logs Exporter for Node
|
|
7
7
|
*/
|
|
8
|
-
export declare class OTLPLogExporter extends OTLPExporterNodeBase<ReadableLogRecord,
|
|
8
|
+
export declare class OTLPLogExporter extends OTLPExporterNodeBase<ReadableLogRecord, IExportLogsServiceResponse> implements LogRecordExporter {
|
|
9
9
|
constructor(config?: OTLPExporterNodeConfigBase);
|
|
10
|
-
convert(logRecords: ReadableLogRecord[]): IExportLogsServiceRequest;
|
|
11
10
|
getDefaultUrl(config: OTLPExporterNodeConfigBase): string;
|
|
12
11
|
}
|
|
13
12
|
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -30,15 +30,9 @@ const USER_AGENT = {
|
|
|
30
30
|
class OTLPLogExporter extends otlp_exporter_base_1.OTLPExporterNodeBase {
|
|
31
31
|
constructor(config = {}) {
|
|
32
32
|
// load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env
|
|
33
|
-
super(Object.assign({ timeoutMillis: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config));
|
|
33
|
+
super(Object.assign({ timeoutMillis: (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config), otlp_transformer_1.JsonLogsSerializer, 'application/json');
|
|
34
34
|
this.headers = Object.assign(Object.assign(Object.assign(Object.assign({}, this.headers), USER_AGENT), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_LOGS_HEADERS)), (0, otlp_exporter_base_1.parseHeaders)(config === null || config === void 0 ? void 0 : config.headers));
|
|
35
35
|
}
|
|
36
|
-
convert(logRecords) {
|
|
37
|
-
return (0, otlp_transformer_1.createExportLogsServiceRequest)(logRecords, {
|
|
38
|
-
useHex: true,
|
|
39
|
-
useLongBits: false,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
36
|
getDefaultUrl(config) {
|
|
43
37
|
return (0, config_1.getDefaultUrl)(config);
|
|
44
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,8CAA2D;AAC3D,0EAG2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,8CAA2D;AAC3D,0EAG2C;AAC3C,sEAAqE;AAErE,sCAA0C;AAC1C,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,4CAA4C;QAC5C,KAAK,iBAED,aAAa,EAAE,IAAA,aAAM,GAAE,CAAC,+BAA+B,IACpD,MAAM,GAEX,qCAAkB,EAClB,kBAAkB,CACnB,CAAC;QACF,IAAI,CAAC,OAAO,+DACP,IAAI,CAAC,OAAO,GACZ,UAAU,GACV,mBAAY,CAAC,uBAAuB,CACrC,IAAA,aAAM,GAAE,CAAC,+BAA+B,CACzC,GACE,IAAA,iCAAY,EAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,CAAC,CACjC,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,MAAkC;QAC9C,OAAO,IAAA,sBAAa,EAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACF;AA3BD,0CA2BC","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 { getEnv, baggageUtils } from '@opentelemetry/core';\nimport {\n OTLPExporterNodeBase,\n parseHeaders,\n} from '@opentelemetry/otlp-exporter-base';\nimport { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';\n\nimport { getDefaultUrl } from '../config';\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 // load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env\n super(\n {\n timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT,\n ...config,\n },\n JsonLogsSerializer,\n 'application/json'\n );\n this.headers = {\n ...this.headers,\n ...USER_AGENT,\n ...baggageUtils.parseKeyPairsIntoRecord(\n getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS\n ),\n ...parseHeaders(config?.headers),\n };\n }\n\n getDefaultUrl(config: OTLPExporterNodeConfigBase): string {\n return getDefaultUrl(config);\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.52.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.52.1';\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.52.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
|
|
45
45
|
"prewatch": "npm run precompile",
|
|
46
46
|
"peer-api-check": "node ../../../scripts/peer-api-check.js",
|
|
47
|
-
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../"
|
|
47
|
+
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
|
|
48
|
+
"align-api-deps": "node ../../../scripts/align-api-deps.js"
|
|
48
49
|
},
|
|
49
50
|
"keywords": [
|
|
50
51
|
"opentelemetry",
|
|
@@ -71,30 +72,29 @@
|
|
|
71
72
|
],
|
|
72
73
|
"sideEffects": false,
|
|
73
74
|
"devDependencies": {
|
|
74
|
-
"@babel/core": "7.
|
|
75
|
-
"@babel/preset-env": "7.
|
|
76
|
-
"@opentelemetry/api": "1.
|
|
77
|
-
"@opentelemetry/resources": "1.
|
|
75
|
+
"@babel/core": "7.24.7",
|
|
76
|
+
"@babel/preset-env": "7.24.7",
|
|
77
|
+
"@opentelemetry/api": "1.9.0",
|
|
78
|
+
"@opentelemetry/resources": "1.25.1",
|
|
78
79
|
"@types/mocha": "10.0.6",
|
|
79
80
|
"@types/node": "18.6.5",
|
|
80
|
-
"@types/sinon": "
|
|
81
|
+
"@types/sinon": "17.0.3",
|
|
81
82
|
"@types/webpack-env": "1.16.3",
|
|
82
83
|
"babel-loader": "8.3.0",
|
|
83
84
|
"babel-plugin-istanbul": "6.1.1",
|
|
84
85
|
"codecov": "3.8.3",
|
|
85
|
-
"cpx": "1.5.0",
|
|
86
86
|
"cross-var": "1.1.0",
|
|
87
|
-
"karma": "6.4.
|
|
87
|
+
"karma": "6.4.3",
|
|
88
88
|
"karma-chrome-launcher": "3.1.0",
|
|
89
89
|
"karma-coverage": "2.2.1",
|
|
90
90
|
"karma-mocha": "2.0.1",
|
|
91
91
|
"karma-spec-reporter": "0.0.36",
|
|
92
|
-
"karma-webpack": "
|
|
92
|
+
"karma-webpack": "5.0.1",
|
|
93
93
|
"lerna": "6.6.2",
|
|
94
94
|
"mocha": "10.2.0",
|
|
95
95
|
"nyc": "15.1.0",
|
|
96
96
|
"sinon": "15.1.2",
|
|
97
|
-
"ts-loader": "
|
|
97
|
+
"ts-loader": "9.5.1",
|
|
98
98
|
"ts-mocha": "10.0.0",
|
|
99
99
|
"typescript": "4.4.4",
|
|
100
100
|
"webpack": "5.89.0",
|
|
@@ -105,11 +105,11 @@
|
|
|
105
105
|
"@opentelemetry/api": "^1.0.0"
|
|
106
106
|
},
|
|
107
107
|
"dependencies": {
|
|
108
|
-
"@opentelemetry/api-logs": "0.
|
|
109
|
-
"@opentelemetry/core": "1.
|
|
110
|
-
"@opentelemetry/otlp-exporter-base": "0.
|
|
111
|
-
"@opentelemetry/otlp-transformer": "0.
|
|
112
|
-
"@opentelemetry/sdk-logs": "0.
|
|
108
|
+
"@opentelemetry/api-logs": "0.52.1",
|
|
109
|
+
"@opentelemetry/core": "1.25.1",
|
|
110
|
+
"@opentelemetry/otlp-exporter-base": "0.52.1",
|
|
111
|
+
"@opentelemetry/otlp-transformer": "0.52.1",
|
|
112
|
+
"@opentelemetry/sdk-logs": "0.52.1"
|
|
113
113
|
},
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "0608f405573901e54db01e44c533009cf28be262"
|
|
115
115
|
}
|