To help you plan capacity and avoid service disruptions, Cloud Logging applies quotas and system limits to API requests, storage, and resource configurations. You can request increases for most quotas, but system limits are fixed and can't be changed.
Logging quotas and usage limits
The following table lists quotas and limits that apply to the usage of Cloud Logging. In general, you can request an increase for a quota. However, limits can't be changed.
Some entries are listed as being per project, but the note indicates that the entry also applies to billing accounts, folders, and organizations and isn't hierarchical. For example, if you have multiple Cloud de Confiance projects in an organization, then you could configure up to 200 sinks for each Cloud de Confiance project; for that same organization, you could also configure up to 200 sinks at the organization level.
| Category | Maximum value of limit or initial quota value |
Notes |
|---|---|---|
Size of a
LogEntry |
256 KiB | This limit is approximate and is based on internal data sizes, not the actual REST API request size. Cannot be increased. |
| Size of an audit log entry | 512 KiB | Cannot be increased. |
| Number of labels | 64 per LogEntry |
Cannot be increased. |
Length of a LogEntry label key |
512 B | Cloud Logging truncates oversized label keys when the associated log entry is written. Cannot be increased. |
Length of a LogEntry label value |
64 KiB | Cloud Logging truncates oversized label values when the associated log entry is written. Cannot be increased. |
| Length of a Logging query language query | 20,000 characters | Cannot be increased. |
| Query fanout | 200 buckets | This limit is the maximum number of buckets that might contain log entries for a resource. For more information, see Query returns an error. Cannot be increased. For performance reasons, minimize the number of log buckets and create your log buckets in one region. If you frequently need to query log entries that originate in different resources, then consider routing log entries to a few centralized log buckets. |
| Number of sinks | 200 per Cloud de Confiance project | Can be increased to 4,000. This quota also applies to billing accounts, folders, and organizations and isn't hierarchical. |
| Length of a sink inclusion filter | 20,000 characters | Cannot be increased. |
| Length of a sink exclusion filter | 20,000 characters | Cannot be increased. |
| Number of exclusion filters | 50 per sink | Cannot be increased. If you need more than 50 exclusion filters, then refine the inclusion filter. |
| Number of log buckets | 100 per Cloud de Confiance project | Can be increased to 2,500. This quota is the maximum number of buckets that might contain log entries for a resource and it includes buckets that are pending deletion. This quota also applies to billing accounts, folders, and organizations and isn't hierarchical. If you increase the maximum number of log buckets, then you might have a degraded user experience because the default log scope can't include all log buckets in a project. |
| Number of custom indexed fields | 20 per log bucket | Cannot be increased. Cloud Logging supports full-text indexing. Therefore, we don't recommend that you define custom indexing. |
| Number of log views | 30 per log bucket | Can be increased to 1,000 log views on a single log bucket. If you increase the maximum number of log views, then you might have a degraded user experience because the default log scope can't include all log views in a project. |
| Oldest timestamp that can be stored in log buckets | Determined by the retention period of the log bucket. | For a custom log bucket with the default retention period, this value is 30 days in the past. The Logging API accepts log entries with older timestamps, and those log entries are routed to sink destinations. However, if log entries with older timestamps are routed to a log bucket, then they aren't stored. |
| Future timestamp that can be stored in log buckets | Up to 1 day in the future | The Logging API rejects entries with timestamps
more than 1 day in the future and returns an
INVALID_ARGUMENT error. Cannot be increased. |
| Number of log scopes per resource | 100 | Can be increased to 10,000. |
| Number of log views and projects included in a log scope | 100 | We recommend that a log scope list log views instead of projects when possible. Listing log views results in reduced query time and increased clarity as to which log entries are being queried. |
| Number of projects included in a log scope | 5 | We recommend that a log scope list log views instead of projects, when possible. The log views can be in different projects. |
Logging API quotas and limits
The following limits apply to your usage of the Logging API. You can request changes to your Logging API quotas and limits; for instructions, see Request changes to Cloud Logging API quotas on this page.
To view your API quotas, go to the API dashboard, select an API, and then select Quotas.
| Category | Maximum value of limit or initial quota value |
Notes |
|---|---|---|
| Lifetime of API page tokens | 24 hours | Cannot be increased. |
Size of an entries.write request |
10 MB | Cannot be increased. |
Rate of entries.write requests,
by region |
4.8 GB per minute, per Cloud de Confiance project in the regions
asia-east1,
asia-northeast1,
asia-southeast1,
asia-south1,
europe-west1,
europe-west2,
europe-west3,
europe-west4,
us-central1,
us-east4,
us-west1
300 MB per minute, per Cloud de Confiance project in all remaining regions |
You can request a quota increase. This quota also applies to billing accounts, folders, and organizations and isn't hierarchical. For more information about these quotas, see Per-region ingestion quotas. Using exclusion filters
doesn't reduce the rate of write requests because log entries are
excluded after the |
Number of entries.list requests |
60 per minute, per Cloud de Confiance project | Cannot be increased. This limit also applies to billing accounts, folders, and organizations and isn't hierarchical. To query large volumes of logs, consider using BigQuery APIs. For transferring large volumes of logs, consider using a log sink or copying log entries. |
Number of different resource names in a
single entries.write command |
1000 | Cannot be increased. The |
| Control requests per minute | 600 | Cannot be increased. This quota applies to all requests included in the daily control-request quota, plus API requests for deleting logs and managing log-based metrics. |
| Control requests per day | 1,000 per Cloud de Confiance project | Cannot be increased. This quota applies to API requests for creating and updating exclusions and sinks. |
| Number of Cloud de Confiance projects or other resource names in a single entries.list request |
100 | Cannot be increased. |
| Rate of exports to Pub/Sub topics | 60 GB/min per Cloud de Confiance project, folder, or organization where the sink is defined | You can file a support request to raise your quota. An increased quota is granted based on Pub/Sub availability. If the rate of exports exceeds the quota, then the error is
recorded in a log entry. The summary field indicates a sink
configuration error, and the error code is listed as
For troubleshooting information, see Quota issues with sinks. |
Per-region ingestion quotas
To improve isolation and protect regional resources from ingestion overload, Cloud Logging quotas restrict the volume of data written to an ingestion region on a per-Cloud de Confiance project basis.
The following table shows the default quota for each region:
| Ingestion region | Default value |
|---|---|
asia-east1,
asia-northeast1,
asia-southeast1,
asia-south1,
europe-west1,
europe-west2,
europe-west3,
europe-west4,
us-central1,
us-east4,
us-west1
|
4.8 GB per minute, per Cloud de Confiance project |
| All remaining regions | 300 MB per minute, per Cloud de Confiance project |
The default values for the regional quotas exceed the ingestion volumes of most users. However, if your project's ingestion volume from a region was close to or higher than the default quota in the six or more months before quotas were enforced, then your initial quota includes an automatic, one-time increase. Therefore, your quotas might be higher than the defaults in the preceding table. For information about reviewing quotas, see Review your Cloud Logging API quotas.
If you exceed a regional quota, then your write requests to the Cloud Logging API might be rejected with a "resource exhausted" error message. For recommendations to help you avoid exceeding quotas, see Manage and monitor your Logging quotas.
Review your Cloud Logging API quotas
To review your Cloud Logging API quotas, do the following:
-
In the Cloud de Confiance console, go to the Quotas & System Limits page:
If you use the search bar to find this page, then select the result whose subheading is IAM & Admin.
- Filter the list of quotas for the Cloud Logging API service.
Request changes to Cloud Logging API quotas
To determine whether you can request a higher or lower Logging API limit for quota by using the Cloud de Confiance console, go to the Quotas & System Limits page and search for the quota of interest.
- If the quota is listed, then you can use that page to request a change to the limit. For information about those steps, see View and manage quotas.
- If the quota isn't listed or if you request a quota update and get the error
Edit is not allowed for this quota, then contact Support and request a change to the quota. Billing must be enabled on the Cloud de Confiance project to edit quotas in the Cloud de Confiance console.
Manage and monitor your Cloud Logging API quotas
To prevent service disruptions caused by exceeding quotas, you can do the following:
- Use automatic quota adjustment to monitor your quota usage and request increases for you. For more information, see Quota adjuster.
- Create alerts on quotas to notify you about usage. For more information, see Set up quota alerts.
Optimize usage of entries.list
The expected usage of entries.list is to search for
matching logs. This method isn't intended for high-volume retrieval of
log entries. If
you're regularly exhausting your entries.list quota, then consider the
following options:
Ensure that you are using the Cloud Logging API effectively. For more information, see Optimize usage of the API.
If you know in advance that the log entries you want to analyze exceed the
entries.listquota, then configure a log sink to export your logs to a supported destination.
Audit logging
The maximum sizes of audit logs are shown in the following table. These values can help you estimate the space you need in your sink destinations.
| Audit log type | Maximum size |
|---|---|
| Admin Activity | 512 KiB |
| Data Access | 512 KiB |
| System Event | 512 KiB |
| Policy Denied | 512 KiB |
Logs retention periods
The following Cloud Logging retention periods apply to log buckets, regardless of which types of logs are included in the bucket or whether they were copied from another location:
| Bucket | Resources | Default retention period | Custom retention |
|---|---|---|---|
_Required |
project, folder, organization | 400 days | Not configurable |
_Default |
folder, organization | 30 days | Not configurable |
_Default |
project | 30 days | Configurable |
| User-defined | project | 30 days | Configurable |
For _Default and user-defined log buckets that are in projects, you can
configure Cloud Logging to retain your logs between
1 day and
400 days. For information about setting retention
rules, see Configure custom retention.
To store log entries from a folder or organization for longer than 30 days, create a log sink and route those log entries to a log bucket in a project.