Cloud Trace enforces two different types of quotas: a rate quota on your API requests and an ingestion quota on spans you send to Trace.
Trace API usage limits
|API method||Total quota units|
||300 per 60 seconds|
||4,800 per 60 seconds|
You have a total of 300 quota units per 60 seconds for the three API
ListSpan. Here are two different
examples of how you could use all of the available quota units:
- Make 12
ListTracesAPI calls per 60 seconds.
- Make 10
ListTracesAPI calls and 50
GetTraceAPI calls per 60 seconds.
Additional restrictions and limits for the Cloud Trace API are:
|Restrictions and limits||Value|
|Maximum number of spans per
|Maximum number of spans per
|Maximum number of traces per
||1,000 in ROOTSPAN/Minimal view 100 in COMPLETE view|
|Maximum number of spans per trace||1,000|
|Maximum number of bytes per trace||50 MB|
|Maximum number of label/attributes per span||32|
|Size of key per label/attribute||128 bytes|
|Size of value per label/attribute||256 bytes|
Requesting more Cloud Trace API quota
You can request higher Cloud Trace API limits using the Google Cloud Console:
In the Quotas page, use the checkboxes to select Cloud Trace API, then click EDIT QUOTAS.
Billing must be enabled on the project in order to click the checkboxes.
In the Edit Quotas panel, complete the form with your Name, Email , and Phone details, then click Next.
In the Edit Quotas panel, select the service to expand the view, then edit the quotas in that service to your requested limit. Click Done.
Click Submit request.
You can also contact Google Cloud Support, rather than using the Google Cloud Console, to request more Cloud Trace API quota.
The other limits described on this page are fixed.
For more information, go to Working with quotas.
Trace daily span ingestion limit
Your daily trace span ingestion quota is determined by your billing account history and requests you have made for a quota increase. The table lists the range of quota allocations:
|Ingested spans||3,000,000 per day - 5,000,000,000 per day|
How do quotas relate to pricing?
Daily span quotas define the limit on the number of spans that can be ingested prior to the API call failing with a resource exhausted error. API rate quotas define the limits on the rate of API calls that can be made prior to the API call failing with a resource exhausted error.
Each API call consumes API quota. Each write API call also consumes daily span ingestion quota. For example, if you need to patch 10,000 spans, you can:
patchTracesrequest with the 10,000 spans.
patchTracesrequests each with 1 span, and distribute these over several minutes to avoid API quota limits.
The first approach uses 1 API quota unit and the second approach uses 10,000 API quota units. Both approaches use 10,000 daily span ingestion quota units. The price of the two approaches is the same because the price is determined by the number of spans ingested, not the number of API calls.
Trace retention periods
|All trace span data||30 days
|Analysis reports||30 days
Managing your quota
To make sure that you do not run out of quota and lose observability into your apps' performance, periodically view your quota usage or create an alerting policy. For detailed information on monitoring your API requests and understanding their responses, see Monitoring your API usage.
See Viewing your quota to view your Cloud Trace API and your daily span ingestion quotas.
See Capping usage to decrease your API quota units and your daily span ingestion quota units.
See Requesting more quota to request an increase in your API quota units or your daily span ingestion quotas.
See Creating an over-quota alert for detailed information on creating alerting policies to monitor your Trace API quota and your rate trace span ingestion.