@grow-codes/grafana-tempo - v0.1.1
    Preparing search index...

    Class TempoQueryClient

    Client for Tempo's HTTP query API (port 3200). Implements the SPEC §5 TraceQueryClient (getTrace, searchTraces, listServices, listOperations, getDependencies, waitForTrace) plus Tempo's own search (TraceQL), searchTags, searchTagValues, traceQLMetrics, echo, ready and buildInfo.

    Get one from client.query, or build one from a config (it then owns its client and close closes it). The tenant (X-Scope-OrgID) comes from the config.

    Note: Tempo shows a trace by id immediately after ingest, but search, tags and metrics only after about 30 seconds.

    Hierarchy (View Summary)

    Index
    • Closes the underlying client when this query client owns it. Idempotent.

      Returns Promise<void>

    • Fetches a trace by id: GET /api/v2/traces/{id} (falls back to v1 /api/traces/{id} when the v2 route is missing). Returns null when the trace does not exist (or belongs to another tenant). start/end narrow the backend blocks searched; recent data is returned anyway. Throws ValidationError for an invalid id.

      Parameters

      Returns Promise<Trace | null>

    • GET /ready: true when Tempo answers ready, false while it is starting (HTTP 503) or reports another state. Throws on network errors (unlike health()).

      Parameters

      Returns Promise<boolean>

    • Tag names per scope: GET /api/v2/search/tags → { resource: [...], span: [...], … }. Without scope it returns every scope that has data.

      Parameters

      Returns Promise<Record<string, string[]>>

    • Values of one tag: GET /api/v2/search/tag/{tag}/values. tag is a TraceQL identifier (resource.service.name, span.http.response.status_code, name, status, span.grow weird.key); an unscoped attribute name is a ValidationError.

      Parameters

      Returns Promise<TagValue[]>