@opentelemetry/exporter-logs-otlp-http 0.300.0-development.0 → 0.300.0-rc.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/README.md +2 -2
- package/dist/index.cjs +7 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/platform/node/OTLPLogExporter.cjs.map +1 -1
- package/dist/platform/node/OTLPLogExporter.d.cts +2 -1
- package/dist/platform/node/OTLPLogExporter.d.cts.map +1 -1
- package/dist/platform/node/OTLPLogExporter.d.mts +2 -1
- package/dist/platform/node/OTLPLogExporter.d.mts.map +1 -1
- package/dist/platform/node/OTLPLogExporter.mjs.map +1 -1
- package/dist/platform/{index.cjs → node/index.cjs} +1 -1
- package/dist/platform/node/index.mjs +2 -0
- package/package.json +26 -39
- package/dist/platform/index.d.cts +0 -3
- package/dist/platform/index.d.mts +0 -3
- package/dist/platform/index.mjs +0 -2
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,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
} from '@opentelemetry/sdk-logs';
|
|
66
66
|
import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http';
|
|
67
67
|
|
|
68
|
-
// exporter options. see all options in OTLPExporterNodeConfigBase
|
|
68
|
+
// exporter options. see all options in OTLPExporterNodeConfigBase from @opentelemetry/otlp-exporter-base/node-http
|
|
69
69
|
const collectorOptions = {
|
|
70
70
|
url: '<opentelemetry-collector-url>', // url is optional and can be omitted - default is http://localhost:4318/v1/logs
|
|
71
71
|
concurrencyLimit: 1, // an optional limit on pending requests
|
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
3
|
-
exports
|
|
2
|
+
let _platform = require("#platform");
|
|
3
|
+
Object.defineProperty(exports, "OTLPLogExporter", {
|
|
4
|
+
enumerable: true,
|
|
5
|
+
get: function() {
|
|
6
|
+
return _platform.OTLPLogExporter;
|
|
7
|
+
}
|
|
8
|
+
});
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { OTLPLogExporter } from "
|
|
1
|
+
import { OTLPLogExporter } from "#platform";
|
|
2
2
|
export { OTLPLogExporter };
|
|
@@ -1 +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"}
|
|
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/node-http';\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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LogRecordExporter, ReadableLogRecord } from "@opentelemetry/sdk-logs";
|
|
2
|
-
import {
|
|
2
|
+
import { OTLPExporterNodeConfigBase } from "@opentelemetry/otlp-exporter-base/node-http";
|
|
3
|
+
import { OTLPExporterBase } from "@opentelemetry/otlp-exporter-base";
|
|
3
4
|
//#region src/platform/node/OTLPLogExporter.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Collector Logs Exporter for Node
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.d.cts","names":[],"sources":["../../../src/platform/node/OTLPLogExporter.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.d.cts","names":[],"sources":["../../../src/platform/node/OTLPLogExporter.d.ts"],"mappings":";;;;;;;cAMqB,wBAAwB,iBAAiB,gCAAgC;EAC1F,YAAY,SAAS"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { OTLPExporterBase
|
|
1
|
+
import { OTLPExporterBase } from "@opentelemetry/otlp-exporter-base";
|
|
2
|
+
import { OTLPExporterNodeConfigBase } from "@opentelemetry/otlp-exporter-base/node-http";
|
|
2
3
|
import { LogRecordExporter, ReadableLogRecord } from "@opentelemetry/sdk-logs";
|
|
3
4
|
//#region src/platform/node/OTLPLogExporter.d.ts
|
|
4
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OTLPLogExporter.d.mts","names":[],"sources":["../../../src/platform/node/OTLPLogExporter.d.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"OTLPLogExporter.d.mts","names":[],"sources":["../../../src/platform/node/OTLPLogExporter.d.ts"],"mappings":";;;;;;;cAMqB,wBAAwB,iBAAiB,gCAAgC;EAC1F,YAAY,SAAS"}
|
|
@@ -1 +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"}
|
|
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/node-http';\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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_OTLPLogExporter = require("./
|
|
2
|
+
const require_OTLPLogExporter = require("./OTLPLogExporter.cjs");
|
|
3
3
|
exports.OTLPLogExporter = require_OTLPLogExporter.OTLPLogExporter;
|
package/package.json
CHANGED
|
@@ -1,47 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentelemetry/exporter-logs-otlp-http",
|
|
3
|
-
"version": "0.300.0-
|
|
3
|
+
"version": "0.300.0-rc.0",
|
|
4
4
|
"description": "OpenTelemetry Collector Logs Exporter allows user to send collected logs to the OpenTelemetry Collector",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
|
-
"module": "./dist/index.mjs",
|
|
7
6
|
"types": "./dist/index.d.cts",
|
|
8
7
|
"exports": {
|
|
9
8
|
".": {
|
|
10
|
-
"import": {
|
|
11
|
-
"types": "./dist/index.d.mts",
|
|
12
|
-
"default": "./dist/index.mjs"
|
|
13
|
-
},
|
|
14
9
|
"require": {
|
|
15
10
|
"types": "./dist/index.d.cts",
|
|
16
11
|
"default": "./dist/index.cjs"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"./platform": {
|
|
20
|
-
"import": {
|
|
21
|
-
"types": "./dist/platform/index.d.mts",
|
|
22
|
-
"default": "./dist/platform/index.mjs"
|
|
23
|
-
},
|
|
24
|
-
"require": {
|
|
25
|
-
"types": "./dist/platform/index.d.cts",
|
|
26
|
-
"default": "./dist/platform/index.cjs"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"./platform/browser": {
|
|
30
|
-
"import": {
|
|
31
|
-
"types": "./dist/platform/browser/index.d.mts",
|
|
32
|
-
"default": "./dist/platform/browser/index.mjs"
|
|
33
12
|
},
|
|
34
|
-
"
|
|
35
|
-
"types": "./dist/
|
|
36
|
-
"default": "./dist/
|
|
13
|
+
"default": {
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"default": "./dist/index.mjs"
|
|
37
16
|
}
|
|
38
17
|
}
|
|
39
18
|
},
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
19
|
+
"imports": {
|
|
20
|
+
"#platform": {
|
|
21
|
+
"otel": {
|
|
22
|
+
"node": "./src/platform/node/index.ts",
|
|
23
|
+
"default": "./src/platform/browser/index.ts"
|
|
24
|
+
},
|
|
25
|
+
"node": {
|
|
26
|
+
"require": "./dist/platform/node/index.cjs",
|
|
27
|
+
"default": "./dist/platform/node/index.mjs"
|
|
28
|
+
},
|
|
29
|
+
"require": "./dist/platform/browser/index.cjs",
|
|
30
|
+
"default": "./dist/platform/browser/index.mjs"
|
|
31
|
+
}
|
|
45
32
|
},
|
|
46
33
|
"publishConfig": {
|
|
47
34
|
"access": "public"
|
|
@@ -93,8 +80,8 @@
|
|
|
93
80
|
"devDependencies": {
|
|
94
81
|
"@babel/core": "7.29.7",
|
|
95
82
|
"@babel/preset-env": "7.29.7",
|
|
96
|
-
"@opentelemetry/api": "1.
|
|
97
|
-
"@opentelemetry/resources": "3.0.0-
|
|
83
|
+
"@opentelemetry/api": "1.10.0-rc.0",
|
|
84
|
+
"@opentelemetry/resources": "3.0.0-rc.0",
|
|
98
85
|
"@types/mocha": "10.0.10",
|
|
99
86
|
"@types/node": "18.19.130",
|
|
100
87
|
"@types/sinon": "17.0.4",
|
|
@@ -107,8 +94,8 @@
|
|
|
107
94
|
"karma-mocha": "2.0.1",
|
|
108
95
|
"karma-spec-reporter": "0.0.37",
|
|
109
96
|
"karma-webpack": "5.0.1",
|
|
110
|
-
"mocha": "
|
|
111
|
-
"nyc": "
|
|
97
|
+
"mocha": "12.0.3",
|
|
98
|
+
"nyc": "18.0.0",
|
|
112
99
|
"sinon": "18.0.1",
|
|
113
100
|
"ts-loader": "9.5.7",
|
|
114
101
|
"typescript": "5.2.2",
|
|
@@ -116,12 +103,12 @@
|
|
|
116
103
|
"webpack-cli": "7.2.3"
|
|
117
104
|
},
|
|
118
105
|
"peerDependencies": {
|
|
119
|
-
"@opentelemetry/api": "^1.3.0"
|
|
106
|
+
"@opentelemetry/api": "^1.3.0 || 1.10.0-rc.0"
|
|
120
107
|
},
|
|
121
108
|
"dependencies": {
|
|
122
|
-
"@opentelemetry/otlp-exporter-base": "0.300.0-
|
|
123
|
-
"@opentelemetry/otlp-transformer": "0.300.0-
|
|
124
|
-
"@opentelemetry/sdk-logs": "0.
|
|
109
|
+
"@opentelemetry/otlp-exporter-base": "0.300.0-rc.0",
|
|
110
|
+
"@opentelemetry/otlp-transformer": "0.300.0-rc.0",
|
|
111
|
+
"@opentelemetry/sdk-logs": "3.0.0-rc.0"
|
|
125
112
|
},
|
|
126
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "fc3902d5304276e24601f243a1c065031ab81f6b"
|
|
127
114
|
}
|
package/dist/platform/index.mjs
DELETED