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

Metric to monitor Github API usage #524

Closed
pgmillon opened this issue Jun 27, 2019 · 4 comments
Closed

Metric to monitor Github API usage #524

pgmillon opened this issue Jun 27, 2019 · 4 comments

Comments

@pgmillon
Copy link

Hi,
In order to monitor Github API usage and prevent API rate limiting it would be great to have a simple metrics exposed.
This could be really helpful on highly used Jenkins instances that have a combination of multibranch pipelines & shared library on Github.
See: https://issues.jenkins-ci.org/browse/JENKINS-36121
Maybe something inside Requester.buildRequest ?

@bitwiseman
Copy link
Member

@bitwiseman
Copy link
Member

The approach should be simpler to start with. And then additionally we should implement a RateLimitStrategy class that will automatically check and attempt to throttle requests to avoid going over. It would save clients from having to pepper their code with checkRateLimit() everywhere.

@bitwiseman
Copy link
Member

#601

@bitwiseman
Copy link
Member

Also added a RateLimitChecker extension point to the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants