—unique
Counts the number of distinct values for a given field. Useful for cardinality checks — how many unique users hit an error, how many regions are active, etc.
Syntax
--unique:<field> Examples
--unique:context.userId
--unique:context.region
--unique:context.env
--unique:level Combine with filters:
level:error @last-24h --unique:context.userId
context.gateway:stripe --unique:context.orderId Notes
- Returns a single count, not the list of values (use
--topif you want the values themselves) - Works on any field available in your logs