xcally-nest-library 0.0.18 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/modules/logger/pino/logger.module.d.ts +0 -1
- package/dist/src/modules/logger/pino/logger.module.js +0 -23
- package/dist/src/modules/logger/pino/logger.module.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -3
- package/src/modules/logger/pino/logger.module.ts +1 -38
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "xcally-nest-library",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.19",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -39,13 +39,11 @@
|
|
39
39
|
"class-transformer": "^0.5.1",
|
40
40
|
"class-validator": "^0.14.1",
|
41
41
|
"datadog-winston": "^1.6.0",
|
42
|
-
"dotenv": "^16.4.5",
|
43
42
|
"nest-winston": "^1.9.4",
|
44
43
|
"nestjs-grpc-exceptions": "^0.2.2",
|
45
44
|
"nestjs-paginate": "^8.6.2",
|
46
45
|
"nestjs-pino": "^4.1.0",
|
47
46
|
"pino": "^9.4.0",
|
48
|
-
"pino-opentelemetry-transport": "^1.0.1",
|
49
47
|
"pino-pretty": "^11.2.2",
|
50
48
|
"reflect-metadata": "^0.2.2",
|
51
49
|
"rxjs": "^7.8.1",
|
@@ -2,40 +2,7 @@ import { DynamicModule, Global, Module } from '@nestjs/common';
|
|
2
2
|
import { ConfigModule, ConfigService } from '@nestjs/config';
|
3
3
|
import { LoggerModule as LoggerModulePino } from 'nestjs-pino';
|
4
4
|
import { LoggerService } from './logger.service';
|
5
|
-
|
6
|
-
import type { Options } from 'pino-opentelemetry-transport';
|
7
|
-
const options: Options = {
|
8
|
-
resourceAttributes: {
|
9
|
-
'service.name': process.env.npm_package_name || 'unknown',
|
10
|
-
// 'service.version': process.env.npm_package_version || '1.0.0',
|
11
|
-
},
|
12
|
-
logRecordProcessorOptions: [
|
13
|
-
{
|
14
|
-
recordProcessorType: 'batch',
|
15
|
-
exporterOptions: {
|
16
|
-
protocol: 'http',
|
17
|
-
httpExporterOptions: {
|
18
|
-
url: new URL('v1/logs', process.env.OTLP_HTTP_URL || 'http://localhost:4318/').toString(),
|
19
|
-
},
|
20
|
-
},
|
21
|
-
},
|
22
|
-
// {
|
23
|
-
// recordProcessorType: 'batch',
|
24
|
-
// exporterOptions: {
|
25
|
-
// protocol: 'grpc',
|
26
|
-
// grpcExporterOptions: {
|
27
|
-
// headers: { foo: 'some custom header' },
|
28
|
-
// },
|
29
|
-
// },
|
30
|
-
// },
|
31
|
-
// {
|
32
|
-
// recordProcessorType: 'simple',
|
33
|
-
// exporterOptions: { protocol: 'console' },
|
34
|
-
// },
|
35
|
-
],
|
36
|
-
loggerName: (process.env.npm_package_name || 'unknown') + '-logger',
|
37
|
-
serviceVersion: process.env.npm_package_version || 'unknown',
|
38
|
-
};
|
5
|
+
|
39
6
|
@Global()
|
40
7
|
@Module({})
|
41
8
|
export class LoggerModule {
|
@@ -68,10 +35,6 @@ export class LoggerModule {
|
|
68
35
|
},
|
69
36
|
transport: {
|
70
37
|
targets: [
|
71
|
-
{
|
72
|
-
target: 'pino-opentelemetry-transport',
|
73
|
-
options,
|
74
|
-
},
|
75
38
|
{
|
76
39
|
level: 'debug',
|
77
40
|
target: 'pino-pretty',
|