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

Add metrics support for poller and scaler events #143

Merged
merged 26 commits into from
Mar 11, 2024

Conversation

nielm
Copy link
Collaborator

@nielm nielm commented Nov 8, 2023

Add the following metrics to google-cloud-monitoring:


Scaler:

  1. cloudspannerecosystem/autoscaler/scaler/scaling-success
  2. cloudspannerecosystem/autoscaler/scaler/scaling-denied
  3. cloudspannerecosystem/autoscaler/scaler/scaling-failed
  4. cloudspannerecosystem/autoscaler/scaler/requests-success
  5. cloudspannerecosystem/autoscaler/scaler/requests-failed

first 3 have attributes:

  • spanner_project_id
  • spanner_instance_id
  • scaling_method
  • scaling_direction: SCALE_UP, SCALE_DOWN, SCALE_SAME

scaling-denied additionally has a scaling_denied_reason attribute:

  • MAX_SIZE
  • SAME_SIZE
  • WITHIN_COOLDOWN

Poller

  1. cloudspannerecosystem/autoscaler/poller/polling-success
  2. cloudspannerecosystem/autoscaler/poller/polling-failed
  3. cloudspannerecosystem/autoscaler/poller/requests-success
  4. cloudspannerecosystem/autoscaler/poller/requests-failed

first 2 have attributes:

  • spanner_project_id
  • spanner_instance_id

@nielm nielm marked this pull request as draft November 8, 2023 18:12
@nielm nielm changed the title Add metrics support for scaler events Add metrics support for poller and scaler events Dec 1, 2023
@nielm nielm marked this pull request as ready for review December 1, 2023 19:29
@spidercensus
Copy link
Contributor

+1. Excited to see this merged.

@nielm nielm force-pushed the scaler-metrics branch 5 times, most recently from 9de9bcd to 6fc6e0e Compare December 7, 2023 15:28
@henrybell henrybell self-assigned this Dec 7, 2023
@henrybell henrybell self-requested a review December 7, 2023 15:56
@nielm
Copy link
Collaborator Author

nielm commented Dec 12, 2023

Note for anyone watching this - these counters work fine for the cloud functions deployment, but we are still debugging some issues around counter reliability in GKE deployment

@nielm nielm force-pushed the scaler-metrics branch 3 times, most recently from 89d9eca to 47fa0f9 Compare December 19, 2023 12:19
@nielm nielm force-pushed the scaler-metrics branch 5 times, most recently from 4082c9a to 90ac57a Compare January 12, 2024 18:26
@nielm nielm force-pushed the scaler-metrics branch 5 times, most recently from 21983f9 to 25faa75 Compare February 5, 2024 17:46
terraform/gke/README.md Outdated Show resolved Hide resolved
@nielm nielm merged commit db03d6c into cloudspannerecosystem:master Mar 11, 2024
8 checks passed
@nielm nielm deleted the scaler-metrics branch March 11, 2024 18:00
@nielm nielm added the release-please:force-run Force release-please to rerun for this PR label Mar 11, 2024
@release-please release-please bot removed the release-please:force-run Force release-please to rerun for this PR label Mar 11, 2024
nielm added a commit that referenced this pull request Mar 12, 2024
* Add metrics support for scaler and poller events

Including required role for metrics writing to scaler and poller service accounts.

In GKE, the OpenTelemetry collector is used to collect and forward metrics to the monitoring backend.

In Cloud Functions, the code is configured to send metrics to Cloud Monitoring.
This was referenced Mar 26, 2024
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.

3 participants