1. [Home](<https://delaparra-services.nl/>) 
1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) 
1. [cardinality](<https://delaparra-services.nl/knowledge-hub/cardinality>)

  

Category: Observability 

# cardinality

  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    

## What is cardinality?

 

cardinality: The number of unique label combinations a metric has. High cardinality (e.g. user\_id as a label) blows up storage and cost. Cardinality in monitoring is the number of unique combinations of label values a metric has. A metric ` http_requests ` with labels for method and status code has a few dozen combinations. Add ` user_id ` as a label and it can have millions.

 

Definition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)

 

## Frequently asked questions about cardinality

  

### How is cardinality used in practice?

 

Every combination is stored as a separate time series. High cardinality makes monitoring systems like Prometheus slow and expensive, and can crash them outright.

    

### What should you keep in mind with cardinality?

 

Keep labels to values with a small, fixed set of options: endpoint name, status class, region. Put unique identifiers such as user IDs, order numbers or full URLs in logs or traces instead, where they belong. A useful rule is to ask whether you would ever draw a separate line on a graph for each value. If not, it should not be a label.

    

### What does an example of cardinality look like?

 

```
http_requests{user_id="..."} → millions of series = bad
```

 

## At a glance

   CategoryObservability Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026

 

## More Observability terms

 

- [burn rate](<https://delaparra-services.nl/knowledge-hub/burn-rate>) 
- [context propagation](<https://delaparra-services.nl/knowledge-hub/context-propagation>) 
- [counter](<https://delaparra-services.nl/knowledge-hub/counter>) 
- [Datadog](<https://delaparra-services.nl/knowledge-hub/datadog>) 
- [error budget](<https://delaparra-services.nl/knowledge-hub/error-budget>) 
- [gauge](<https://delaparra-services.nl/knowledge-hub/gauge>)

 

[All terms starting with C](<https://delaparra-services.nl/knowledge-hub#letter-c>)

 

## Skills

 

- ### Sentry PHP SDK

 

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.

 [View skill](<https://delaparra-services.nl/skills/sentry-php-sdk>) [Download zip](<https://delaparra-services.nl/skills/sentry-php-sdk/download>) 
- ### Prometheus Configuration

 

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.

 [View skill](<https://delaparra-services.nl/skills/prometheus-configuration>) [Download zip](<https://delaparra-services.nl/skills/prometheus-configuration/download>) 
- ### SLO Implementation

 

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.

 [View skill](<https://delaparra-services.nl/skills/slo-implementation>) [Download zip](<https://delaparra-services.nl/skills/slo-implementation/download>)

 [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/cardinality/skills.zip>)

 

## Manuals

 

- [Logging and monitoring for your app](<https://delaparra-services.nl/manuals/logging-en-monitoring>) 
- [Understanding common error messages](<https://delaparra-services.nl/manuals/foutmeldingen-begrijpen>)

 

## Related services

 

- [Custom software and web applications](<https://delaparra-services.nl/services#service-03>)

Perhaps your customers need somewhere to download their invoices, or your staff are managing bookings in a spreadsheet. 
- [AI code review](<https://delaparra-services.nl/services#service-05>)

When you push your new change, I will review your code, help your agent avoid the same mistake again, and get your app ready for deployment.

 

## Need any help?

 

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.

  [Get in touch](<https://delaparra-services.nl/availability>)

[HTML version](https://delaparra-services.nl/knowledge-hub/cardinality)
