metric
A number measured over time, such as requests per second or error count, that shows how a system behaves in aggregate.
In more detail
Metrics are cheap to store and good for spotting trends and alerting. Common types are counters, gauges and histograms, and their labels must stay bounded.
Example
http_requests_total{method="GET",route="/checkout",status="200"} 12Related terms
- counter — A metric that only ever goes up, such as the total number of requests or errors, from which rates are calculated.
- gauge — A metric that can go up and down and describes a level right now, such as queue depth, memory in use or open connections.
- histogram — A metric that counts measurements, such as request durations, into ranges of values so their distribution and percentiles can be calculated.
- cardinality — The number of distinct values a metric label can take, which multiplies how many separate series a metric creates.
- observability — How well you can understand what a system is doing, and why, from the data it emits: mainly logs, metrics and traces.
- Amazon CloudWatch — The AWS monitoring service that collects metrics and logs from AWS resources and applications and raises alarms on them.
- dimension — A name and value attached to a metric, such as ServiceName or AvailabilityZone, that separates it into more specific series.
- percentile — The value below which a given percentage of measurements fall; p99 latency is the time 99 in 100 requests beat.
- alarm — A rule that watches a metric and changes state, and notifies someone, when the metric crosses a threshold for long enough.
- DORA metrics — Five measures of software delivery from the DORA research: change lead time, deployment frequency, failed deployment recovery time, change fail rate and deployment rework rate.
- log — A time-stamped record of an individual event in a system, such as one request being handled; structured logs record it as named fields rather than free text.
- trace — A record of one request’s whole journey through a system, made of nested spans that show where the time went.
- service level indicator — A measurement of how well a service is doing for users, usually good events divided by eligible events.
- time series — A sequence of timestamped values for one metric name with one exact set of label values.
- metric label — A name and value attached to a metric, such as status="200", that splits one metric into separate series you can compare.
Taught in
- Error Handling And Safe Retries — Modern API Architecture: REST, GraphQL & gRPC
- Observability: Logs, Metrics, Traces — Modern API Architecture: REST, GraphQL & gRPC
- Two Hundred Accounts And One Bad Deploy — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- CodeBuild: The Build That Passed With Failing Tests — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Strategies Across Compute: The Canary That Saw Nothing — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- CloudFormation In Depth: Replace Or Update? — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Scaling Patterns: When Capacity Arrives Too Late — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Recovery To RTO And RPO: Backups Nobody Could Delete — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Testing Resilience: The Experiment That Would Have Been The Outage — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Collecting Logs And Metrics: The Disk Nobody Measured — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Finding The Problem: The Composite Alarm That Stayed Quiet — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Monitoring As Code: The Alarm That Watched Nothing — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Remediation As Code: A Public Bucket Appears — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Auditing: Who Opened Port Twenty Two? — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Pipeline Security: The Build Role That Could Do Anything — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Long-Stem Clinic: When Two Answers Both Work — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- The Full Mock And Your Review Plan — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Containers on AWS (ECS and EKS) — Cloud Infrastructure & Hyperscaler Architecture
- Serverless Compute (Lambda) — Cloud Infrastructure & Hyperscaler Architecture
- Auto Scaling Groups — Cloud Infrastructure & Hyperscaler Architecture
- S3: Buckets and Objects — Cloud Infrastructure & Hyperscaler Architecture
- When to Pick Which Database — Cloud Infrastructure & Hyperscaler Architecture
- Observability with CloudWatch — Cloud Infrastructure & Hyperscaler Architecture
- Metrics, Logs, and Alarms — Cloud Infrastructure & Hyperscaler Architecture
- What DevOps Actually Is — DevOps & Site Reliability Engineering
- The Pitfalls Of Measurement — DevOps & Site Reliability Engineering
- Service Level Indicators — DevOps & Site Reliability Engineering
- Observability Context — DevOps & Site Reliability Engineering
- Observability Versus Monitoring — Full-Stack Observability: Metrics, Tracing & Logging
- The Three Signals: Logs, Metrics And Traces — Full-Stack Observability: Metrics, Tracing & Logging
- Log Levels Done Properly — Full-Stack Observability: Metrics, Tracing & Logging
- Metric Types: Counters And Gauges — Full-Stack Observability: Metrics, Tracing & Logging
- Metric Types: Summaries And Histograms — Full-Stack Observability: Metrics, Tracing & Logging
- Cardinality And How It Bankrupts You — Full-Stack Observability: Metrics, Tracing & Logging
- Prometheus Scraping And The Pull Model — Full-Stack Observability: Metrics, Tracing & Logging
- The Prometheus Exposition Format — Full-Stack Observability: Metrics, Tracing & Logging
- PromQL Basics And Selectors — Full-Stack Observability: Metrics, Tracing & Logging
- Calculating Percentiles With histogram_quantile — Full-Stack Observability: Metrics, Tracing & Logging
- Grafana: Connecting The Data Source — Full-Stack Observability: Metrics, Tracing & Logging
- Dashboards That Answer Questions — Full-Stack Observability: Metrics, Tracing & Logging
- OpenTelemetry: The Vendor Neutral Path — Full-Stack Observability: Metrics, Tracing & Logging
- The OpenTelemetry Collector — Full-Stack Observability: Metrics, Tracing & Logging
- Instrumenting A Service With Client Libraries — Full-Stack Observability: Metrics, Tracing & Logging
- Bringing The Three Signals Together — Full-Stack Observability: Metrics, Tracing & Logging
- Alerting On Symptoms Versus Causes — Full-Stack Observability: Metrics, Tracing & Logging
- A Worked Example Postmortem — Full-Stack Observability: Metrics, Tracing & Logging
- Six Minutes Nobody Saw: Prometheus In One Outage — Prometheus Certified Associate (PCA) Exam Prep
- Ninety Minutes, No Question Count: Exam Strategy — Prometheus Certified Associate (PCA) Exam Prep
- Forty Seconds At Two: Push, Pull And Service Discovery — Prometheus Certified Associate (PCA) Exam Prep
- Observability Sprint: One Failed Checkout — Prometheus Certified Associate (PCA) Exam Prep
- Where Did Two Hours Go? Prometheus Architecture — Prometheus Certified Associate (PCA) Exam Prep
- A Week Without A Scrape: Configuration And Relabelling — Prometheus Certified Associate (PCA) Exam Prep
- Cart Versus cart: The Data Model And What A Scrape Returns — Prometheus Certified Associate (PCA) Exam Prep
- Off By Five: What Prometheus Is Not For — Prometheus Certified Associate (PCA) Exam Prep
- Fundamentals Sprint: Nine Calls On The Server — Prometheus Certified Associate (PCA) Exam Prep
- The Server That Would Not Die: Selecting Data — Prometheus Certified Associate (PCA) Exam Prep
- Four Thousand Requests Vanished: Rates And Derivatives — Prometheus Certified Associate (PCA) Exam Prep
- Is The New Version Worse? Binary Operators And Matching — Prometheus Certified Associate (PCA) Exam Prep
- Under A Second, On Average: Histograms — Prometheus Certified Associate (PCA) Exam Prep
- The Export That Failed Quietly: Timestamp Metrics — Prometheus Certified Associate (PCA) Exam Prep
- PromQL Sprint: Ten Queries At Minute Twenty Two — Prometheus Certified Associate (PCA) Exam Prep
- Thirty Second Checkouts Nobody Saw: Client Libraries — Prometheus Certified Associate (PCA) Exam Prep
- A Database You Cannot Recompile: Exporters — Prometheus Certified Associate (PCA) Exam Prep
- Milliseconds Versus Seconds: Naming Metrics And Labels — Prometheus Certified Associate (PCA) Exam Prep
- Instrumentation Sprint: Sixteen Calls On Code And Exporters — Prometheus Certified Associate (PCA) Exam Prep
- Paged Three Minutes Late: Alerting Rules — Prometheus Certified Associate (PCA) Exam Prep
- Twelve Green Panels: Dashboarding Basics — Prometheus Certified Associate (PCA) Exam Prep
- Seventy Seven Percent, Book Now? The Full Mock — Prometheus Certified Associate (PCA) Exam Prep
- One Week, Three Objectives: Final Review — Prometheus Certified Associate (PCA) Exam Prep
- Partitioning, Sharding And Hot Keys — Scalable System Design & Distributed Architecture
- The Difference Between A Queue And A Log — Scalable System Design & Distributed Architecture
- Circuit Breakers — Scalable System Design & Distributed Architecture
- Backpressure And Load Shedding — Scalable System Design & Distributed Architecture
- Observability As A Design Input — Scalable System Design & Distributed Architecture
- Capacity Planning As A Design Input — Scalable System Design & Distributed Architecture
- Worked Design One: Scaling The Ticket Booking System — Scalable System Design & Distributed Architecture
- Worked Design Three: A Metrics Ingestion Pipeline — Scalable System Design & Distributed Architecture
- Worked Design Three: Scaling The Metrics Pipeline — Scalable System Design & Distributed Architecture
References
- OpenTelemetry: Metrics
- Prometheus: Metric types
- Amazon CloudWatch metrics concepts
- Google SRE book: Monitoring Distributed Systems