diff --git a/src/lib/consts.ts b/src/lib/consts.ts index b12c901..4bae878 100644 --- a/src/lib/consts.ts +++ b/src/lib/consts.ts @@ -1,3 +1,4 @@ export const REQUEST_ID_HEADER = 'x-request-id'; export const REQUEST_ID_PARAM_NAME = 'requestId'; +export const USER_ID_PARAM_NAME = 'userId'; export const TRACE_KEY = 'uber-trace-id'; diff --git a/src/types.ts b/src/types.ts index ed516d1..44c2213 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,6 +1,6 @@ import type {pino} from 'pino'; -import {REQUEST_ID_PARAM_NAME} from './lib/consts'; +import {REQUEST_ID_PARAM_NAME, USER_ID_PARAM_NAME} from './lib/consts'; import type {LoggingLevel} from './lib/logging'; export interface AppConfig { @@ -46,6 +46,7 @@ export interface AppConfig { export interface AppContextParams { [REQUEST_ID_PARAM_NAME]?: string; + [USER_ID_PARAM_NAME]?: string; } export interface AppDynamicConfig {}