Last updated: April 16, 2026
Examples - Web Event Queries
Web event metrics fall into the following categories, each backed by a different PromQL pattern:
- Events total, Errors, Requests, Users, Page views, and Page loads are raw counters — queries use
increase()to return the total number of events accumulated over the selected interval. A> 0guard is appended to suppress empty intervals from the chart. - Request duration is a histogram metric — percentiles are computed using
histogram_quantile()andrate(). A second dropdown lets you choose the percentile: p50, p75, p90, p95, p99, or avg. - Web vitals expose Core Web Vitals (LCP, INP, CLS) as histogram metrics, also computed with
histogram_quantile()andrate(). Two additional dropdowns let you choose which vital and which percentile (p50, p75, p90, p95, p99). The default percentile is p75, which is the value Google uses when scoring pages for the Chrome User Experience Report.
The examples below show the base query for each metric with no filters or Group by applied. When you add filters or select a Group by attribute in the Query Builder, the generated PromQL will include the corresponding label matchers and by clause automatically.
| Metric | What it measures | When to use it |
|---|---|---|
| Events total | Total number of browser events recorded in the selected time window. | Use to understand overall browser activity volume and detect sudden changes in event throughput — for example, a drop that could indicate a JavaScript error preventing events from being recorded. |
Example:sum(increase({otel_metric_name="dash0.web.requests"}[$__interval])) > 0The > 0 guard suppresses intervals with no events, removing empty data points from the chart. | ||
| Errors | Total number of browser events that completed with an error status in the selected time window. | Use to track frontend error volume over time — useful for detecting regressions after a deployment or correlating error spikes with specific pages or user actions. |
Example:sum(increase({otel_metric_name="dash0.web.errors"}[$__interval])) > 0The > 0 guard suppresses intervals with no errors, keeping the chart free of flat zero lines during quiet periods. | ||
| Requests | Total number of browser-initiated HTTP requests in the selected time window. | Use to measure request volume independently of total event count — useful for understanding how much network activity your frontend is generating and whether it correlates with performance degradation. |
Example:sum(increase({otel_metric_name="dash0.web.requests"}[$__interval])) > 0 | ||
| Request duration | The duration of browser-initiated HTTP requests in seconds at the selected percentile (p50, p75, p90, p95, p99, or avg). | Use to measure frontend request latency as experienced by real users. P75 or P95 are good starting points for SLO definitions — choose a higher percentile to catch tail latency issues affecting a smaller but impactful share of requests. |
Example (p75):histogram_quantile(0.75, sum(rate({otel_metric_name="dash0.web.requests.duration"}[$__interval]))) | ||
| Users | Total number of distinct users who generated browser events in the selected time window. | Use to understand the scale of real user impact — pairing a users count with an error rate gives you a clearer picture of how many people are actually affected by a frontend issue. |
Example:sum(increase({otel_metric_name="dash0.web.users"}[$__interval])) > 0 | ||
| Web vitals | Core Web Vitals (LCP, INP, or CLS) at the selected percentile (p50, p75, p90, p95, p99). LCP measures loading performance, INP measures interactivity responsiveness, and CLS measures visual stability. Scores are updated throughout the session as the user interacts with the page, not just at initial load. | Use to monitor real-user page performance against Google's thresholds. P75 is the recommended baseline — it means 75% of your users are at or below the reported score, making it more representative than the median and more stable than the maximum. Switch to P95 or P99 to investigate tail experiences. |
Example (LCP p75):histogram_quantile(0.75, sum(rate({otel_metric_name="dash0.web.vitals.lcp"}[$__interval])))Replace lcp with inp or cls for the other vitals. Replace 0.75 with the appropriate quantile value for the selected percentile. See the Core Web Vitals tip below for a description of each vital. | ||
| Page views | Total number of page view events in the selected time window, including both full page loads and client-side navigations in single-page applications. | Use to track overall page view volume across your web application — useful as a normalisation baseline when comparing error rates or performance metrics per page view. |
Example:sum(increase({otel_metric_name="dash0.web.page_views"}[$__interval])) > 0 | ||
| Page loads | Total number of full (physical) page load events in the selected time window, excluding client-side navigations. | Use to distinguish hard page loads from soft navigations in single-page applications — a useful distinction when investigating Core Web Vitals, since LCP and CLS are only measured on physical page loads. |
Example:sum(increase({otel_metric_name="dash0.web.page_views", "dash0.web.page_view.type"="PHYSICAL_PAGE"}[$__interval])) > 0 | ||