googleapis / googleapis/google-cloud-go
cloudprofiler: Configurable sample rate
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 1.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 109
Description
**Is your feature request related to a problem? Please describe.**
There is no mechanism to configure (reduce) the sample rate of the [profiler](https://pkg.go.dev/cloud.google.com/go/profiler) package, and thus reduce the number of update requests per minute to the Cloud Profiler API. The default GCP quota for Cloud Profiler API update requests is 100 per minute, and the profiler makes [1 update request per profile type per minute](https://cloud.google.com/profiler/quotas#quotas_and_limits). So, 20-25 services in a single GCP project will hit this quota easily with default profile types (faster if you enable mutexes).
**Describe the solution you'd like**
The [profiler.Config](https://pkg.go.dev/cloud.google.com/go/profiler#Config) type has a positive integer `SampleRate` field that allows you to specify the number of minutes between samples (default, minimum 1).
**Describe alternatives you've considered**
Increasing GCP quota for the API
Contributor guide
Assessment
This issue has not been assessed yet.