diff --git a/src/lib/consts.ts b/src/lib/consts.ts index cb479e3..eb0919c 100644 --- a/src/lib/consts.ts +++ b/src/lib/consts.ts @@ -1,5 +1,6 @@ export const REQUEST_ID_HEADER = 'x-request-id'; export const REQUEST_ID_PARAM_NAME = 'requestId'; export const USER_ID_PARAM_NAME = 'userId'; +export const USER_LANGUAGE_PARAM_NAME = 'userLang'; export const TRACE_KEY = 'uber-trace-id'; export const REDACTED_STRING = '[REDACTED]'; diff --git a/src/types.ts b/src/types.ts index 44c2213..672d5c7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,6 +1,6 @@ import type {pino} from 'pino'; -import {REQUEST_ID_PARAM_NAME, USER_ID_PARAM_NAME} from './lib/consts'; +import {REQUEST_ID_PARAM_NAME, USER_ID_PARAM_NAME, USER_LANGUAGE_PARAM_NAME} from './lib/consts'; import type {LoggingLevel} from './lib/logging'; export interface AppConfig { @@ -47,6 +47,7 @@ export interface AppConfig { export interface AppContextParams { [REQUEST_ID_PARAM_NAME]?: string; [USER_ID_PARAM_NAME]?: string; + [USER_LANGUAGE_PARAM_NAME]?: string; } export interface AppDynamicConfig {}