unnbound-logger-sdk
Version:
A structured logging library with TypeScript support using Pino. Provides consistent, well-typed logging with automatic logId, workflowId, traceId, and deploymentId tracking across operational contexts.
21 lines (20 loc) • 518 B
TypeScript
/**
* Generates a trace ID
* @returns A trace ID
*/
export declare const getTraceId: () => string;
/**
* Generates a message ID
* @returns A message ID
*/
export declare const getMessageId: () => string;
/**
* Runs a callback with a trace ID
* @param callback - The callback to run
* @param extra - Extra context to add to the trace
* @returns The result of the callback
*/
export declare const withTrace: <T, E extends {
traceId?: string;
messageId?: string;
}>(callback: () => T, extra?: E) => T;