1
votes

I run a Google Cloud dataflow job. I know how to monitor elementCount metric coming from it. But that metric shows me the total number of events processed by the job from its start. But how to monitor the rate? Like events per timespan, per minute in Stackdriver?

Ideally, I would like to apply a simple transformation on the elementCount metric inside the Stackdriver. But I'm afraid I would need to send a separate metric computed in the Dataflow job...

1

1 Answers

3
votes

You can access all the stackdriver metrics via the API (although the elementCount is a gauge, you can fetch the time series). Here are all the dataflow metric in StackDriver:

https://cloud.google.com/monitoring/api/metrics_gcp#gcp-dataflow

Probably you need todo some calculations on the timeseries if you want to have the correct rate per time windows.

The API timeseries documentation is here:

https://cloud.google.com/monitoring/api/ref_v3/rpc/google.monitoring.v3

You can even access the API's in your dataflows. Note, that I think the way the metrics is used it should have been a counter.