@opentelemetry/exporter-logs-otlp-http 0.222.0 → 0.300.0-development.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 -1
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +2 -0
- package/dist/platform/browser/OTLPLogExporter.cjs +17 -0
- package/dist/platform/browser/OTLPLogExporter.cjs.map +1 -0
- package/dist/platform/browser/OTLPLogExporter.d.cts +12 -0
- package/dist/platform/browser/OTLPLogExporter.d.cts.map +1 -0
- package/dist/platform/browser/OTLPLogExporter.d.mts +12 -0
- package/dist/platform/browser/OTLPLogExporter.d.mts.map +1 -0
- package/dist/platform/browser/OTLPLogExporter.mjs +17 -0
- package/dist/platform/browser/OTLPLogExporter.mjs.map +1 -0
- package/dist/platform/browser/index.cjs +3 -0
- package/dist/platform/browser/index.d.cts +2 -0
- package/dist/platform/browser/index.d.mts +2 -0
- package/dist/platform/browser/index.mjs +2 -0
- package/dist/platform/index.cjs +3 -0
- package/dist/platform/index.d.cts +3 -0
- package/dist/platform/index.d.mts +3 -0
- package/dist/platform/index.mjs +2 -0
- package/dist/platform/node/OTLPLogExporter.cjs +17 -0
- package/dist/platform/node/OTLPLogExporter.cjs.map +1 -0
- package/dist/platform/node/OTLPLogExporter.d.cts +12 -0
- package/dist/platform/node/OTLPLogExporter.d.cts.map +1 -0
- package/dist/platform/node/OTLPLogExporter.d.mts +12 -0
- package/dist/platform/node/OTLPLogExporter.d.mts.map +1 -0
- package/dist/platform/node/OTLPLogExporter.mjs +17 -0
- package/dist/platform/node/OTLPLogExporter.mjs.map +1 -0
- package/dist/platform/node/index.d.cts +2 -0
- package/dist/platform/node/index.d.mts +2 -0
- package/dist/semconv.cjs +13 -0
- package/dist/semconv.cjs.map +1 -0
- package/dist/semconv.mjs +13 -0
- package/dist/semconv.mjs.map +1 -0
- package/package.json +60 -39
- package/build/esm/index.d.ts +0 -2
- package/build/esm/index.js +0 -6
- package/build/esm/index.js.map +0 -1
- package/build/esm/platform/browser/OTLPLogExporter.d.ts +0 -10
- package/build/esm/platform/browser/OTLPLogExporter.js +0 -17
- package/build/esm/platform/browser/OTLPLogExporter.js.map +0 -1
- package/build/esm/platform/browser/index.d.ts +0 -2
- package/build/esm/platform/browser/index.js +0 -6
- package/build/esm/platform/browser/index.js.map +0 -1
- package/build/esm/platform/index.d.ts +0 -2
- package/build/esm/platform/index.js +0 -6
- package/build/esm/platform/index.js.map +0 -1
- package/build/esm/platform/node/OTLPLogExporter.d.ts +0 -10
- package/build/esm/platform/node/OTLPLogExporter.js +0 -19
- package/build/esm/platform/node/OTLPLogExporter.js.map +0 -1
- package/build/esm/platform/node/index.d.ts +0 -2
- package/build/esm/platform/node/index.js +0 -6
- package/build/esm/platform/node/index.js.map +0 -1
- package/build/esm/semconv.d.ts +0 -9
- package/build/esm/semconv.js +0 -18
- package/build/esm/semconv.js.map +0 -1
- package/build/esm/version.d.ts +0 -2
- package/build/esm/version.js +0 -7
- package/build/esm/version.js.map +0 -1
- package/build/esnext/index.d.ts +0 -2
- package/build/esnext/index.js +0 -6
- package/build/esnext/index.js.map +0 -1
- package/build/esnext/platform/browser/OTLPLogExporter.d.ts +0 -10
- package/build/esnext/platform/browser/OTLPLogExporter.js +0 -17
- package/build/esnext/platform/browser/OTLPLogExporter.js.map +0 -1
- package/build/esnext/platform/browser/index.d.ts +0 -2
- package/build/esnext/platform/browser/index.js +0 -6
- package/build/esnext/platform/browser/index.js.map +0 -1
- package/build/esnext/platform/index.d.ts +0 -2
- package/build/esnext/platform/index.js +0 -6
- package/build/esnext/platform/index.js.map +0 -1
- package/build/esnext/platform/node/OTLPLogExporter.d.ts +0 -10
- package/build/esnext/platform/node/OTLPLogExporter.js +0 -19
- package/build/esnext/platform/node/OTLPLogExporter.js.map +0 -1
- package/build/esnext/platform/node/index.d.ts +0 -2
- package/build/esnext/platform/node/index.js +0 -6
- package/build/esnext/platform/node/index.js.map +0 -1
- package/build/esnext/semconv.d.ts +0 -9
- package/build/esnext/semconv.js +0 -18
- package/build/esnext/semconv.js.map +0 -1
- package/build/esnext/version.d.ts +0 -2
- package/build/esnext/version.js +0 -7
- package/build/esnext/version.js.map +0 -1
- package/build/src/index.d.ts +0 -2
- package/build/src/index.js +0 -10
- package/build/src/index.js.map +0 -1
- package/build/src/platform/browser/OTLPLogExporter.d.ts +0 -10
- package/build/src/platform/browser/OTLPLogExporter.js +0 -21
- package/build/src/platform/browser/OTLPLogExporter.js.map +0 -1
- package/build/src/platform/browser/index.d.ts +0 -2
- package/build/src/platform/browser/index.js +0 -10
- package/build/src/platform/browser/index.js.map +0 -1
- package/build/src/platform/index.d.ts +0 -2
- package/build/src/platform/index.js +0 -10
- package/build/src/platform/index.js.map +0 -1
- package/build/src/platform/node/OTLPLogExporter.d.ts +0 -10
- package/build/src/platform/node/OTLPLogExporter.js +0 -23
- package/build/src/platform/node/OTLPLogExporter.js.map +0 -1
- package/build/src/platform/node/index.d.ts +0 -2
- package/build/src/platform/node/index.js +0 -10
- package/build/src/platform/node/index.js.map +0 -1
- package/build/src/semconv.d.ts +0 -9
- package/build/src/semconv.js +0 -21
- package/build/src/semconv.js.map +0 -1
- package/build/src/version.d.ts +0 -2
- package/build/src/version.js +0 -10
- package/build/src/version.js.map +0 -1
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ To see documentation and sample code for the metric exporter, see the [exporter-
|
|
|
28
28
|
The OTLPLogExporter in Web expects the endpoint to end in `/v1/logs`.
|
|
29
29
|
|
|
30
30
|
```js
|
|
31
|
-
import { SeverityNumber } from '@opentelemetry/api
|
|
31
|
+
import { SeverityNumber } from '@opentelemetry/api';
|
|
32
32
|
import {
|
|
33
33
|
LoggerProvider,
|
|
34
34
|
BatchLogRecordProcessor,
|
package/dist/index.cjs
ADDED
package/dist/index.d.cts
ADDED
package/dist/index.d.mts
ADDED
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const require_semconv = require("../../semconv.cjs");
|
|
2
|
+
let _opentelemetry_otlp_exporter_base = require("@opentelemetry/otlp-exporter-base");
|
|
3
|
+
let _opentelemetry_otlp_transformer = require("@opentelemetry/otlp-transformer");
|
|
4
|
+
let _opentelemetry_otlp_exporter_base_browser_http = require("@opentelemetry/otlp-exporter-base/browser-http");
|
|
5
|
+
//#region src/platform/browser/OTLPLogExporter.ts
|
|
6
|
+
/**
|
|
7
|
+
* Collector Logs Exporter for Web
|
|
8
|
+
*/
|
|
9
|
+
var OTLPLogExporter = class extends _opentelemetry_otlp_exporter_base.OTLPExporterBase {
|
|
10
|
+
constructor(config = {}) {
|
|
11
|
+
super((0, _opentelemetry_otlp_exporter_base_browser_http.createLegacyOtlpBrowserExportDelegate)(config, _opentelemetry_otlp_transformer.JsonLogsSerializer, require_semconv.OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER, _opentelemetry_otlp_transformer.LogsExporterMetricsHelper, config.selfObsMeterProvider, "v1/logs", { "Content-Type": "application/json" }));
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.OTLPLogExporter = OTLPLogExporter;
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=OTLPLogExporter.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.cjs","names":["OTLPExporterBase","createLegacyOtlpBrowserExportDelegate","JsonLogsSerializer","OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER","LogsExporterMetricsHelper"],"sources":["../../../src/platform/browser/OTLPLogExporter.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n ReadableLogRecord,\n LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';\nimport {\n JsonLogsSerializer,\n LogsExporterMetricsHelper,\n} from '@opentelemetry/otlp-transformer';\nimport { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http';\n\nimport { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER } from '../../semconv';\n\n/**\n * Collector Logs Exporter for Web\n */\nexport class OTLPLogExporter\n extends OTLPExporterBase<ReadableLogRecord[]>\n implements LogRecordExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(\n createLegacyOtlpBrowserExportDelegate(\n config,\n JsonLogsSerializer,\n OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER,\n LogsExporterMetricsHelper,\n config.selfObsMeterProvider,\n 'v1/logs',\n { 'Content-Type': 'application/json' }\n )\n );\n }\n}\n"],"mappings":";;;;;;;;AAsBA,IAAa,kBAAb,cACUA,kCAAAA,iBAEV;CACE,YAAY,SAAiC,CAAC,GAAG;EAC/C,OAAA,GACEC,+CAAAA,sCAAAA,CACE,QACAC,gCAAAA,oBACAC,gBAAAA,kDACAC,gCAAAA,2BACA,OAAO,sBACP,WACA,EAAE,gBAAgB,mBAAmB,CACvC,CACF;CACF;AACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LogRecordExporter, ReadableLogRecord } from "@opentelemetry/sdk-logs";
|
|
2
|
+
import { OTLPExporterBase, OTLPExporterConfigBase } from "@opentelemetry/otlp-exporter-base";
|
|
3
|
+
//#region src/platform/browser/OTLPLogExporter.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Collector Logs Exporter for Web
|
|
6
|
+
*/
|
|
7
|
+
declare class OTLPLogExporter extends OTLPExporterBase<ReadableLogRecord[]> implements LogRecordExporter {
|
|
8
|
+
constructor(config?: OTLPExporterConfigBase);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { OTLPLogExporter };
|
|
12
|
+
//# sourceMappingURL=OTLPLogExporter.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.d.cts","names":[],"sources":["../../../src/platform/browser/OTLPLogExporter.d.ts"],"mappings":";;;;;;cAMqB,wBAAwB,iBAAiB,gCAAgC;EAC1F,YAAY,SAAS"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OTLPExporterBase, OTLPExporterConfigBase } from "@opentelemetry/otlp-exporter-base";
|
|
2
|
+
import { LogRecordExporter, ReadableLogRecord } from "@opentelemetry/sdk-logs";
|
|
3
|
+
//#region src/platform/browser/OTLPLogExporter.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Collector Logs Exporter for Web
|
|
6
|
+
*/
|
|
7
|
+
declare class OTLPLogExporter extends OTLPExporterBase<ReadableLogRecord[]> implements LogRecordExporter {
|
|
8
|
+
constructor(config?: OTLPExporterConfigBase);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { OTLPLogExporter };
|
|
12
|
+
//# sourceMappingURL=OTLPLogExporter.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.d.mts","names":[],"sources":["../../../src/platform/browser/OTLPLogExporter.d.ts"],"mappings":";;;;;;cAMqB,wBAAwB,iBAAiB,gCAAgC;EAC1F,YAAY,SAAS"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER } from "../../semconv.mjs";
|
|
2
|
+
import { OTLPExporterBase } from "@opentelemetry/otlp-exporter-base";
|
|
3
|
+
import { JsonLogsSerializer, LogsExporterMetricsHelper } from "@opentelemetry/otlp-transformer";
|
|
4
|
+
import { createLegacyOtlpBrowserExportDelegate } from "@opentelemetry/otlp-exporter-base/browser-http";
|
|
5
|
+
//#region src/platform/browser/OTLPLogExporter.ts
|
|
6
|
+
/**
|
|
7
|
+
* Collector Logs Exporter for Web
|
|
8
|
+
*/
|
|
9
|
+
var OTLPLogExporter = class extends OTLPExporterBase {
|
|
10
|
+
constructor(config = {}) {
|
|
11
|
+
super(createLegacyOtlpBrowserExportDelegate(config, JsonLogsSerializer, OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER, LogsExporterMetricsHelper, config.selfObsMeterProvider, "v1/logs", { "Content-Type": "application/json" }));
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { OTLPLogExporter };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=OTLPLogExporter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.mjs","names":[],"sources":["../../../src/platform/browser/OTLPLogExporter.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n ReadableLogRecord,\n LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';\nimport {\n JsonLogsSerializer,\n LogsExporterMetricsHelper,\n} from '@opentelemetry/otlp-transformer';\nimport { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http';\n\nimport { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER } from '../../semconv';\n\n/**\n * Collector Logs Exporter for Web\n */\nexport class OTLPLogExporter\n extends OTLPExporterBase<ReadableLogRecord[]>\n implements LogRecordExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(\n createLegacyOtlpBrowserExportDelegate(\n config,\n JsonLogsSerializer,\n OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER,\n LogsExporterMetricsHelper,\n config.selfObsMeterProvider,\n 'v1/logs',\n { 'Content-Type': 'application/json' }\n )\n );\n }\n}\n"],"mappings":";;;;;;;;AAsBA,IAAa,kBAAb,cACU,iBAEV;CACE,YAAY,SAAiC,CAAC,GAAG;EAC/C,MACE,sCACE,QACA,oBACA,kDACA,2BACA,OAAO,sBACP,WACA,EAAE,gBAAgB,mBAAmB,CACvC,CACF;CACF;AACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const require_semconv = require("../../semconv.cjs");
|
|
2
|
+
let _opentelemetry_otlp_exporter_base = require("@opentelemetry/otlp-exporter-base");
|
|
3
|
+
let _opentelemetry_otlp_transformer = require("@opentelemetry/otlp-transformer");
|
|
4
|
+
let _opentelemetry_otlp_exporter_base_node_http = require("@opentelemetry/otlp-exporter-base/node-http");
|
|
5
|
+
//#region src/platform/node/OTLPLogExporter.ts
|
|
6
|
+
/**
|
|
7
|
+
* Collector Logs Exporter for Node
|
|
8
|
+
*/
|
|
9
|
+
var OTLPLogExporter = class extends _opentelemetry_otlp_exporter_base.OTLPExporterBase {
|
|
10
|
+
constructor(config = {}) {
|
|
11
|
+
super((0, _opentelemetry_otlp_exporter_base_node_http.createOtlpHttpExportDelegate)((0, _opentelemetry_otlp_exporter_base_node_http.convertLegacyHttpOptions)(config, "LOGS", "v1/logs", { "Content-Type": "application/json" }), _opentelemetry_otlp_transformer.JsonLogsSerializer, require_semconv.OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER, _opentelemetry_otlp_transformer.LogsExporterMetricsHelper, config.selfObsMeterProvider));
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.OTLPLogExporter = OTLPLogExporter;
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=OTLPLogExporter.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.cjs","names":["OTLPExporterBase","createOtlpHttpExportDelegate","convertLegacyHttpOptions","JsonLogsSerializer","OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER","LogsExporterMetricsHelper"],"sources":["../../../src/platform/node/OTLPLogExporter.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n ReadableLogRecord,\n LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';\nimport {\n JsonLogsSerializer,\n LogsExporterMetricsHelper,\n} from '@opentelemetry/otlp-transformer';\nimport {\n convertLegacyHttpOptions,\n createOtlpHttpExportDelegate,\n} from '@opentelemetry/otlp-exporter-base/node-http';\n\nimport { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER } from '../../semconv';\n\n/**\n * Collector Logs Exporter for Node\n */\nexport class OTLPLogExporter\n extends OTLPExporterBase<ReadableLogRecord[]>\n implements LogRecordExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(\n createOtlpHttpExportDelegate(\n convertLegacyHttpOptions(config, 'LOGS', 'v1/logs', {\n 'Content-Type': 'application/json',\n }),\n JsonLogsSerializer,\n OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER,\n LogsExporterMetricsHelper,\n config.selfObsMeterProvider\n )\n );\n }\n}\n"],"mappings":";;;;;;;;AAyBA,IAAa,kBAAb,cACUA,kCAAAA,iBAEV;CACE,YAAY,SAAqC,CAAC,GAAG;EACnD,OAAA,GACEC,4CAAAA,6BAAAA,EAAAA,GACEC,4CAAAA,yBAAAA,CAAyB,QAAQ,QAAQ,WAAW,EAClD,gBAAgB,mBAClB,CAAC,GACDC,gCAAAA,oBACAC,gBAAAA,kDACAC,gCAAAA,2BACA,OAAO,oBACT,CACF;CACF;AACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LogRecordExporter, ReadableLogRecord } from "@opentelemetry/sdk-logs";
|
|
2
|
+
import { OTLPExporterBase, OTLPExporterNodeConfigBase } from "@opentelemetry/otlp-exporter-base";
|
|
3
|
+
//#region src/platform/node/OTLPLogExporter.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Collector Logs Exporter for Node
|
|
6
|
+
*/
|
|
7
|
+
declare class OTLPLogExporter extends OTLPExporterBase<ReadableLogRecord[]> implements LogRecordExporter {
|
|
8
|
+
constructor(config?: OTLPExporterNodeConfigBase);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { OTLPLogExporter };
|
|
12
|
+
//# sourceMappingURL=OTLPLogExporter.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.d.cts","names":[],"sources":["../../../src/platform/node/OTLPLogExporter.d.ts"],"mappings":";;;;;;cAMqB,wBAAwB,iBAAiB,gCAAgC;EAC1F,YAAY,SAAS"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OTLPExporterBase, OTLPExporterNodeConfigBase } from "@opentelemetry/otlp-exporter-base";
|
|
2
|
+
import { LogRecordExporter, ReadableLogRecord } from "@opentelemetry/sdk-logs";
|
|
3
|
+
//#region src/platform/node/OTLPLogExporter.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Collector Logs Exporter for Node
|
|
6
|
+
*/
|
|
7
|
+
declare class OTLPLogExporter extends OTLPExporterBase<ReadableLogRecord[]> implements LogRecordExporter {
|
|
8
|
+
constructor(config?: OTLPExporterNodeConfigBase);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { OTLPLogExporter };
|
|
12
|
+
//# sourceMappingURL=OTLPLogExporter.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.d.mts","names":[],"sources":["../../../src/platform/node/OTLPLogExporter.d.ts"],"mappings":";;;;;;cAMqB,wBAAwB,iBAAiB,gCAAgC;EAC1F,YAAY,SAAS"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER } from "../../semconv.mjs";
|
|
2
|
+
import { OTLPExporterBase } from "@opentelemetry/otlp-exporter-base";
|
|
3
|
+
import { JsonLogsSerializer, LogsExporterMetricsHelper } from "@opentelemetry/otlp-transformer";
|
|
4
|
+
import { convertLegacyHttpOptions, createOtlpHttpExportDelegate } from "@opentelemetry/otlp-exporter-base/node-http";
|
|
5
|
+
//#region src/platform/node/OTLPLogExporter.ts
|
|
6
|
+
/**
|
|
7
|
+
* Collector Logs Exporter for Node
|
|
8
|
+
*/
|
|
9
|
+
var OTLPLogExporter = class extends OTLPExporterBase {
|
|
10
|
+
constructor(config = {}) {
|
|
11
|
+
super(createOtlpHttpExportDelegate(convertLegacyHttpOptions(config, "LOGS", "v1/logs", { "Content-Type": "application/json" }), JsonLogsSerializer, OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER, LogsExporterMetricsHelper, config.selfObsMeterProvider));
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { OTLPLogExporter };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=OTLPLogExporter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.mjs","names":[],"sources":["../../../src/platform/node/OTLPLogExporter.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n ReadableLogRecord,\n LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';\nimport {\n JsonLogsSerializer,\n LogsExporterMetricsHelper,\n} from '@opentelemetry/otlp-transformer';\nimport {\n convertLegacyHttpOptions,\n createOtlpHttpExportDelegate,\n} from '@opentelemetry/otlp-exporter-base/node-http';\n\nimport { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER } from '../../semconv';\n\n/**\n * Collector Logs Exporter for Node\n */\nexport class OTLPLogExporter\n extends OTLPExporterBase<ReadableLogRecord[]>\n implements LogRecordExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(\n createOtlpHttpExportDelegate(\n convertLegacyHttpOptions(config, 'LOGS', 'v1/logs', {\n 'Content-Type': 'application/json',\n }),\n JsonLogsSerializer,\n OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER,\n LogsExporterMetricsHelper,\n config.selfObsMeterProvider\n )\n );\n }\n}\n"],"mappings":";;;;;;;;AAyBA,IAAa,kBAAb,cACU,iBAEV;CACE,YAAY,SAAqC,CAAC,GAAG;EACnD,MACE,6BACE,yBAAyB,QAAQ,QAAQ,WAAW,EAClD,gBAAgB,mBAClB,CAAC,GACD,oBACA,kDACA,2BACA,OAAO,oBACT,CACF;CACF;AACF"}
|
package/dist/semconv.cjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/semconv.ts
|
|
2
|
+
/**
|
|
3
|
+
* Enum value "otlp_http_log_exporter" for attribute {@link ATTR_OTEL_COMPONENT_TYPE}.
|
|
4
|
+
*
|
|
5
|
+
* OTLP log record exporter over HTTP with protobuf serialization
|
|
6
|
+
*
|
|
7
|
+
* @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
8
|
+
*/
|
|
9
|
+
const OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER = "otlp_http_log_exporter";
|
|
10
|
+
//#endregion
|
|
11
|
+
exports.OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER = OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=semconv.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semconv.cjs","names":[],"sources":["../src/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n/**\n * Enum value \"otlp_http_log_exporter\" for attribute {@link ATTR_OTEL_COMPONENT_TYPE}.\n *\n * OTLP log record exporter over HTTP with protobuf serialization\n *\n * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER =\n 'otlp_http_log_exporter' as const;\n"],"mappings":";;;;;;;;AAkBA,MAAa,mDACX"}
|
package/dist/semconv.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/semconv.ts
|
|
2
|
+
/**
|
|
3
|
+
* Enum value "otlp_http_log_exporter" for attribute {@link ATTR_OTEL_COMPONENT_TYPE}.
|
|
4
|
+
*
|
|
5
|
+
* OTLP log record exporter over HTTP with protobuf serialization
|
|
6
|
+
*
|
|
7
|
+
* @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
8
|
+
*/
|
|
9
|
+
const OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER = "otlp_http_log_exporter";
|
|
10
|
+
//#endregion
|
|
11
|
+
export { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=semconv.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semconv.mjs","names":[],"sources":["../src/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n/**\n * Enum value \"otlp_http_log_exporter\" for attribute {@link ATTR_OTEL_COMPONENT_TYPE}.\n *\n * OTLP log record exporter over HTTP with protobuf serialization\n *\n * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER =\n 'otlp_http_log_exporter' as const;\n"],"mappings":";;;;;;;;AAkBA,MAAa,mDACX"}
|
package/package.json
CHANGED
|
@@ -1,23 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/exporter-logs-otlp-http",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.300.0-development.1",
|
|
4
|
+
"description": "OpenTelemetry Collector Logs Exporter allows user to send collected logs to the OpenTelemetry Collector",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"types": "./dist/index.d.cts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"require": {
|
|
10
|
+
"types": "./dist/index.d.cts",
|
|
11
|
+
"default": "./dist/index.cjs"
|
|
12
|
+
},
|
|
13
|
+
"default": {
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"default": "./dist/index.mjs"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"./platform": {
|
|
19
|
+
"require": {
|
|
20
|
+
"types": "./dist/platform/index.d.cts",
|
|
21
|
+
"default": "./dist/platform/index.cjs"
|
|
22
|
+
},
|
|
23
|
+
"default": {
|
|
24
|
+
"types": "./dist/platform/index.d.mts",
|
|
25
|
+
"default": "./dist/platform/index.mjs"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"./platform/browser": {
|
|
29
|
+
"require": {
|
|
30
|
+
"types": "./dist/platform/browser/index.d.cts",
|
|
31
|
+
"default": "./dist/platform/browser/index.cjs"
|
|
32
|
+
},
|
|
33
|
+
"default": {
|
|
34
|
+
"types": "./dist/platform/browser/index.d.mts",
|
|
35
|
+
"default": "./dist/platform/browser/index.mjs"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"browser": {
|
|
40
|
+
"./dist/platform/node/OTLPLogExporter.mjs": "./dist/platform/browser/OTLPLogExporter.mjs",
|
|
41
|
+
"./dist/platform/node/OTLPLogExporter.cjs": "./dist/platform/browser/OTLPLogExporter.cjs",
|
|
42
|
+
"./dist/platform/index.mjs": "./dist/platform/browser/index.mjs",
|
|
43
|
+
"./dist/platform/index.cjs": "./dist/platform/browser/index.cjs"
|
|
44
|
+
},
|
|
4
45
|
"publishConfig": {
|
|
5
46
|
"access": "public"
|
|
6
47
|
},
|
|
7
|
-
"description": "OpenTelemetry Collector Logs Exporter allows user to send collected logs to the OpenTelemetry Collector",
|
|
8
48
|
"author": "OpenTelemetry Authors",
|
|
9
49
|
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-http",
|
|
10
50
|
"license": "Apache-2.0",
|
|
11
|
-
"main": "build/src/index.js",
|
|
12
|
-
"module": "build/esm/index.js",
|
|
13
|
-
"esnext": "build/esnext/index.js",
|
|
14
|
-
"types": "build/src/index.d.ts",
|
|
15
|
-
"browser": {
|
|
16
|
-
"./src/platform/index.ts": "./src/platform/browser/index.ts",
|
|
17
|
-
"./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
|
|
18
|
-
"./build/esnext/platform/index.js": "./build/esnext/platform/browser/index.js",
|
|
19
|
-
"./build/src/platform/index.js": "./build/src/platform/browser/index.js"
|
|
20
|
-
},
|
|
21
51
|
"repository": {
|
|
22
52
|
"type": "git",
|
|
23
53
|
"url": "git+https://github.com/open-telemetry/opentelemetry-js.git"
|
|
@@ -26,12 +56,12 @@
|
|
|
26
56
|
"url": "https://github.com/open-telemetry/opentelemetry-js/issues"
|
|
27
57
|
},
|
|
28
58
|
"engines": {
|
|
29
|
-
"node": "
|
|
59
|
+
"node": ">=22.15.0"
|
|
30
60
|
},
|
|
31
61
|
"scripts": {
|
|
32
62
|
"prepublishOnly": "npm run compile",
|
|
33
|
-
"compile": "
|
|
34
|
-
"clean": "
|
|
63
|
+
"compile": "tsdown",
|
|
64
|
+
"clean": "rimraf dist build",
|
|
35
65
|
"lint": "eslint .",
|
|
36
66
|
"lint:fix": "eslint . --fix",
|
|
37
67
|
"tdd": "npm run test -- --watch-extensions ts --watch",
|
|
@@ -39,10 +69,9 @@
|
|
|
39
69
|
"test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
|
|
40
70
|
"test:browser": "karma start --single-run",
|
|
41
71
|
"version": "node ../../../scripts/version-update.js",
|
|
42
|
-
"watch": "
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"align-api-deps": "node ../../../scripts/align-api-deps.js"
|
|
72
|
+
"watch": "tsdown --watch --no-clean",
|
|
73
|
+
"peer-api-check": "node ../../../scripts/peer-api-check.mjs",
|
|
74
|
+
"align-api-deps": "node ../../../scripts/align-api-deps.mjs"
|
|
46
75
|
},
|
|
47
76
|
"keywords": [
|
|
48
77
|
"opentelemetry",
|
|
@@ -54,25 +83,17 @@
|
|
|
54
83
|
"stats"
|
|
55
84
|
],
|
|
56
85
|
"files": [
|
|
57
|
-
"build/esm/**/*.js",
|
|
58
|
-
"build/esm/**/*.js.map",
|
|
59
|
-
"build/esm/**/*.d.ts",
|
|
60
|
-
"build/esnext/**/*.js",
|
|
61
|
-
"build/esnext/**/*.js.map",
|
|
62
|
-
"build/esnext/**/*.d.ts",
|
|
63
|
-
"build/src/**/*.js",
|
|
64
|
-
"build/src/**/*.js.map",
|
|
65
|
-
"build/src/**/*.d.ts",
|
|
66
86
|
"doc",
|
|
67
87
|
"LICENSE",
|
|
68
|
-
"README.md"
|
|
88
|
+
"README.md",
|
|
89
|
+
"dist"
|
|
69
90
|
],
|
|
70
91
|
"sideEffects": false,
|
|
71
92
|
"devDependencies": {
|
|
72
93
|
"@babel/core": "7.29.7",
|
|
73
94
|
"@babel/preset-env": "7.29.7",
|
|
74
|
-
"@opentelemetry/api": "1.
|
|
75
|
-
"@opentelemetry/resources": "
|
|
95
|
+
"@opentelemetry/api": "1.10.0-development.1",
|
|
96
|
+
"@opentelemetry/resources": "3.0.0-development.1",
|
|
76
97
|
"@types/mocha": "10.0.10",
|
|
77
98
|
"@types/node": "18.19.130",
|
|
78
99
|
"@types/sinon": "17.0.4",
|
|
@@ -83,23 +104,23 @@
|
|
|
83
104
|
"karma-chrome-launcher": "3.2.0",
|
|
84
105
|
"karma-coverage": "2.2.1",
|
|
85
106
|
"karma-mocha": "2.0.1",
|
|
86
|
-
"karma-spec-reporter": "0.0.
|
|
107
|
+
"karma-spec-reporter": "0.0.37",
|
|
87
108
|
"karma-webpack": "5.0.1",
|
|
88
109
|
"mocha": "11.8.0",
|
|
89
|
-
"nyc": "
|
|
110
|
+
"nyc": "18.0.0",
|
|
90
111
|
"sinon": "18.0.1",
|
|
91
112
|
"ts-loader": "9.5.7",
|
|
92
113
|
"typescript": "5.2.2",
|
|
93
114
|
"webpack": "5.108.4",
|
|
94
|
-
"webpack-cli": "7.2.
|
|
115
|
+
"webpack-cli": "7.2.3"
|
|
95
116
|
},
|
|
96
117
|
"peerDependencies": {
|
|
97
|
-
"@opentelemetry/api": "^1.3.0"
|
|
118
|
+
"@opentelemetry/api": "^1.3.0 || 1.10.0-development.1"
|
|
98
119
|
},
|
|
99
120
|
"dependencies": {
|
|
100
|
-
"@opentelemetry/otlp-exporter-base": "0.
|
|
101
|
-
"@opentelemetry/otlp-transformer": "0.
|
|
102
|
-
"@opentelemetry/sdk-logs": "0.
|
|
121
|
+
"@opentelemetry/otlp-exporter-base": "0.300.0-development.1",
|
|
122
|
+
"@opentelemetry/otlp-transformer": "0.300.0-development.1",
|
|
123
|
+
"@opentelemetry/sdk-logs": "0.300.0-development.1"
|
|
103
124
|
},
|
|
104
|
-
"gitHead": "
|
|
125
|
+
"gitHead": "83d76963961161511591d5585407d23b5f035a37"
|
|
105
126
|
}
|
package/build/esm/index.d.ts
DELETED
package/build/esm/index.js
DELETED
package/build/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { OTLPLogExporter } from './platform';\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ReadableLogRecord, LogRecordExporter } from '@opentelemetry/sdk-logs';
|
|
2
|
-
import type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
3
|
-
import { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
|
|
4
|
-
/**
|
|
5
|
-
* Collector Logs Exporter for Web
|
|
6
|
-
*/
|
|
7
|
-
export declare class OTLPLogExporter extends OTLPExporterBase<ReadableLogRecord[]> implements LogRecordExporter {
|
|
8
|
-
constructor(config?: OTLPExporterConfigBase);
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
|
|
6
|
-
import { JsonLogsSerializer, LogsExporterMetricsHelper, } from '@opentelemetry/otlp-transformer';
|
|
7
|
-
import { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http';
|
|
8
|
-
import { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER } from '../../semconv';
|
|
9
|
-
/**
|
|
10
|
-
* Collector Logs Exporter for Web
|
|
11
|
-
*/
|
|
12
|
-
export class OTLPLogExporter extends OTLPExporterBase {
|
|
13
|
-
constructor(config = {}) {
|
|
14
|
-
super(createLegacyOtlpBrowserExportDelegate(config, JsonLogsSerializer, OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER, LogsExporterMetricsHelper, config.selfObsMeterProvider, 'v1/logs', { 'Content-Type': 'application/json' }));
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=OTLPLogExporter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/browser/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EACL,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,qCAAqC,EAAE,MAAM,gDAAgD,CAAC;AAEvG,OAAO,EAAE,gDAAgD,EAAE,MAAM,eAAe,CAAC;AAEjF;;GAEG;AACH,MAAM,OAAO,eACX,SAAQ,gBAAqC;IAG7C,YAAY,SAAiC,EAAE;QAC7C,KAAK,CACH,qCAAqC,CACnC,MAAM,EACN,kBAAkB,EAClB,gDAAgD,EAChD,yBAAyB,EACzB,MAAM,CAAC,oBAAoB,EAC3B,SAAS,EACT,EAAE,cAAc,EAAE,kBAAkB,EAAE,CACvC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n ReadableLogRecord,\n LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';\nimport {\n JsonLogsSerializer,\n LogsExporterMetricsHelper,\n} from '@opentelemetry/otlp-transformer';\nimport { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http';\n\nimport { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER } from '../../semconv';\n\n/**\n * Collector Logs Exporter for Web\n */\nexport class OTLPLogExporter\n extends OTLPExporterBase<ReadableLogRecord[]>\n implements LogRecordExporter\n{\n constructor(config: OTLPExporterConfigBase = {}) {\n super(\n createLegacyOtlpBrowserExportDelegate(\n config,\n JsonLogsSerializer,\n OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER,\n LogsExporterMetricsHelper,\n config.selfObsMeterProvider,\n 'v1/logs',\n { 'Content-Type': 'application/json' }\n )\n );\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { OTLPLogExporter } from './OTLPLogExporter';\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { OTLPLogExporter } from './node';\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ReadableLogRecord, LogRecordExporter } from '@opentelemetry/sdk-logs';
|
|
2
|
-
import type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';
|
|
3
|
-
import { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
|
|
4
|
-
/**
|
|
5
|
-
* Collector Logs Exporter for Node
|
|
6
|
-
*/
|
|
7
|
-
export declare class OTLPLogExporter extends OTLPExporterBase<ReadableLogRecord[]> implements LogRecordExporter {
|
|
8
|
-
constructor(config?: OTLPExporterNodeConfigBase);
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=OTLPLogExporter.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright The OpenTelemetry Authors
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';
|
|
6
|
-
import { JsonLogsSerializer, LogsExporterMetricsHelper, } from '@opentelemetry/otlp-transformer';
|
|
7
|
-
import { convertLegacyHttpOptions, createOtlpHttpExportDelegate, } from '@opentelemetry/otlp-exporter-base/node-http';
|
|
8
|
-
import { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER } from '../../semconv';
|
|
9
|
-
/**
|
|
10
|
-
* Collector Logs Exporter for Node
|
|
11
|
-
*/
|
|
12
|
-
export class OTLPLogExporter extends OTLPExporterBase {
|
|
13
|
-
constructor(config = {}) {
|
|
14
|
-
super(createOtlpHttpExportDelegate(convertLegacyHttpOptions(config, 'LOGS', 'v1/logs', {
|
|
15
|
-
'Content-Type': 'application/json',
|
|
16
|
-
}), JsonLogsSerializer, OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER, LogsExporterMetricsHelper, config.selfObsMeterProvider));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=OTLPLogExporter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.js","sourceRoot":"","sources":["../../../../src/platform/node/OTLPLogExporter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EACL,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,gDAAgD,EAAE,MAAM,eAAe,CAAC;AAEjF;;GAEG;AACH,MAAM,OAAO,eACX,SAAQ,gBAAqC;IAG7C,YAAY,SAAqC,EAAE;QACjD,KAAK,CACH,4BAA4B,CAC1B,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE;YAClD,cAAc,EAAE,kBAAkB;SACnC,CAAC,EACF,kBAAkB,EAClB,gDAAgD,EAChD,yBAAyB,EACzB,MAAM,CAAC,oBAAoB,CAC5B,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n ReadableLogRecord,\n LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';\nimport {\n JsonLogsSerializer,\n LogsExporterMetricsHelper,\n} from '@opentelemetry/otlp-transformer';\nimport {\n convertLegacyHttpOptions,\n createOtlpHttpExportDelegate,\n} from '@opentelemetry/otlp-exporter-base/node-http';\n\nimport { OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER } from '../../semconv';\n\n/**\n * Collector Logs Exporter for Node\n */\nexport class OTLPLogExporter\n extends OTLPExporterBase<ReadableLogRecord[]>\n implements LogRecordExporter\n{\n constructor(config: OTLPExporterNodeConfigBase = {}) {\n super(\n createOtlpHttpExportDelegate(\n convertLegacyHttpOptions(config, 'LOGS', 'v1/logs', {\n 'Content-Type': 'application/json',\n }),\n JsonLogsSerializer,\n OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER,\n LogsExporterMetricsHelper,\n config.selfObsMeterProvider\n )\n );\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { OTLPLogExporter } from './OTLPLogExporter';\n"]}
|
package/build/esm/semconv.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enum value "otlp_http_log_exporter" for attribute {@link ATTR_OTEL_COMPONENT_TYPE}.
|
|
3
|
-
*
|
|
4
|
-
* OTLP log record exporter over HTTP with protobuf serialization
|
|
5
|
-
*
|
|
6
|
-
* @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
7
|
-
*/
|
|
8
|
-
export declare const OTEL_COMPONENT_TYPE_VALUE_OTLP_HTTP_LOG_EXPORTER: "otlp_http_log_exporter";
|
|
9
|
-
//# sourceMappingURL=semconv.d.ts.map
|