log2trace-ui - v1.0.0-RC1
    Preparing search index...

    Type Alias FetchCallback

    FetchCallback: (
        url: string | undefined,
        filters: Record<string, string | string[]>,
    ) => Promise<TraceData | LogEntry[]>

    Callback that supplies trace data on behalf of <trace-visualizer>.

    Set via the fetchCallback setter. The component invokes the callback whenever a refetch is needed: on connect, when the data-url attribute changes, and whenever an external filter value changes (subject to autoFetch).

    The callback may return either pre-built TraceData or a raw LogEntry[]; in the latter case the component runs transformLogs (from transform.ts) with the configured field mappings before rendering.

    Type Declaration

      • (
            url: string | undefined,
            filters: Record<string, string | string[]>,
        ): Promise<TraceData | LogEntry[]>
      • Parameters

        • url: string | undefined

          The current dataUrl (may be undefined if not configured).

        • filters: Record<string, string | string[]>

          Active external filters encoded by buildQueryParams (from filter.ts).

        Returns Promise<TraceData | LogEntry[]>

        A promise resolving to the data to render.