UNPKG

@comake/skl-js-engine

Version:

Standard Knowledge Language Javascript Engine

28 lines 1.08 kB
export interface Span { id: string; parentId?: string; name: string; startTime: number; endTime?: number; duration?: number; attributes: Record<string, any>; children: Span[]; } export declare class PerformanceLogger { private static asyncLocalStorage?; private static enabled; private static initialized; private static spanCounter; private static initialize; private static generateSpanId; static startSpan(name: string, attributes?: Record<string, any>): Span; static endSpan(span: Span, additionalAttributes?: Record<string, any>): void; static withSpan<T>(name: string, fn: () => Promise<T> | T, attributes?: Record<string, any>): Promise<T>; static withSpanRoot<T>(name: string, fn: () => Promise<T> | T, attributes?: Record<string, any>): Promise<T>; static getCurrentSpan(): Span | undefined; static logSpanTree(rootSpan: Span): void; private static buildSpanTreeLines; private static addAttributeLines; private static formatQuery; } //# sourceMappingURL=PerformanceLogger.d.ts.map