Setu-TS
    Preparing search index...

    Interface IDiagnosticsSource

    Read-only diagnostics reader — the surface exposed through the optional IApplication.diagnostics member when the application was created with diagnostics explicitly enabled.

    Pull-only by contract: neither method registers a callback, invokes application code, resolves a service, or mutates state. Readers are independent and non-destructive — one slow or stopped reader never steals events from another. Returned data is deeply frozen; holding it cannot observe later application activity.

    const app = createApplication({ plugins, diagnostics: {} });
    await app.start();
    await app.inject({ method: 'GET', url: '/health' });
    const snap = app.diagnostics!.snapshot();
    const batch = app.diagnostics!.read(0, 128);

    0.8.0

    interface IDiagnosticsSource {
        read(after: number, limit?: number): DiagnosticsBatch;
        snapshot(): DiagnosticsSnapshot;
    }
    Index
    • Returns the next batch of execution events after after, oldest first.

      Parameters

      • after: number

        Sequence cursor; 0 starts at the oldest retained record

      • Optionallimit: number

        Maximum events to return, 1–128 (default 128)

      Returns DiagnosticsBatch

      A frozen DiagnosticsBatch

      When after is not a non-negative safe integer, when limit is not an integer from 1 to 128, or when after is beyond the current sequence — with a fixed message that never echoes the value