commit 2 refactor
This commit is contained in:
parent
588f666943
commit
32e43c9243
310 changed files with 33318 additions and 31189 deletions
|
|
@ -14,14 +14,14 @@ export interface OperationContextOptions {
|
|||
operationName: string;
|
||||
parentLogger?: Logger;
|
||||
container?: ServiceResolver;
|
||||
metadata?: Record<string, any>;
|
||||
metadata?: Record<string, unknown>;
|
||||
traceId?: string;
|
||||
}
|
||||
|
||||
export class OperationContext {
|
||||
public readonly logger: Logger;
|
||||
public readonly traceId: string;
|
||||
public readonly metadata: Record<string, any>;
|
||||
public readonly metadata: Record<string, unknown>;
|
||||
private readonly container?: ServiceResolver;
|
||||
private readonly startTime: Date;
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ export class OperationContext {
|
|||
options: {
|
||||
container?: ServiceResolver;
|
||||
parentLogger?: Logger;
|
||||
metadata?: Record<string, any>;
|
||||
metadata?: Record<string, unknown>;
|
||||
traceId?: string;
|
||||
} = {}
|
||||
): OperationContext {
|
||||
|
|
@ -82,7 +82,7 @@ export class OperationContext {
|
|||
/**
|
||||
* Add metadata to the context
|
||||
*/
|
||||
addMetadata(key: string, value: any): void {
|
||||
addMetadata(key: string, value: unknown): void {
|
||||
this.metadata[key] = value;
|
||||
}
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ export class OperationContext {
|
|||
/**
|
||||
* Create child context
|
||||
*/
|
||||
createChild(operationName: string, metadata?: Record<string, any>): OperationContext {
|
||||
createChild(operationName: string, metadata?: Record<string, unknown>): OperationContext {
|
||||
return new OperationContext({
|
||||
handlerName: 'child',
|
||||
operationName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue