v1

latestOpenAPI 3.1.0MIT2026-07-1393128198.4 KB
Metrics

Explore metrics

Discover available metrics and their metadata. Returns metric names, instrument types (histogram, counter, gauge, additive), units, descriptions, available attributes, and library info. Use the instrument type to choose the correct aggregate function: histogram metrics support count(), p50(), p90(), p99(); counter metrics support sum(), perMin(sum()); gauge metrics support sum(), avg(), max(), min(); additive metrics support sum(), perMin(sum()). Use the search parameter to filter by metric name. Use this tool before creating dashboards to discover metrics and their attributes.

get/internal/v1/metrics/{project_id}/explore

Path parameters

project_idinteger required

Uptrace project ID.

Query parameters

time_startstring date-time required

RFC3339 timestamp.

Start time (inclusive) as RFC3339 timestamp.

time_endstring date-time required

RFC3339 timestamp.

End time (exclusive) as RFC3339 timestamp.

searchstring

Search string to filter metrics by name (substring match).

instrumentstring[]

Filter by instrument type. Can be repeated to pass multiple values (e.g. instrument=counter&instrument=gauge). Allowed values: histogram, counter, gauge, additive.

library_namestring[]

Filter by instrumentation library name (exact match). Can be repeated; results match any of the listed libraries.

attr_key_existsstring[]

Return only metrics that expose all of the listed attribute keys (AND semantics). Uptrace normalizes attribute keys by replacing dots with underscores (service.name → service_name), so pass the underscored form.

Response

Metrics list.

hasMoreboolean required
searchobject[]

Parsed search matchers applied to the request.