CorrelationDecoratorOptions
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
Defined in: decorators/with-correlation.decorator.ts:24
Options for the WithCorrelation decorator.
Properties
Section titled “Properties”extract?
Section titled “extract?”
optionalextract?:CorrelationExtractor
Defined in: decorators/with-correlation.decorator.ts:52
Custom extractor function. Receives all method arguments.
Takes precedence over path.
Example
Section titled “Example”logger?
Section titled “logger?”
optionallogger?:CorrelationLogger
Defined in: decorators/with-correlation.decorator.ts:92
Logger to write through instead of the decorated instance’s logger property or
console.
Accepts any object with the methods of CorrelationLogger (e.g. a Pino or Winston adapter).
Example
Section titled “Example”logLevel?
Section titled “logLevel?”
optionallogLevel?:LogLevel|"none"
Defined in: decorators/with-correlation.decorator.ts:77
Log level for the start of the method execution.
- Any LogLevel value routes to the logger method of that name (
'log','debug','verbose','warn','error'). 'none'suppresses the log message entirely.
A pino-backed logger maps the levels as 'verbose' → trace, 'debug' → debug,
'log' → info, 'warn' → warn, 'error' → error, 'fatal' → fatal.
Default
Section titled “Default”Example
Section titled “Example”
optionalpath?:string
Defined in: decorators/with-correlation.decorator.ts:36
Property path (dot-notation) to the correlation ID in the first argument.
- For Bull:
'data.correlationId'(default) - For a flat object:
'correlationId' - For deeply nested:
'metadata.tracing.correlationId'
Ignored when extract is provided.