UNPKG

@dudousxd/nestjs-telescope

Version:

Laravel Telescope-style observability console for NestJS — core: watchers, recorder, correlation, SQLite store, headless API.

23 lines 985 B
import type { Entry } from '../entry/entry.js'; export interface TraceSummary { traceId: string; /** Number of entries that share this traceId. */ entryCount: number; /** Distinct entry types in the trace, sorted ascending. */ types: string[]; /** Earliest `createdAt` across the trace's entries. */ firstAt: Date; /** Latest `createdAt` across the trace's entries. */ lastAt: Date; /** Sum of non-null `durationMs` across the trace's entries. */ totalDurationMs: number; /** The request entry's "METHOD uri" label, when the trace has one. */ rootLabel?: string; } export interface SummarizeTracesOptions { limit?: number; } /** Groups window entries by `traceId` (null trace ids skipped) into a summary * per distinct trace, sorted by `lastAt` desc and sliced to `limit`. Pure. */ export declare function summarizeTraces(entries: Entry[], options?: SummarizeTracesOptions): TraceSummary[]; //# sourceMappingURL=traces.d.ts.map