Tempo Metrics API

Generate metrics from trace data

Operations 1

GET /api/metrics/query_range Query Metrics Range #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/tempo-metrics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

tempo-metrics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Grafana Tempo HTTP Health Metrics API
  description: The Grafana Tempo HTTP API provides endpoints for querying distributed traces, searching spans with TraceQL, discovering tag keys and values, and generating metrics from trace data. Tempo is compatible with Jaeger, Zipkin, and OpenTelemetry trace ingestion and query protocols. The API runs on the Tempo HTTP port (default 3200).
  version: 2.x
  contact:
    name: Grafana Tempo Community
    url: https://community.grafana.com/c/grafana-tempo/
    email: tempo@grafana.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:3200
  description: Local Tempo instance (default)
- url: http://tempo:3200
  description: Kubernetes service endpoint
tags:
- name: Metrics
  description: Generate metrics from trace data
paths:
  /api/metrics/query_range:
    get:
      operationId: queryMetricsRange
      summary: Query Metrics Range
      description: Generate time-series metrics from trace data using TraceQL metrics queries. Supports span rate, error rate, duration histograms, and custom metric generation from trace attributes.
      tags:
      - Metrics
      parameters:
      - name: q
        in: query
        required: true
        description: TraceQL metrics query expression
        schema:
          type: string
        example: rate({.service.name="order-service"}[5m])
      - name: start
        in: query
        required: true
        description: Start time as Unix epoch (seconds)
        schema:
          type: integer
          format: int64
      - name: end
        in: query
        required: true
        description: End time as Unix epoch (seconds)
        schema:
          type: integer
          format: int64
      - name: step
        in: query
        required: false
        description: Query step interval (e.g., 30s, 1m, 5m)
        schema:
          type: string
          default: 1m
      responses:
        '200':
          description: Metrics time-series data returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResult'
        '400':
          description: Invalid query
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    MetricsResult:
      type: object
      description: Time-series metrics generated from trace data
      properties:
        status:
          type: string
          enum:
          - success
          - error
        data:
          type: object
          properties:
            resultType:
              type: string
              enum:
              - matrix
            result:
              type: array
              items:
                type: object
                properties:
                  metric:
                    type: object
                    description: Metric label set
                  values:
                    type: array
                    description: Time-value pairs
                    items:
                      type: array
                      items:
                        oneOf:
                        - type: integer
                        - type: string
    Error:
      type: object
      description: API error response
      properties:
        error:
          type: string
          description: Error message
externalDocs:
  description: Grafana Tempo API Documentation
  url: https://grafana.com/docs/tempo/latest/api_docs/