Trace API usage limits
The following quotas apply to your use of Stackdriver Trace:
|API Call Method Class||Quota units|
|Read||300 per 60 seconds|
|Write||4,800 per 60 seconds|
Each API method will consume your quota at different rates, as summarized in the table below:
|API Method||API Call Method Class||Quota unit cost per API call|
From these 2 tables you will notice that Read API calls vary in their costs. Here are a couple of examples of how you might use your quota:
- Make 12 ListTraces API calls per 60 seconds.
- Make 10 ListTraces API calls and 50 GetTrace API calls per 60 seconds.
PatchTraces has the following limits enforced:
- Number of spans per request: 25,000
GetTrace has the following limits enforced:
- Number of traces per request: 1,000
ListTraces has the following limits enforced:
- Number of traces per request (in ROOTSPAN/MINIMAL view): 1,000
- Number of traces per request (in COMPLETE view): 100
Traces have the following limits enforced (per trace):
- Number of spans: 1,000
- Number of bytes: 50 MB
Spans have the following limits enforced (per span):
- Number of labels/attributes: 32
Labels/Attributes have the following limits enforced (per label/attribute):
- Size of key: 128 Bytes
- Size of value: 256 Bytes
Managing your API usage
To make sure you are not running out of quota and losing observability into your apps’ performance, do the following on a regular basis:
- Check your Trace quota usage: See the API dashboard for your current API activity. In the data table below the line-graph area, the Stackdriver Trace API row reflects your activity for the last 30 days. You can compare these figures to those in the Trace API usage limits section above.
To learn more about monitoring your API requests and their responses, see Monitoring your API usage.
Trace retention periods
|All trace span data||30 days
|Analysis reports||30 days