Skip to content

Add metrics for monitoring GitHub API rate limit #312

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

Merged
merged 1 commit into from
Feb 16, 2021

Conversation

int128
Copy link
Contributor

@int128 int128 commented Feb 15, 2021

We often face exceeding the rate limit of GitHub API and would like to monitor the status.

This will add the following metrics for monitoring the rate limit:

# HELP github_rate_limit The maximum number of requests you're permitted to make per hour
# TYPE github_rate_limit gauge
github_rate_limit 5000
# HELP github_rate_limit_remaining The number of requests remaining in the current rate limit window
# TYPE github_rate_limit_remaining gauge
github_rate_limit_remaining 4852
# HELP go_gc_duration_seconds A summary of the GC invocation durations.
# TYPE go_gc_duration_seconds summary

See also https://book.kubebuilder.io/reference/metrics.html.

@int128 int128 changed the title Add metrics for GitHub API rate limit Add metrics for monitoring GitHub API rate limit Feb 15, 2021
Copy link
Collaborator

@mumoshu mumoshu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know you could do this universally at the Transport-level. Thanks @int128 ☺️

@mumoshu mumoshu merged commit 4f3f2fb into actions:master Feb 16, 2021
@callum-tait-pbx
Copy link
Contributor

Potentially resolves #196

@int128 int128 deleted the add-github-metrics branch February 20, 2021 11:29
@peimanja peimanja mentioned this pull request Jul 9, 2021
1 task
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