Dashboard Reference
The nine v3 dashboards Sophonz provides, panel by panel — which table each panel reads, what it computes and how, and how variables and drill-down links tie the dashboards together.
Every Sophonz dashboard reads spans, errors, sessions and logs straight out of ClickHouse with SQL. This page is a reference for developers: it takes the dashboards apart panel by panel so you can check how a number is defined and rewrite a query when you need to. How the custom panel plugins themselves behave, and their options, is covered in Custom Panels and Sophonz Chart Panels.
At a glance
| Dashboard | uid | What it shows | Panels |
|---|---|---|---|
| Sophonz Service (v3) | sophonz-service-v3 | Health of the whole service. Most investigations start here | 39 |
| Session (v3) | sophonz-session-v3 | A session list and the selected session's timeline on one screen | 5 |
| Sophonz Session List | sophonz-session-list-v3 | A session list with many filters | 1 |
| Sophonz Session Detail | sophonz-session-detail-v3 | One session in depth — timeline, screen flow, service flow, traces | 5 |
| Sophonz Traces | sophonz-traces-v3 | Trace and span search with a Gantt view | 2 |
| Sophonz Logs | sophonz-logs-v3 | OpenTelemetry log search | 2 |
| Request Map (v3) | sophonz-requestmap-v3 | A single request response-time heatmap | 1 |
| Sophonz RUM (v3) | sophonz-rum-v3 | Browser real-user monitoring — web vitals, page loads, fetch/XHR latency, browsers | 18 |
| Sophonz Charts (v3) | sophonz-charts-v3 | Latency and span breakdowns drawn with the Sophonz Chart panels | 5 |
The Service, RUM and Charts dashboards default to the last 6 hours and refresh every minute.
The # in the tables below is the panel id. To open a single panel full size, add viewPanel to the URL.
/d/sophonz-service-v3/?viewPanel=26Moving between dashboards
The links below fill in the variables they need and open another dashboard. Every link also passes ${__url_time_range}, so the time range you were looking at comes along.
| From | Click | To | Variables passed |
|---|---|---|---|
Service #14 Recent traces | Trace ID | Gantt view #23 on the same dashboard | traceId |
Service #15 Slowest traces | Trace ID | Gantt view #23 on the same dashboard | traceId |
Service #29 Session list | sessionId | Session (v3) | sessionId |
Session #1 Session list | sessionId | Same dashboard | sessionId |
Session #4 Trace list | title | Gantt view #5 on the same dashboard | traceId |
Session List #2 | sessionId | Session Detail | sessionId |
Session Detail #4 Trace list | title | Trace view #5 on the same dashboard | traceId, spanId |
Session Detail #4 Trace list | Logs | Logs | traceId |
Traces #2 List | Name | Gantt view #3 on the same dashboard | traceId, spanId |
Traces #2 List | Logs | Logs | traceId |
Traces #2 List | sessionId | Session Detail | sessionId |
Logs #3 Logs | traceID | Traces | traceId |
Logs #3 Logs | sessionId | Session Detail | sessionId |
The dashboard header links (← Service metrics, Logs →, Traces →, ← Session list, Clear selection) work the same way. Clear selection reopens the same dashboard with only traceId and spanId emptied.
Where the data comes from
Every panel uses the grafana-clickhouse-datasource data source.
| Table | One row is | Used by |
|---|---|---|
sophonz_traces.distributed_sophonz_index_v2 | One span | Nearly every panel |
sophonz_traces.distributed_sophonz_error_index_v2 | One error: exception type, message, groupID | Error KPI, error grouping |
sophonz_traces.stored_analysis_session | Aggregated session state. …State columns are unpacked with groupUniqArrayMerge | Session lists |
sophonz_logs.distributed_logs_v2 | One log record | Logs |
Promoted columns and tag maps
This shape repeats in almost every query:
lower(if(appSpanType != '', appSpanType, stringTagMap['span.type']))Frequently used SDK attributes are copied into dedicated columns (appSpanType, appScreenName, appScreenType, httpURL) at ingest. Data sent by older SDK versions has those columns empty and the value only in stringTagMap. Queries read the column first and fall back to the tag map when it is empty, so a project with mixed SDK versions is counted consistently. Keep the same fallback when you write your own queries.
| Column | Tag map fallback |
|---|---|
appSpanType | stringTagMap['span.type'] |
appScreenName | stringTagMap['screen.name'] |
appScreenType | stringTagMap['screen.type'] |
httpURL | stringTagMap['http.url'], then stringTagMap['url.full'] |
Macros
| Macro | What it does |
|---|---|
$__timeFilter(timestamp) | Filters to the dashboard time range |
$__timeInterval(timestamp) | Rounds down to the time-series bucket |
$__fromTime, $__toTime | Start and end of the range. Used by the KPI previous-period comparison |
$__conditionalAll(condition, $variable) | Drops the whole condition when the variable is All, instead of building an IN list with thousands of values |
Variables
| Variable | Kind | Values | Dashboards |
|---|---|---|---|
serviceNamespace | Query | Project (service.namespace) | All |
serviceName | Query | App (service.name). Depends on serviceNamespace | Service, Request Map, RUM, Charts |
screen | Query | Screen name, from browser spans | RUM |
sessionId | Query | Most recent sessions first | Session, Session Detail |
traceId, spanId | Text | Filled by drill-down links. Empty means the most recent trace | Service, Session, Session Detail, Traces, Logs |
screenStart, screenEnd | Text (hidden) | The range picked in the screen flow | Session, Session Detail |
status, appType, appVersion, webVersion, userId, deviceId, sessionIdFilter | Mixed | Session list filters | Session List |
view, spanType, errorOnly, userId, q | Mixed | Trace search | Traces |
severity, q | Mixed | Log search | Logs |
Sophonz Service (v3)
Reads top to bottom through one service's health: flow → KPIs → trends → web vitals → traces → errors → screens → sessions.
Top — request flow
| # | Panel | What |
|---|---|---|
| 25 | DynamicXHR Monitor | xhr/fetch request count, failure count and session count in the range. A status code of 0 or 400 and above counts as a failure. Panel details |
| 26 | Request heatmap | xhr/fetch requests plotted by time (x) and response time (y, log scale). Up to 100,000 requests. Panel details |
KPI cards
| # | Name | Value | Better when |
|---|---|---|---|
| 1 | Sessions | uniqCombined64(sessionID) | Neutral |
| 3 | Avg render | Mean duration of render spans (ms) | Lower |
| 4 | Avg request | Mean duration of xhr/fetch spans (ms) | Lower |
| 2 | Slow requests | Share of xhr/fetch over 1 second (%) | Lower |
| 52 | Error sessions | Share of sessions that hit at least one error (%) | Lower |
| 5 | Errors | Row count of the error index | Lower |
Each card runs three queries — the current value (A), the value for the previous period of the same length (B), and the sparkline (C). Why it is split in three is explained under KPI in Custom Panels. The error sessions card looks like this:
-- A: current range
SELECT ROUND(100 * uniqCombined64If(sessionID, hasError)
/ nullIf(uniqCombined64(sessionID), 0), 1) AS v
FROM sophonz_traces.distributed_sophonz_index_v2
WHERE $__timeFilter(timestamp)
AND $__conditionalAll(serviceNamespace IN (${serviceNamespace:singlequote}), $serviceNamespace)
AND $__conditionalAll(serviceName IN (${serviceName:singlequote}), $serviceName)
-- B: the same length immediately before
WHERE timestamp >= $__fromTime - ($__toTime - $__fromTime) AND timestamp < $__fromTime
-- C: sparkline
SELECT $__timeInterval(timestamp) AS t, … GROUP BY t ORDER BY tThe card shows the error session rate rather than the error count because the rate does not move with traffic. Twice the visits means twice the errors, but the rate stays the same. Slow requests follow the same idea — an average hides a few very slow requests, while the share over 1 second exposes that tail.
uniqCombined64 is an approximate distinct count. Expect around 1% error with many sessions.
Trends and top URLs
| # | Panel | What |
|---|---|---|
| 6 | Session trend | Distinct sessions per bucket |
| 7 | Avg render/request time trend | Per-bucket mean of render, and of xhr/fetch |
| 9 | Top request URLs | Request count and mean duration per URL. Top 50 by mean duration |
Render figures in #7, #21 and #22 count render spans only. The post-docs spans older views added in are not included, so values can be lower than on those older views.
Web vitals
LCP, INP, CLS, FCP and TTFB are read from webvitals spans.
| # | Panel | What |
|---|---|---|
| 41–45 | LCP / INP / CLS / FCP / TTFB p75 | p75 per metric and the sample size n |
| 46 | Rating distribution by metric | Share of good · needs-improvement · poor |
| 47 | Web vitals p75 trend | The four ms metrics (LCP, INP, FCP, TTFB). Right axis is sample size |
| 48 | CLS p75 trend | CLS on its own. Threshold lines at good 0.1 / poor 0.25 |
| 49 | Load vitals by screen | LCP, FCP, TTFB p75 per screen, good rate, poor count |
| 50 | Interaction vitals by screen | INP, CLS p75 per screen, good rate, poor count |
| 51 | Web vitals by device | p75 of all five metrics per device |
Thresholds follow Google's:
| Metric | good | poor |
|---|---|---|
| LCP | ≤ 2500 ms | > 4000 ms |
| INP | ≤ 200 ms | > 500 ms |
| CLS | ≤ 0.1 | > 0.25 |
| FCP | ≤ 1800 ms | > 3000 ms |
| TTFB | ≤ 800 ms | > 1800 ms |
Each measurement is counted once. A web vital is reported several times before its value settles — CLS grows with each layout shift, INP changes when a slower interaction comes along. So queries group by (sessionID, measurement id) and keep only the last value. Older SDKs without a measurement id use spanID instead.
SELECT vital,
argMax(value, timestamp) AS value,
argMax(rating, timestamp) AS rating,
argMax(screen, timestamp) AS screen,
argMax(device, timestamp) AS device
FROM (
SELECT timestamp, sessionID,
if(stringTagMap['browser.web_vital.id'] != '',
stringTagMap['browser.web_vital.id'], spanID) AS vid,
stringTagMap['browser.web_vital.name'] AS vital,
numberTagMap['browser.web_vital.value'] AS value,
stringTagMap['browser.web_vital.rating'] AS rating,
appScreenName AS screen,
resourceTagsMap['sophonz.browser.device'] AS device
FROM sophonz_traces.distributed_sophonz_index_v2
WHERE $__timeFilter(timestamp) AND appSpanType = 'webvitals'
)
GROUP BY vital, sessionID, vidThe real queries also fall back to the older attribute names (web-vital.name, web-vital.value, web-vital.rating) and use unknown when the device tag is missing.
A few more rules the queries keep:
- p75 is computed from raw rows. Percentiles do not compose; averaging per-screen p75s does not give the overall p75.
quantileExact(0.75)runs over all deduplicated rows. - Rates are safe under any grouping. That is why the rating distribution in
#46still means something for screens with few samples. - Under 30 samples, p75 is noise.
#49–#51colornred but do not hide small groups. - Sorted by poor count, not p75. A screen where many users actually had a bad experience matters more than the worst p75 on a screen three people visit a day.
- Load and interaction vitals are separate tables. LCP, FCP and TTFB happen once per hard navigation and belong to the entry screen; INP and CLS accumulate across SPA route changes and belong to the last reported screen.
- Device is
resourceTagsMap['sophonz.browser.device'], matching how Google reports mobile and desktop separately.
Traces
| # | Panel | What |
|---|---|---|
| 12 | Trace trend | Root spans per bucket, and root spans with an error |
| 13 | Span type distribution | Span count per type (render, xhr, longtask, anr …) |
| 14 | Recent traces | Latest 200 root spans. Clicking a Trace ID loads it into #23 |
| 15 | Slowest traces | Top 50 root spans by duration |
| 23 | Trace Gantt view | Grafana's built-in traces visualization. With traceId empty, the most recent trace in range |
A trace counts as one row with isRootSpan = true. The Gantt view unfolds stringTagMap and resourceTagsMap into {key, value} arrays for the span and resource attribute tabs, and draws up to 1000 spans.
Error grouping
| # | Panel | What |
|---|---|---|
| 17 | Error groups | Per groupID: exception type, message, occurrences, affected sessions, affected devices, last seen. Top 100 by occurrences |
| 18 | Error trend by type | Count per bucket and exception type |
| 10 | Top errors | Count per exception type, message, serviceVersion and webVersion |
Errors are grouped by the groupID the error index assigns. Occurrences alone push up errors that one user hit over and over, so look at affected sessions too. #10 has version columns for finding errors introduced by a particular release.
Screens
| # | Panel | What |
|---|---|---|
| 20 | Top 20 screens by visits | render and route spans per screen |
| 21 | Top 20 screens by avg render | Mean render per screen |
| 22 | Screen details | Type, screen, visits, render, request, errors, error rate |
Type in #22 is appScreenType. Web reports page, Android activity, iOS view and Jetpack Compose composable, so a mixed-platform project still compares screen to screen in one table.
Sessions
| # | Panel | What |
|---|---|---|
| 29 | Session list | Per session: status (error/ok), user, device, app type, web version, start, length (s), trace count. Clicking sessionId opens Session (v3) |
The session list reads stored_analysis_session, not the span index. It only merges pre-aggregated state per session, so long ranges stay cheap.
Session (v3)
A one-screen dashboard: pick a session and see it right below.
| # | Panel | What |
|---|---|---|
| 1 | Session list | Same list as Service #29. Clicking sessionId switches everything below to that session |
| 2 | Session Timeline | The session's root spans on a time axis, one lane per type. Panel details |
| 6 | Session Timeline Graph | Screen navigation as a graph. Panel details |
| 4 | Trace list | The session's root spans in time order, up to 1000. The span picked in the timeline is marked ● |
| 5 | Trace Gantt view | The picked trace, or the session's most recent trace |
Clicking a span in the timeline fills spanId and traceId: the trace list marks it with ● and the Gantt view loads that trace. Picking a screen in the screen flow puts the time spent on it into the hidden screenStart and screenEnd variables, and the timeline zooms to that range.
Sophonz Session List
A single table, #2, with eight filters. Use it to find sessions for a particular user, device or version.
| Filter | Filters on |
|---|---|
status | All / error / ok |
appType | clientPlatform — the platform value the SDK reported |
appVersion | serviceVersion |
webVersion | webVersion |
userId, deviceId, sessionIdFilter | The value you type |
Clicking sessionId opens Session Detail.
Sophonz Session Detail
One session in depth. Unlike Session (v3) it has no session list; instead it has Service Flow and log links.
| # | Panel | What |
|---|---|---|
| 3 | Session Timeline | Timeline with one lane per type |
| 2 | Screen Flow | Screen navigation graph |
| 6 | Service Flow | Every span of the session (up to 20,000) as service nodes and call edges. Panel details |
| 4 | Trace list | Root spans in time order. The Logs column opens that trace's logs |
| 5 | Trace view | Gantt of the picked trace |
The timeline and screen flow read root spans only. Service Flow has to connect calls between services, so it reads every span in the session without the isRootSpan condition.
Sophonz Traces
Search traces and spans.
| # | Panel | What |
|---|---|---|
| 2 | Trace / span list | With view = trace, root spans only (one row per trace); with span, every span |
| 3 | Trace Gantt view | The trace whose name you clicked, or the most recent one in range |
List columns are time, user, type, screen, name, root (●), status, duration, HTTP status code, logs and session. Filter with spanType, errorOnly, userId and q (name search).
Sophonz Logs
Search OpenTelemetry logs.
| # | Panel | What |
|---|---|---|
| 2 | Log volume | Stacked count per severity. Empty severity shows as UNSET |
| 3 | Logs | Time, severity, body, traceID, spanID, session, service. Latest 2000 |
Logs carry no session id. #3 LEFT JOINs the span index for the same time range on traceID to find and attach the session, so logs not tied to a trace have an empty session cell.
Filter with severity (TRACE, DEBUG, INFO, WARN, ERROR, FATAL), q (case-insensitive substring of the body), traceId and spanId. WARN and WARNING count as the same.
Request Map (v3)
The heatmap from Service #26 on a dashboard of its own. Filter with serviceNamespace and serviceName.
Sophonz RUM (v3)
Browser real-user monitoring on one screen, in the RUM folder. Every query keeps only browser spans with webVersion != '', and the screen variable narrows all panels to the chosen screens. Apart from the four stat panels at the top, the dashboard is built from the Sophonz Chart panels.
| # | Panel | What |
|---|---|---|
| 1–4 | Page loads, Sessions, Errors, Average LCP | Stat panels. render span count, uniqExact(sessionID), spans with hasError, and the mean of numberTagMap['browser.web_vital.value'] for lcp |
| 10–14 | LCP, FCP, INP, CLS, TTFB | The mean of each web vital on an arc, coloured good / needs improvement / poor. Panel details |
| 15 | Web Vitals rating distribution | One ring per vital, split by stringTagMap['browser.web_vital.rating']. Panel details |
| 20 | LCP trend | Mean LCP, FCP and TTFB per bucket over the LCP bands at 2.5 s and 4 s. Panel details |
| 21 | Page loads by screen TopN | render spans per screen over time, with the busiest screens ranked below. Panel details |
| 30 | Fetch/XHR response time distribution | fetch and xhr spans as a density heatmap on a log axis, with errors in their own colour. Up to 200,000 spans. Panel details |
| 31, 32 | Sessions by browser, Sessions by OS | Distinct sessions per resourceTagsMap['sophonz.browser.name'] and resourceTagsMap['os.name'], as donuts. Panel details |
| 40 | User actions TopN | Interaction spans counted by event type and element tag (stringTagMap['event_type'], stringTagMap['target_element_tag']). Panel details |
| 41 | Fetch/XHR speed distribution | Requests under 300 ms, under 1 s and slower, as shares of one band. Panel details |
| 42 | Spans by type | Span count per type over time |
The band limits on the gauges are the thresholds web.dev recommends for each metric.
| Vital | Good up to | Poor from | Gauge max |
|---|---|---|---|
| LCP | 2500 ms | 4000 ms | 6000 |
| FCP | 1800 ms | 3000 ms | 5000 |
| INP | 200 ms | 500 ms | 800 |
| CLS | 0.1 | 0.25 | 0.5 |
| TTFB | 800 ms | 1800 ms | 3000 |
The gauges show the mean of each vital over the range. The web vitals rows on Service (v3) are the place to read p75.
Sophonz Charts (v3)
Five Sophonz Chart panels over live spans, in the Service folder. It filters with serviceNamespace and serviceName and works for any platform.
| # | Panel | What |
|---|---|---|
| 1 | XHR/Fetch response time distribution | xhr and fetch spans as a density heatmap on a log axis. Up to 200,000 spans. Panel details |
| 2 | Response speed distribution | xhr and fetch spans under 500 ms (Normal), under 2 s (Slow) and above (Very Slow). Panel details |
| 3 | Query phase durations | Total time in the Planner, ExecutorRun and Result components of the sophonz-postgres service. Panel details |
| 4 | Span count by type TopN | Span count per type over time, with a ranking. Panel details |
| 5 | Response speed by service | One ring per service, split into the same three speed groups as #2, over every span. Panel details |
#3 reads spans from one service by name. On a project without a service called sophonz-postgres it is empty.
When you edit a query
- Do not build distinct session counts by summing buckets. Sessions that cross a bucket boundary get counted twice; on a real day of traffic that came out 31% high.
- Do not average percentiles. Recompute p75 from raw rows.
- Rates and counts are fine to combine. Like the rating distribution, they hold up when split and regrouped.
- Keep the promoted column → tag map fallback. Leave it out and data from older SDKs silently drops.
- Wrap filter variables in
$__conditionalAll. The condition disappears for All and the query gets lighter.