You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And we got error in shutdown process because export backend is Google Cloud Monitoring and it has quota of Rate at which data can be written to a single time series, one point each 5 seconds. https://cloud.google.com/monitoring/quotas#custom_metrics_quotas
This is due to Shutdown forces export and ignores the interval, so there are cases where the Shutdown process sends a metrics immediately after the previous export in run goroutine.
I understand that in some cases the interval is a long number of seconds, so if we change Shutdown wait for the interval, the shutdown process will take longer.
It would be nice if the user side could stop the periodic export and wait a certain number of seconds before handling the final flush, but currently this seems difficult because the export is done in Shutdown.
To solve this with keeping backward compatibillity, I think we can add option of a minimum number of seconds to wait in Shutdown.
Example Error message.
This is an error message of export.
*status.Error: rpc error: code = InvalidArgument desc = One or more TimeSeries could not be written: timeSeries[0-3]: write for resource=spanner_instance_client{client_hash:xxxx,instance_config:unknown,location:xxxxx,instance_id:xxxx} failed with: One or more points were written more frequently than the maximum sampling period configured for the metric.
Sorry this is difficult to provide complete code, because we need to use Google Cloud project and enable Cloud Monitoring and Cloud Spanner to reproduce.
I thought if there are similar rate limit cases on the backend of other exporters, it would be nice if otel side handles it.
But I'll try to discuss to exporter side about this issue. googleapis/google-cloud-go#12017
Uh oh!
There was an error while loading. Please reload this page.
Description
We are using
go.opentelemetry.io/otel/sdk/metric.(*PeriodicReader)
viacloud.google.com/go/spanner
in following code.https://github.com/googleapis/google-cloud-go/blob/spanner/v1.78.0/spanner/metrics.go#L270-L275
And we got error in shutdown process because export backend is Google Cloud Monitoring and it has quota of
Rate at which data can be written to a single time series
,one point each 5 seconds
.https://cloud.google.com/monitoring/quotas#custom_metrics_quotas
This is due to
Shutdown
forces export and ignores the interval, so there are cases where theShutdown
process sends a metrics immediately after the previous export inrun
goroutine.I understand that in some cases the interval is a long number of seconds, so if we change
Shutdown
wait for the interval, the shutdown process will take longer.It would be nice if the user side could stop the periodic export and wait a certain number of seconds before handling the final flush, but currently this seems difficult because the export is done in
Shutdown
.To solve this with keeping backward compatibillity, I think we can add option of a minimum number of seconds to wait in
Shutdown
.Example Error message.
This is an error message of export.
Part of stacktrace.
Environment
Steps To Reproduce
Sorry this is difficult to provide complete code, because we need to use Google Cloud project and enable Cloud Monitoring and Cloud Spanner to reproduce.
Instead I wrote sample code to reproduce similar case with local exporter with rate limit.
https://gist.github.com/nktks/f7373c39c4f3731f671c09cb4502b286
Expected behavior
Shutdown
.Shutdown
.The text was updated successfully, but these errors were encountered: