3
3
Table of Contents

Many organizations assume Cloud Logging costs are driven solely by the logs they generate. However, as cloud environments scale, logging expenses often increase due to hidden costs associated with log ingestion, storage, and retention.

Without proper GCP infrastructure visibility, organizations can end up paying for excessive log volumes, unnecessary storage, and over-retained data. Understanding these cost drivers is essential for optimizing logging spend while maintaining operational and security visibility.

Cloud Logging costs are primarily driven by three components:

  • Log Ingestion – The volume of log data written into Cloud Logging.
  • Log Storage – The amount of log data stored in logging buckets.
  • Log Retention – The duration logs are retained beyond the included retention period (30 days).

1. Log Ingestion Cost

GCP Cloud Logging charges for all ingested billable log data, not just application logs. Google provides a 50 GiB free ingestion allowance per project per month, but charges apply once this limit is exceeded

What Users Think

"I only pay for the logs generated by my application."

What You're Actually Paying For

Cloud Logging charges for all ingested billable log data, not just application logs.

For example, a Google Compute Engine VM may generate:

  • System logs
  • Application logs
  • Startup and shutdown logs
  • Ops Agent logs
  • Audit logs
  • VPC Flow Logs
  • Load Balancer logs

As infrastructure grows, these additional log sources can significantly increase ingestion costs.

How to Check

You can add a Cloud Billing Export query before the Log Analytics query to identify the actual ingestion cost.

1. Review Log Ingestion Cost from Billing Export

1. Review Log Ingestion Cost from Billing Export

Purpose:

This query identifies the Cloud Logging ingestion-related SKUs that contribute to your logging bill and shows both the associated cost and the ingested log volume.

2. Identify High-Volume Log Sources in Log Analytics

2. Identify High-Volume Log Sources in Log Analytics

Purpose:

This query helps identify which resources and log streams are generating the highest volume of log entries. While it does not directly calculate costs, it helps pinpoint the sources driving ingestion charges.

Optimization Tips
  • Exclude low-value logs using Cloud Logging → Logs Router → Exclusions.
  • Reduce DEBUG and verbose logging in production.
  • Tune VPC Flow Log sampling and metadata settings.
  • Use Log Analytics to identify noisy resources.

Example exclusion filter:

Sample exclusion filter

The objective is not to collect fewer logs, but to collect the right logs.

2. Log Storage Cost

After ingestion, logs are stored in Cloud Logging buckets. Storage costs are often overlooked, especially when large volumes of historical logs accumulate over time.

What Users Think

"I already paid to ingest the logs, so storage is included."

What You're Actually Paying For

You're charged for storing log data in logging buckets. As log volumes grow, storage costs can become a significant part of the overall logging bill.

How to Check

Navigate to: Cloud Logging → Logs Storage

Review:

  • Bucket Size
  • Stored Log Volume
  • Storage Growth Trends

These metrics help identify the buckets that contribute most to storage costs.

Optimization Tips

  • Export infrequently accessed logs to Cloud Storage.
  • Create separate buckets for critical and non-critical logs.
  • Regularly review bucket growth and storage usage.
  • Delete unused or obsolete buckets.

The most cost-effective log is one that remains accessible when needed and archived when it is no longer actively used.

3. Log Retention Cost

Log retention costs occur when logs are retained longer than necessary. While extended retention supports compliance and auditing requirements, it can also become a hidden cost driver.

What Users Think

"We might need these logs someday, so let's keep them."

What You're Actually Paying For

Cloud Logging includes 30 days of retention at no additional cost. Retaining logs beyond 30 days incurs retention charges based on the volume of data stored.

How to Check

Navigate to: Cloud Logging → Logs Storage → Bucket Details

Review:

  • Retention Period
  • Bucket Size
  • Stored Log Volume

Focus on buckets configured with extended retention periods.

Optimization Tips

  • Align retention periods with compliance requirements.
  • Use shorter retention periods for non-production environments.
  • Archive long-term logs to Cloud Storage.
  • Regularly review buckets with extended retention.

Retain logs for as long as they provide operational, security, or compliance value—not longer.

Conclusion

Cloud Logging costs extend far beyond simple log generation. Ingestion, storage, and retention each contribute to the overall bill, often in ways that are not immediately visible.

Regularly reviewing log sources, storage consumption, and retention policies can help organizations reduce unnecessary costs while preserving the observability and auditability needed to operate effectively.

12
Let's discuss your cloud challenges and see how CloudKeeper can solve them all!
Meet the Author
  • Kanshika
    DevOps Engineer

    Kanishka specializes in Google Cloud Platform (GCP) and architecting automation solutions that simplify, scale, and secure cloud workloads.

No Comments Yet
Leave a Comment

Speak with our advisors to learn how you can take control of your Cloud Cost