PromQL: Prometheus Query Language — selects and aggregates time series for dashboards and alerts. PromQL is the query language of Prometheus. It selects time series by name and labels, and combines them with functions and operators to answer questions like "what share of requests failed in the last five minutes?" sum(rate(http_requests_total{status=~"5.."}[5m])) by (route) gives the rate of server errors per route. rate() turns ever-growing counters into per-second values, and sum by adds them up per label.
A few functions cover most needs: rate for counters, histogram_quantile for percentiles, and sum, avg and max with by for grouping. Write alert rules as ratios, such as errors divided by requests, so they work at any traffic level. Grafana's query editor helps you explore available metrics and labels while you learn.
What does an example of PromQL look like?
sum(rate(http_requests_total{status=~"5.."}[5m])) by (route)
Full Sentry SDK setup for PHP. Use when asked to "add Sentry to PHP", "install sentry/sentry", "setup Sentry in PHP", or configure error monitoring, tracing, profiling, logging, metrics, crons, or AI monitoring for PHP applications. Supports plain PHP, Laravel, and Symfony.
Set up Prometheus for comprehensive metric collection, storage, and monitoring of infrastructure and applications. Use when implementing metrics collection, setting up monitoring infrastructure, or configuring alerting systems.
Define and implement Service Level Indicators (SLIs) and Service Level Objectives (SLOs) with error budgets and alerting. Use when establishing reliability targets, implementing SRE practices, or measuring service performance.