Optimize cost: Cloud operations

This document in the Google Cloud Architecture Framework provides recommendations to help you optimize the cost of monitoring and managing your resources in Google Cloud.

The guidance in this section is intended for cloud users who are responsible for monitoring and controlling the usage and cost of their organization's resources in the cloud.

Google Cloud's operations suite is a collection of managed services that you can use to monitor, troubleshoot, and improve the performance of your workloads in Google Cloud. These services include Cloud Monitoring, Cloud Logging, Error Reporting, Cloud Debugger, Cloud Trace, and Cloud Profiler. One of the benefits of managed services in Google Cloud is that the services are usage-based. You pay only for what you use and by the volume of data, with free monthly data-usage allotments, and unlimited access to Google Cloud metrics and audit logs.

Cloud Logging

The following are recommendations to help you optimize the cost of your Logging operations:

  • Filter billing reports to show Logging costs.
  • Reduce the volume of logs ingested and stored, by excluding or filtering unnecessary log entries.
  • Verify whether the exclusion filters are adequate by monitoring the billing/bytes_ingested and billing/monthly_bytes_ingested metrics in the Google Cloud Console.
  • Offload and export logs to lower-cost storage (Cloud Storage Coldline or Cloud Storage Archive).
  • When streaming logs from third-party applications, reduce log volumes by using the logging agent on only production instances or by configuring it to send less data.

Cloud Monitoring

The following are recommendations to help you optimize the cost of your Monitoring operations:

  • Optimize metrics and label usage by limiting the number of labels. Avoid labels with high cardinality. For example, if you use an IP address as a label, each IP address would have a one-item label series, resulting in numerous labels when you have many VMs.
  • Reduce the volume of detailed metrics for applications that don't require these metrics, or remove the monitoring agent, especially for nonessential environments.
  • Minimize the ingestion volume by reducing the number of custom metrics that your application sends.

Cloud Trace

The following are recommendations to help you optimize the cost of your Trace operations:

  • If you use Trace as an export destination for your OpenCensus traces, reduce the volume of traces that are ingested, by using the sampling feature in OpenCensus.
  • Limit the usage of Trace, and control cost by using quotas. You can enforce span quotas using the API-specific quota page in the Cloud Console.

What's next