Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Log-based Metric Count Metric Monitoring Normalization

I'm attempting to show the count of a specific error, grouping by software version, to better understand how the software version impacts the error. 
We have many devices on several different software versions. I can see the total number of errors counted for each software version, but for this information to be a useful comparison between versions I would need to know how many errors we're getting per total number of devices on the software version (normalized per devices on software version).
I'm not seeing a good way to do this. My current idea is to add an infrequent periodic chirp from every device and convert that to a log-based count metric (since we have so many devices, we aren't currently posting any other metrics from every device). I think I could use this as a secondary metric and track the ratio. The thing I'm struggling with is setting the configuration so I get a persistent and reliable total count of devices. I could configure a large alignment period to capture the infrequent chirp, but I'm thinking the next chirp would add to the count and give an inflated number if in the alignment period. 
Is there a way to ensure a reliable total device count could be persistent and used for a ratio? It's worth noting each chirp would have a unique device ID, so if there's a way to count the number of unique device IDs, it could help with a long alignment. 

0 2 410
2 REPLIES 2

The description and nature of your issue requires more information from your project. Please contact our support team, they can provide a better recommendation since they have access to inspect your project.

@danielcueva depending on how you want to present this metric, you should be able to define a log-based metric for all error logs that are generated by your devices and to add a label with the software version of the device. This way the metric will capture all logs and you should be able to normalize it based on the label.

Top Solution Authors