---
title: "traces"
description: "Fields and display options of a `traces` panel."
---

> Documentation Index
> Fetch the complete documentation index at: https://slashobserve.com/llms.txt
> Use this file to discover all available pages before exploring further.

# traces

## Example

```json
{
  "id": "p_trace",
  "type": "traces",
  "title": "Latest trace",
  "gridPos": {
    "x": 0,
    "y": 24,
    "w": 12,
    "h": 8
  },
  "datasource": "ch",
  "queries": [
    {
      "query": "SELECT TraceId AS traceID, SpanId AS spanID, ParentSpanId AS parentSpanID, ServiceName AS serviceName, SpanName AS operationName, Timestamp AS startTime, Duration / 1000000 AS duration, SpanAttributes AS tags FROM otel_traces WHERE TraceId = (SELECT TraceId FROM otel_traces WHERE $__timeFilter(Timestamp) ORDER BY Timestamp DESC LIMIT 1) ORDER BY startTime LIMIT 1000",
      "format": "table"
    }
  ],
  "display": {}
}
```

From [`spec/examples/panel-types.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/panel-types.json).

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `id` (required) | `string` | Stable across versions; comments anchor to it. |
| `title` (required) | `string` |   |
| `description` | `string` |   |
| `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. |
| `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` |   |
| `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. |
| `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. |
| `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. |
| `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. |
| `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. |
| `repeatDirection` | `"h"`, `"v"` |   |
| `maxPerRow` | `integer` | Between 1 and 24. |
| `timeFrom` | `string` |   |
| `timeShift` | `string` |   |
| `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. |
| `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. |
| `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. |
| `maxDataPoints` | `integer` | Between 10 and 11000. |
| `transparent` | `boolean` |   |
| `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. |

Every data panel also takes the [field options](/docs/reference/observespec/field-options/).

## Display options

| Field | Values | Description |
| --- | --- | --- |
| `spanSearch` | `string` | Spans match when this text, in any case, appears in their service, operation, id, attribute keys or attribute values. |
| `serviceNames` | array of `string` | Spans match when their service is one of these names, or none of them with excludeServices. At most 50 items. |
| `excludeServices` | `true`, `false` | Spans match when their service is not one of serviceNames. |
| `spanNames` | array of `string` | Spans match when their operation is one of these names, or none of them with excludeSpanNames. At most 50 items. |
| `excludeSpanNames` | `true`, `false` | Spans match when their operation is not one of spanNames. |
| `minSpanDuration` | `number` | Spans match when they last at least this many milliseconds. Between 0 and 86400000. |
| `maxSpanDuration` | `number` | Spans match when they last at most this many milliseconds. Between 0 and 86400000. |
| `matchesOnly` | `true`, `false` | Shows only the spans that match the search, service, operation and duration filters; otherwise the other spans are dimmed. |
| `criticalPathOnly` | `true`, `false` | Shows only the spans on the critical path, the chain of spans that decides how long the trace takes. |

Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/bac0fe39/spec/schema/observespec.v0.json) at `bac0fe39`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new).
