
The Metrics Explorer charting the p95 of http.server.request.duration
Build a query
Each row of the explorer is one query.- Metric. Pick a name from the catalog. The picker shows the unit next to the name. When a metric declares no unit, Sherlock infers seconds, milliseconds, or bytes from a name ending in
_seconds,_milliseconds, or_bytes, with or without a following_total. Names ending in_timestamp_seconds,_start_time_seconds, or_boot_time_secondsstay unitless unless a unit is declared. The catalog refreshes every 60 seconds. - Aggregation. The choices depend on the metric type. A counter offers
sum,avg,min,max,rate, andcount, withrateas the default. A gauge offerslast,avg,min,max,sum, andcount, withlastas the default; a gauge is a level, so it has norate. A histogram offersp50,p90,p95,p99,avg,min,max,sum, andcount, withp95as the default;minandmaxuse delta data only, so a histogram sent as cumulative returns no values for them. A summary offersavg,sum,count, andrate, withavgas the default. A cumulative UpDownCounter is listed as a gauge and takes the gauge aggregations; see Metric temporality. - Group by. Pick a label to get one series per value, or No grouping for a single series. The list holds the metric’s own attributes and its resource attributes, for example a node, pod, namespace, or host name. When both carry the key, the data point’s value is used.
- Filter. Add label filters to narrow the series. Filters take the same attributes as Group by, so a resource attribute such as
k8s.namespace.nameworks as a filter.
p50, p90, p95, and p99, so the tail and the median share one chart.
Read the chart
- Line, Bars, Area, Stacked, and Table show any query. Heatmap and Dist need a single histogram query and show the bucket distribution over time or over the whole window.
- lin and log switch the value axis.
- vs prev period overlays the same query shifted back by the selected range.
- Threshold draws a horizontal line at a value you choose.
- The header shows the step and the window the chart was computed with, for example
step 30s · 1h window. - View SQL shows the query that produced the chart. The SQL tab runs your own query against the metrics tables.
- Share copies a link that reproduces the whole explorer state.
n ≥ p for percentile queries, the change versus the previous period, and a sparkline. Click the eye icon to hide a series.
Exemplars
A histogram carries exemplars: sampled measurements with the trace id of the request that produced them.- Click a series row in the table to open the exemplars of that series in the window. Results are limited, so the drawer may not include every recorded exemplar.
- In Heatmap, click a cell to open the exemplars of that bucket and time step.
- In Dist, click a bar to open the exemplars of that value range.
Before data arrives
An empty Metrics page shows four setup steps: the OTLP metrics endpoint, the bearer token in theAuthorization header, instrumenting the service with the env resource attribute, and emitting at least one data point. The catalog refreshes every 60 seconds.
Troubleshooting
A cumulative counter or histogram starts one point late
A cumulative counter or histogram starts one point late
Counters and histograms chart whether they arrive as delta or cumulative. A cumulative point is charted as the increase over its predecessor, and Sherlock looks for that predecessor from ten minutes before the window starts. A point with none is omitted, not plotted as zero, so a new cumulative series charts from its second point. Delta points chart from the first. See Metric temporality.
A counter is about twice too high, or jumps around
A counter is about twice too high, or jumps around
If totals are about twice as high, check for attributes that separate duplicate scrapes of the same target, such as each collector’s own pod name, and for two collectors converting the same series to delta with the
cumulativetodelta processor. Totals that jump can mean different processes share one series identity; give each one an identity such as service.instance.id. See Running more than one collector.A summary metric has no percentiles
A summary metric has no percentiles
Prometheus summaries chart
count, sum, avg, and rate. Their precomputed quantiles are not offered. If you need percentiles you can aggregate across instances, expose the value as a histogram. See What Sherlock charts.Related topics
Exemplars
From a spike to the request and its logs.
Custom metrics
Define your own histograms with exemplars in Node.js.

