Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Prevent metrics from being sent too frequently to OTEL collector #252

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

nielm
Copy link
Collaborator

@nielm nielm commented Mar 19, 2024

Fixes #250

When using the GKE decoupled deployment, it is possible that a race condition can occur where the Scaler with a 10s periodic export may report metrics more frequently than the OTEL collector's batching interval (also 10s), leading to multiple sets of metrics being pushed to the downstream metrics manager. This can cause Duplicate TimeSeries errors.

Update the counters to push metrics less frequently in periodic export mode, and ensure that metrics are never flushed manually in this mode.

In addition the OTEL collector in unified mode had a 5s default time for batching which is at the limit of the Google Cloud Monitoring requirements that pushes are at least 5s apart.

Fixes cloudspannerecosystem#250

When using the GKE decoupled deployment, it is possible that a race condition can occur where the Scaler with a 10s periodic export may report metrics more frequently than the OTEL collector's batching interval (also 10s), leading to multiple sets of metrics being pushed to the downstream metrics manager. This can cause Duplicate TimeSeries errors.

Update the counters to push metrics less frequently in periodic export mode, and ensure that metrics are never flushed manually in this mode.

In addition the OTEL collector in unified mode had a 5s default time for batching which is at the limit of the Google Cloud Monitoring requirements that pushes are at least 5s apart.
@nielm nielm requested a review from henrybell March 20, 2024 08:36
@henrybell henrybell self-assigned this Mar 20, 2024
@henrybell henrybell merged commit bfe27c6 into cloudspannerecosystem:version_2 Mar 20, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants