Setu-TS
    Preparing search index...

    Interface ITraceDiagnosticsSource

    Read-only trace diagnostics source — the surface the TelemetryPlugin ALWAYS registers under CAPABILITIES.TRACE_DIAGNOSTICS and the DiagnosticsPlugin consumes to serve GET /v1/traces.

    Synchronous by contract: read returns already-captured, frozen data and never creates, ends, exports or flushes a span, and never touches the exporter or its processor. A source whose plugin was not configured for observation answers disabled; one whose tracing stack cannot supply completed spans answers unsupported with the fixed coverage reason.

    const source = ctx.services.get<ITraceDiagnosticsSource>(
    CAPABILITIES.TRACE_DIAGNOSTICS,
    );
    const batch = source.read(instanceId, 0, 128);

    0.8.0

    interface ITraceDiagnosticsSource {
        read(
            instanceId: string,
            after: number,
            limit?: number,
        ): TraceDiagnosticsBatch;
    }
    Index
    • Returns the retained span observations after after, oldest first.

      Parameters

      • instanceId: string

        The non-empty instance UUID to bind the batch to

      • after: number

        Source-local sequence cursor; 0 starts at the oldest retained span

      • Optionallimit: number

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

      Returns TraceDiagnosticsBatch

      A deeply frozen TraceDiagnosticsBatch whose instanceId exactly equals the argument

      When instanceId is not a non-empty string, 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 source's current sequence — with a fixed message that never echoes the value