I need to create a metric from a value using the countDistinct function and to save that value over time, the DQL query is the following:
fetch logs
| FILTER matchesValue(k8s.container.name, "onboarding-service") AND matchesPhrase(content, "\"result\":\"ok\",\"step\":\"cvu\"") AND matchesPhrase(content, "triggering next step with state machine")
| summarize countDistinct(client.id), alias: CvuCreadoPorCliente
I can imagine some possible solutions (or rather workarounds)…
What is the cardinality of client.id? How many of them are active in the same moment (e.g. in 1 minute)? What is the desired time resolution for this metric (does it have to be 1 minute or maybe 1h is good enough?)
But answering your question regarding examples for summarization in log processing:
or if you use OpenPipeline already:
My question was toward: how we can use supported summarizations (sum or count) to get data with reduced volume enough but still detailed enough to calculate countDistinct
We’re working on a metric to count distinct users per page. We initially tried using UserId and Page.name as dimensions, but ran into issues with high cardinality.
Would you be open to sharing any ideas or suggestions on how we might approach this more efficiently?
Hey @DanielS@ANLTH ,
I just wanted to check in and see if you still need help with this. If so, I’d be happy to look into it for you! :blush:
Please let me know what works best for you.