7

Context:

I'm attempting to use Google Cloud's monitoring SDK to publish metrics on error status codes, latency and other server-side metrics.

Due to the rate of requests per second on my machines, this will exceed Google's metric limit of 1 datapoint for 10 seconds.

I am using the instance_id as one of the labels, so they will be unique per machine, but I will still exceed the 1 datapoint / 10 seconds.

Question:

As mentioned in a similar question, here, an option would be to log, buffer and forward the messages. This seems strange to have each customer implement this for common high-rate metric use-cases.

Is there an alternative way of recording high-rate metrics with the sdk such as latency, num requests, num errors?

Resources:

https://cloud.google.com/monitoring/quotas
https://cloud.google.com/monitoring/custom-metrics/creating-metrics#monitoring_create_metric-nodejs
One or more points were written more frequently than the maximum sampling period configured for the metric

inqdev
  • 71
  • 4
  • 1
    A time series is active if you have written data points to it within the previous 24 hours. For custom and external metrics, including Prometheus3 metrics, the limit applies to the total number of active time series across all custom metric types, or across all external metric types, for a single monitored resource. An exception is the global monitored resource, for which the limit applies to each metric type separately. This is a system-wide safety limit and isn't customizable. Let me know if I misunderstood your use-case. – Md Daud Walizarif Jun 30 '20 at 01:24
  • 1
    I also can't find an answer to this question. I don't have a heavy load, but I do log events that happen in series 10-50, and I want to log each one individually. Not having an ability to track a lot of data sounds like a strange limitation for such service, and it feels like I miss something fundamental. – Sasha Koss Jul 20 '20 at 18:09
  • What do you wand to do with these metrics? – guillaume blaquiere Jul 20 '20 at 18:59
  • I run a social media management app and track how many tweets/thread got published or failed to publish. If the number is too low or too high, I want to know about it. – Sasha Koss Jul 21 '20 at 07:10
  • 1
    Since you're probably already logging those actions to Stackdriver Logging, have you thought about [logs-based metrics](https://cloud.google.com/logging/docs/logs-based-metrics)? You just log the result of the actions (latency, success, etc...) and the system will group the information by itself. – Jofre Jul 22 '20 at 08:44
  • I'm collecting the same metrics but using ^ logs-based-metrics and GCP trace – confiq Jul 22 '20 at 17:23

0 Answers0