Grouping by high cardinality metrics?

188 views
Skip to first unread message

Ryan B

unread,
Jul 13, 2021, 11:57:49 PM7/13/21
to Google Stackdriver Discussion Forum
Hi all! First off, thanks for building and maintaining GCM/Stackdriver, Google people. It's great!

I have a log-based metric with a high cardinality label. When I try to graph it over a time period with ~5-10k unique values, Monitoring struggles to include them all individually:

Screen Shot 2021-07-13 at 8.07.44 PM.png

Is there any way to break out just the top N values and collapse the rest? Preprocessing function, group by parameter, anything else? Happy to use MQL if necessary.

(I know this is a nontrivial problem in the general case, streaming algorithms etc, but I'm fine with any approximation that works and doesn't hang my browser for 10s of seconds at a time. 😁)

Mary Koes

unread,
Jul 14, 2021, 12:42:39 AM7/14/21
to Ryan B, Lee Yanco, Joy Wang, Google Stackdriver Discussion Forum
Hi Ryan!

Thanks for reaching out with your challenge. Would outlier mode work for your use case?
image.png

@Lee Yanco and @Joy Wang may have better suggestions...

Thanks again,

Mary


--
© 2021 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/ddbda970-aff8-4b3e-bcad-999a790ee2c5n%40googlegroups.com.

Igor Peshansky

unread,
Jul 14, 2021, 12:42:42 AM7/14/21
to Ryan B, Google Stackdriver Discussion Forum
Are you looking for top?
        Igor

On Tue, Jul 13, 2021 at 11:57 PM Ryan B <goo...@ryanb.org> wrote:
--

Lee Yanco

unread,
Jul 14, 2021, 11:55:01 AM7/14/21
to Mary Koes, Ryan B, Joy Wang, Google Stackdriver Discussion Forum
Hey Ryan,


These should filter out your chart to just the highest X time series.


--

Google Logo
Lee Yanco
Product Manager
lya...@google.com

Ryan B

unread,
Jul 14, 2021, 12:51:40 PM7/14/21
to Google Stackdriver Discussion Forum
Oh, awesome! Apologies, no clue how I missed that. This is perfect, thanks!
Reply all
Reply to author
Forward
0 new messages