Skip to content

Estimate distinct log values with approx_count_distinct

Update4 days agoUnverifiedAdded Oct 2, 2026

Estimate how many distinct values appear in your logs when an exact count would create too many series. count by ( ) returns one series for every distinct value. For a field such as a user ID, IP address, or session token, that series count can hit Loki’s maximum series limit or time out the query.

Topics: SQL, Observability, Developer tools

Grafana Labs's release notes

More Grafana Cloud releases

Every Grafana Cloud release
DateRelease
Sep 294 days ago
Update
Sep 303 days ago
Preview
Sep 303 days ago
GA
Oct 12 days ago
Update
Sep 258 days ago
Update
Sep 249 days ago
Update
Sep 249 days ago
Update
Sep 249 days ago
GA

Also shipped on Sep 29, 2026

Grafana Labs in September 2026

New releases by email

Tuesday mornings: the week's data, AI and developer-tools releases, only in weeks when something shipped.

Double opt-in. Unsubscribe any time.