@grow-codes/signoz - v0.1.1
    Preparing search index...

    Class SignozQueryClient

    Query client for SigNoz (SIGNOZ-API-KEY auth): logs and spans via /api/v5/query_range, traces via the waterfall API, services/operations via v5 aggregations, dependencies via /api/v1/dependency_graph, log fields via /api/v1/fields/keys. Implements TraceQueryClient. Obtain it from SignozClient.query.

    Hierarchy (View Summary)

    Index
    • Full trace via POST /api/v4/traces/{traceId}/waterfall; null when SigNoz does not know it or reports no spans for it. Span start times have millisecond precision (the waterfall reports time_unix in ms). A trace larger than the server's waterfall window (hasMore) is completed with raw span queries, as in every language.

      Parameters

      • traceId: string
      • options: { signal?: AbortSignal } = {}

      Returns Promise<SignozTrace | null>

    • Distinct values of a field (GET /api/v1/fields/values), sorted.

      Parameters

      • name: string
      • options: { search?: string; signal?: AbortSignal; source?: SignozSignal } = {}

      Returns Promise<(string | number | boolean)[]>

    • Raw log query. Paging uses the SDK's own cursor (the server's nextCursor skips rows in the millisecond before it): the next page narrows the window to the boundary millisecond and excludes the ids already returned there.

      Parameters

      Returns Promise<LogQueryResult>

    • Runs a raw /api/v5/query_range request body and returns data plus warnings.

      Parameters

      • body: Record<string, unknown>
      • options: { operation?: string; signal?: AbortSignal } = {}

      Returns Promise<{ data: unknown; warnings: string[] }>