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.
12 lines (11 loc) • 512 B
TypeScript
import { Maybe } from './types';
export type LogPayloadGetterOptions<T> = Maybe<T>;
type LogPayloadGetter<T> = object | ((o?: LogPayloadGetterOptions<T>) => object);
/**
* Starts a span that tracks the duration of a callback
* @param spanName - The span name to use for logging
* @param callback - The async callback to execute
* @returns The result of the callback
*/
export declare const startSpan: <T>(spanName: string, callback: () => Promise<T>, getter?: LogPayloadGetter<T>) => Promise<T>;
export {};