---
title: "Logs, traces and metrics"
description: "Search the logs, traces and metrics your services send."
order: 7
---

Search the logs, traces and metrics your services send.

## `GET /api/v1/obs/logs`

Scrubbed log events, newest first.

| Parameter | In | Type | About |
| --- | --- | --- | --- |
| `service` (optional) | query | string or null |  |
| `level` (optional) | query | string or null |  |
| `q` (optional) | query | string or null | Substring match on message and target (case-insensitive). |
| `from` (optional) | query | string or null |  |
| `to` (optional) | query | string or null |  |
| `limit` (optional) | query | integer or null | 1 to 1000, default 200. |
| `project` (optional) | query | string or null | Repeating the parameter is refused. |
| `environment` (optional) | query | string or null | Environment name; absent means every environment. |

| Status | Means | Body |
| --- | --- | --- |
| 200 | Done | array of [LogEntry](#logentry) |
| 401 | Bad token |  |

## `GET /api/v1/obs/metrics/names`

Metric names seen in the last 24 h (the picker on the Metrics page).

| Parameter | In | Type | About |
| --- | --- | --- | --- |
| `project` (optional) | query | string or null |  |
| `environment` (optional) | query | string or null |  |

| Status | Means | Body |
| --- | --- | --- |
| 200 | Done | array of [MetricName](#metricname) |
| 401 | Bad token |  |

## `GET /api/v1/obs/metrics/series`

One metric over a time window, bucketed server-side and grouped per service. Recent narrow windows read the raw samples; anything wider or older than the 14-day raw retention reads the 5-minute rollups.

| Parameter | In | Type | About |
| --- | --- | --- | --- |
| `name` | query | string |  |
| `service` (optional) | query | string or null |  |
| `from` (optional) | query | string or null |  |
| `to` (optional) | query | string or null |  |
| `project` (optional) | query | string or null | Repeating the parameter is refused. |
| `environment` (optional) | query | string or null | Environment name; absent means every environment. |

| Status | Means | Body |
| --- | --- | --- |
| 200 | Done | [SeriesResponse](#seriesresponse) |
| 401 | Bad token |  |

## `GET /api/v1/obs/services`

Services seen in the last 24 h (filter dropdowns on the Logs/Traces pages).

| Parameter | In | Type | About |
| --- | --- | --- | --- |
| `project` (optional) | query | string or null |  |
| `environment` (optional) | query | string or null |  |

| Status | Means | Body |
| --- | --- | --- |
| 200 | Done | array of string |
| 401 | Bad token |  |

## `GET /api/v1/obs/traces`

Root spans (one per trace), newest first, the trace list.

| Parameter | In | Type | About |
| --- | --- | --- | --- |
| `service` (optional) | query | string or null |  |
| `q` (optional) | query | string or null | Substring match on the root span's name (case-insensitive). |
| `status` (optional) | query | string or null | Exact span status (e.g. `ERROR`). |
| `from` (optional) | query | string or null |  |
| `to` (optional) | query | string or null |  |
| `limit` (optional) | query | integer or null |  |
| `project` (optional) | query | string or null | Repeating the parameter is refused. |
| `environment` (optional) | query | string or null | Environment name; absent means every environment. |

| Status | Means | Body |
| --- | --- | --- |
| 200 | Done | array of [SpanEntry](#spanentry) |
| 401 | Bad token |  |

## `GET /api/v1/obs/traces/{trace_id}`

Every span of one trace, in start order, the waterfall.

| Parameter | In | Type | About |
| --- | --- | --- | --- |
| `trace_id` | path | string |  |
| `project` (optional) | query | string or null |  |
| `environment` (optional) | query | string or null |  |

| Status | Means | Body |
| --- | --- | --- |
| 200 | Done | array of [SpanEntry](#spanentry) |
| 404 | No such trace, or none of it in this project |  |

## Types

### LogEntry

| Field | Type | About |
| --- | --- | --- |
| `client` (optional) | string or null |  |
| `environment` | string |  |
| `fingerprint` (optional) | string or null |  |
| `host` | string |  |
| `level` | string |  |
| `message` | string |  |
| `method` (optional) | string or null |  |
| `project` | string |  |
| `route` (optional) | string or null |  |
| `service` | string |  |
| `span` (optional) | string or null |  |
| `status` (optional) | string or null |  |
| `target` | string |  |
| `timestamp` | string |  |

### MetricName

| Field | Type | About |
| --- | --- | --- |
| `kind` | string |  |
| `name` | string |  |

### SeriesResponse

| Field | Type | About |
| --- | --- | --- |
| `bucket_seconds` | integer |  |
| `kind` | string |  |
| `name` | string |  |
| `series` | array of [MetricSeries](#metricseries) |  |
| `source` | string | `raw` (14-day full-resolution window) or `rollup` (5-minute aggregates). |

### SpanEntry

| Field | Type | About |
| --- | --- | --- |
| `duration_ms` | number |  |
| `environment` | string |  |
| `http_status` (optional) | string or null |  |
| `kind` (optional) | string or null |  |
| `method` (optional) | string or null |  |
| `name` | string |  |
| `parent_span_id` (optional) | string or null |  |
| `project` | string |  |
| `route` (optional) | string or null |  |
| `service` | string |  |
| `span_id` | string |  |
| `status` (optional) | string or null |  |
| `timestamp` | string |  |
| `trace_id` | string |  |

### MetricSeries

| Field | Type | About |
| --- | --- | --- |
| `points` | array of [SeriesPoint](#seriespoint) |  |
| `service` | string |  |

### SeriesPoint

| Field | Type | About |
| --- | --- | --- |
| `max` (optional) | number or null |  |
| `min` (optional) | number or null |  |
| `t` | string |  |
| `value` (optional) | number or null | Gauge: bucket average. Counter: the cumulative count at bucket end, summed across label sets, the UI derives the rate from consecutive points. |
