otlp-logger 1.1.4 → 1.1.6
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/package.json +11 -11
- package/types/create-log-processor.d.ts +5 -5
- package/types/otlp-logger.d.ts +2 -2
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ service:
|
|
|
96
96
|
The collector can then be ran with:
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
|
-
docker run --volume=$(pwd)/otel-collector-config.yaml:/etc/otel-collector-config.yaml:rw --volume=/tmp/test-logs:/etc/test-logs:rw -p 4317:4317 -d otel/opentelemetry-collector-contrib:
|
|
99
|
+
docker run --volume=$(pwd)/otel-collector-config.yaml:/etc/otel-collector-config.yaml:rw --volume=/tmp/test-logs:/etc/test-logs:rw -p 4317:4317 -d otel/opentelemetry-collector-contrib:0.103.1 --config=/etc/otel-collector-config.yaml
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
Create an index.js file containing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "otlp-logger",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Exports logs to OpenTelemetry Collector using OTLP protocol",
|
|
5
5
|
"main": "lib/otlp-logger.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,27 +17,27 @@
|
|
|
17
17
|
"repository": "github:Vunovati/otlp-logger",
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@opentelemetry/api-logs": "^0.
|
|
21
|
-
"@opentelemetry/exporter-logs-otlp-grpc": "^0.
|
|
22
|
-
"@opentelemetry/exporter-logs-otlp-http": "^0.
|
|
23
|
-
"@opentelemetry/exporter-logs-otlp-proto": "^0.
|
|
20
|
+
"@opentelemetry/api-logs": "^0.53.0",
|
|
21
|
+
"@opentelemetry/exporter-logs-otlp-grpc": "^0.53.0",
|
|
22
|
+
"@opentelemetry/exporter-logs-otlp-http": "^0.53.0",
|
|
23
|
+
"@opentelemetry/exporter-logs-otlp-proto": "^0.53.0",
|
|
24
24
|
"@opentelemetry/resources": "^1.17.0",
|
|
25
|
-
"@opentelemetry/sdk-logs": "^0.
|
|
25
|
+
"@opentelemetry/sdk-logs": "^0.53.0"
|
|
26
26
|
},
|
|
27
27
|
"types": "./types/otlp-logger.d.ts",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@commitlint/cli": "^19.0.3",
|
|
30
30
|
"@commitlint/config-conventional": "^19.0.3",
|
|
31
31
|
"@opentelemetry/api": "^1.4.1",
|
|
32
|
-
"@opentelemetry/instrumentation-http": "^0.
|
|
33
|
-
"@opentelemetry/sdk-node": "^0.
|
|
34
|
-
"@tapjs/sinon": "^
|
|
35
|
-
"@types/node": "^
|
|
32
|
+
"@opentelemetry/instrumentation-http": "^0.53.0",
|
|
33
|
+
"@opentelemetry/sdk-node": "^0.53.0",
|
|
34
|
+
"@tapjs/sinon": "^3.0.0",
|
|
35
|
+
"@types/node": "^22.2.0",
|
|
36
36
|
"husky": "^9.0.10",
|
|
37
37
|
"require-inject": "^1.4.4",
|
|
38
38
|
"snazzy": "^9.0.0",
|
|
39
39
|
"standard": "^17.1.0",
|
|
40
|
-
"tap": "^
|
|
40
|
+
"tap": "^21.0.0",
|
|
41
41
|
"tar-stream": "^3.1.6",
|
|
42
42
|
"testcontainers": "^10.2.1",
|
|
43
43
|
"tsd": "^0.31.0",
|
|
@@ -5,19 +5,19 @@ export type LogRecordProcessorOptions = {
|
|
|
5
5
|
*/
|
|
6
6
|
recordProcessorType: RecordProcessorType;
|
|
7
7
|
exporterOptions?: ExporterOptions;
|
|
8
|
-
processorConfig?: import(
|
|
8
|
+
processorConfig?: import("@opentelemetry/sdk-logs").BufferConfig;
|
|
9
9
|
};
|
|
10
10
|
export type GrpcExporterOptions = {
|
|
11
11
|
protocol: "grpc";
|
|
12
|
-
grpcExporterOptions?: import(
|
|
12
|
+
grpcExporterOptions?: import("@opentelemetry/otlp-grpc-exporter-base").OTLPGRPCExporterConfigNode;
|
|
13
13
|
};
|
|
14
14
|
export type HttpExporterOptions = {
|
|
15
15
|
protocol: "http";
|
|
16
|
-
httpExporterOptions?: import(
|
|
16
|
+
httpExporterOptions?: import("@opentelemetry/otlp-exporter-base").OTLPExporterNodeConfigBase;
|
|
17
17
|
};
|
|
18
18
|
export type ProtobufExporterOptions = {
|
|
19
19
|
protocol: "http/protobuf";
|
|
20
|
-
protobufExporterOptions?: import(
|
|
20
|
+
protobufExporterOptions?: import("@opentelemetry/otlp-exporter-base").OTLPExporterNodeConfigBase;
|
|
21
21
|
};
|
|
22
22
|
export type ConsoleExporterOptions = {
|
|
23
23
|
protocol: "console";
|
|
@@ -33,5 +33,5 @@ export type ExporterOptions = GrpcExporterOptions | HttpExporterOptions | Protob
|
|
|
33
33
|
* @param {LogRecordProcessorOptions} [opts]
|
|
34
34
|
* @returns {import('@opentelemetry/sdk-logs').LogRecordProcessor}
|
|
35
35
|
*/
|
|
36
|
-
export function createLogProcessor(opts?: LogRecordProcessorOptions): import(
|
|
36
|
+
export function createLogProcessor(opts?: LogRecordProcessorOptions): import("@opentelemetry/sdk-logs").LogRecordProcessor;
|
|
37
37
|
//# sourceMappingURL=create-log-processor.d.ts.map
|
package/types/otlp-logger.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type Options = {
|
|
2
2
|
loggerName: string;
|
|
3
3
|
serviceVersion: string;
|
|
4
|
-
logRecordProcessorOptions?: import(
|
|
4
|
+
logRecordProcessorOptions?: import("./create-log-processor").LogRecordProcessorOptions | import("./create-log-processor").LogRecordProcessorOptions[];
|
|
5
5
|
resourceAttributes?: any;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
@@ -17,7 +17,7 @@ export function getOtlpLogger(opts: Options): {
|
|
|
17
17
|
/**
|
|
18
18
|
* @param {import('@opentelemetry/api-logs').LogRecord} obj
|
|
19
19
|
*/
|
|
20
|
-
emit(obj: import(
|
|
20
|
+
emit(obj: import("@opentelemetry/api-logs").LogRecord): void;
|
|
21
21
|
shutdown(): Promise<void>;
|
|
22
22
|
};
|
|
23
23
|
//# sourceMappingURL=otlp-logger.d.ts.map
|