Client to query historical logging data and live logging data.

interface LoggingDataClient {
    destroy(): void;
    query(
        query: LoggingDataQuery,
        listener: (result: LoggingDataMetric[]) => any,
    ): () => void;
    query(
        queries: LoggingDataQuery[],
        listener: (results: LoggingDataMetric[][]) => any,
    ): () => void;
    query<T extends LoggingDataQueryOptions>(
        queryOptions: T,
        listener: (
            results: T extends { format: "csv" }
                ? LoggingDataBlob
                : LoggingDataMetric[][],
        ) => void,
    ): () => void;
}

Methods

Methods

  • Destroy the client. Always call this when the client is not used anymore. When the context is destroyed, this is called automatically

    Returns void

  • Starts a query for logging data. This method can be used for historic and live data depending on the selector.

    Parameters

    Returns () => void

    Returns a deregistration function for the listener.

  • Parameters

    Returns () => void

  • Type Parameters

    Parameters

    • queryOptions: T
    • listener: (
          results: T extends { format: "csv" }
              ? LoggingDataBlob
              : LoggingDataMetric[][],
      ) => void

      Depending on the format in the query options, the query listener result has a specific type.

      • If format is 'csv', the result type is LoggingDataBlob
      • Otherwise, the result type is LoggingDataMetric[][]

    Returns () => void