metric: A numeric measurement sampled over time — request rate, CPU, queue depth. Cheap to store and aggregate; great for dashboards and alerts. A metric is a number measured over time, such as requests per second, CPU usage, error count or queue length. Each measurement is small, so metrics are cheap to store and fast to query, which makes them ideal for dashboards and alerts.
Metrics tell you that something is wrong and roughly where. Logs and traces then tell you why.
What should you keep in mind with metric?
The main types are counters, which only go up, gauges, which go up and down, and histograms, which capture distributions such as response times. Choose a few that matter: the golden signals for each service, plus business numbers like completed orders or failed payments. Keep label values limited to avoid high cardinality, and name metrics consistently so they are easy to find later.
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.