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 broken metrics, make perf tests optional #33

Merged
merged 6 commits into from
Mar 8, 2024
Merged

Fix broken metrics, make perf tests optional #33

merged 6 commits into from
Mar 8, 2024

Conversation

Jeff-SearchPilot
Copy link
Contributor

Apologies for dumping this into 1 PR, please see each commit for individual changes.

I've been trying to use the collector in a more realistic environment today and found a few issues which this PR addresses..

  • the value of the status_cake_test_info metric is now correctly set to 1 instead of 0 (see here for why), the current "uptime" state is now exposed via a new status_cake_test_status metric
  • fixes the exposed value for the metric which tracks the current uptime state. It was always reporting 0 (!!)
  • enables a generic retry mechanism on paginated API calls so that statuscake API rate limits are handled in a similar way as the non-paginated get_test_history calls
  • disables the collection of performance metrics by default since it can slow down the collector significantly (this was discussed in Get uptime test history #13)

You can see that now the performance data showing correctly in grafana..
image

Jeff-SearchPilot and others added 6 commits March 7, 2024 11:01
…test_status

The info metric should only be used for storing labels and its value should always be 1 for joins to work properly..

https://www.robustperception.io/why-info-style-metrics-have-a-value-of-1/

Also fixes a bug where get_uptime_status was always retuning 0 since it wasnt being passed a string.

Also remove labels which are exposed as metrics. This would have caused high cardinality in prometheus.
@chelnak
Copy link
Owner

chelnak commented Mar 8, 2024

Hey @Jeff-SearchPilot , happy Friday.

Very cool PR and fantastic that you fixed some bugs. I wonder if these appeared when we did the refactor for v1 🤔.

I have some free time this evening so am hoping to get this merged and fix a could of the issues with CI.

@chelnak chelnak added the bug Something isn't working label Mar 8, 2024
@chelnak chelnak merged commit 919b876 into chelnak:main Mar 8, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants