The Cloud Pub/Sub API exports usage metrics that can be monitored programmatically or accessed via Stackdriver Monitoring. You can create dashboards, set up alerts, and set up an autoscaler to manage publisher or message processing (subscriber) instances running on Compute Engine.

Note that although Cloud Pub/Sub itself is scaled automatically, you are responsible for managing your Pub/Sub quota.

Viewing metrics

Go to Stackdriver in Google Cloud Platform Console to view Stackdriver monitoring dashboards or to define Stackdriver alerts. You can also use the Stackdriver monitoring API to query and view metrics for subscriptions and topics.

Metrics and resource types

Monitor topic or subscription quota utilization

You can use the APIs and services quotas dashboard to monitor the current utilization for a given topic or subscription.

Those metrics are:

Note that these metrics are in bytes, whereas quota is measured in kilobytes.

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Pub/Sub Documentation