Hi,
How can we get billing details for pubsub grouped by topics(pubsub google resources) .
This question was asked in 2018.
https://groups.google.com/g/cloud-pubsub-discuss/c/8-mVLtCte1c/m/h3scdxfyBQAJ
It was answered that "Billing: At the moment, GCP project is the only dimension available in billing reports for Pub/Sub. We are working to make billing labels available in the coming months. ".
So if we have that now please help us with it.
Solved! Go to Solution.
In 2018, the billing reports for Pub/Sub were only available at the GCP project level. Since then GCP introduce billing labels, which would provide a more granular level of billing detail.
Labels are key-value pairs that help you organize your Google Cloud resources. You can attach a label to each resource, then filter the resources based on their labels. Information about labels is forwarded to the billing system, so you can break down your billed charges by label. In the context of Pub/Sub, labels are often used to organize fees for a given billing account. You can use labels to associate different Pub/Sub resources (such as topics and subscriptions) with a common cost center.
To use labels for filtering your billing data, you can follow these steps:
For more details see https://cloud.google.com/pubsub/docs/labels
In 2018, the billing reports for Pub/Sub were only available at the GCP project level. Since then GCP introduce billing labels, which would provide a more granular level of billing detail.
Labels are key-value pairs that help you organize your Google Cloud resources. You can attach a label to each resource, then filter the resources based on their labels. Information about labels is forwarded to the billing system, so you can break down your billed charges by label. In the context of Pub/Sub, labels are often used to organize fees for a given billing account. You can use labels to associate different Pub/Sub resources (such as topics and subscriptions) with a common cost center.
To use labels for filtering your billing data, you can follow these steps:
For more details see https://cloud.google.com/pubsub/docs/labels
Thanks @ms4446 .
@ms4446 Thanks for the detail around the subject.
I have a topic and 100s of subscribers of the topic, one subscriber for each customer on our platform. So with labels (attached to subscription), can I have the billing details for each subscription by going to billing page and filtering wit PubSub as resource ?
To get the billing details for each Pub/Sub subscription, you can leverage the functionality of labels. For more details refer to:
https://cloud.google.com/pubsub/docs/labels
The cost of Pub/Sub has three main components: Throughput costs for message publishing and delivery, Storage costs for snapshots, messages retained by topics, and acknowledged messages retained by subscriptions, and Egress costs associated with throughput that crosses a Google Cloud zone or region boundary For details please refer to: https://cloud.google.com/pubsub/pricing
In your case, you could apply a unique label to each customer's subscription. These labels are key-value pairs, with certain requirements:
This way, by filtering by labels, you should be able to see the billing details for each subscription. Note that while you can use labels to organize fees by billing account, no additional fees are charged for the use of Pub/Sub labels.