Skip to content

Commit f5ea0d6

Browse files
feat(api-service): Log API Service level in NewRelic
Allow us to correlate logs to customers faster.
1 parent cdfc464 commit f5ea0d6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.source

libs/application-generic/src/logging/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { NestInterceptor, RequestMethod } from '@nestjs/common';
22
import { getLoggerToken, Logger, LoggerErrorInterceptor, LoggerModule, Params, PinoLogger } from 'nestjs-pino';
33
import { storage, Store } from 'nestjs-pino/storage';
4+
import { ApiServiceLevelEnum } from '@novu/shared';
45
import { sensitiveFields } from './masking';
56

67
export * from './LogDecorator';
@@ -120,6 +121,7 @@ export function createNestLoggingModuleOptions(settings: ILoggerSettings): Param
120121
userId: req?.user?._id || null,
121122
environmentId: req?.user?.environmentId || null,
122123
organizationId: req?.user?.organizationId || null,
124+
apiServiceLevel: req?.user?.apiServiceLevel || null,
123125
},
124126
authScheme: req?.authScheme,
125127
rateLimitPolicy: res?.rateLimitPolicy,

0 commit comments

Comments
 (0)