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

GitHub Enterprise without rate-limiting will fail #81

Open
mkgrei opened this issue Feb 27, 2022 · 1 comment
Open

GitHub Enterprise without rate-limiting will fail #81

mkgrei opened this issue Feb 27, 2022 · 1 comment

Comments

@mkgrei
Copy link

mkgrei commented Feb 27, 2022

https://github.com/infinityworks/github-exporter/blob/284088c21e7d796e9b04674c1e2f00e73d9372e3/exporter/gather.go#L67-L70

The above line will return error thus causing the collection of metrics to stop when the target is a private GitHub Enterprise server with no rate-limiting.

I am not sure if this is an intended behavior as otherwise this exporter can be used to collect metrics for repositories in GitHub Enterprise even if rate-limiting is disabled.

I think with only error logs will be a better way and return nil as error can let the exporter to proceed to show already collected repository metrics. If this is intended for reducing the risk of overloading the target server, getRates should be called before gatherData so as to reduce total number of requests.

https://github.com/infinityworks/github-exporter/blob/284088c21e7d796e9b04674c1e2f00e73d9372e3/exporter/prometheus.go#L23-L36

@mkgrei
Copy link
Author

mkgrei commented Feb 27, 2022

#17

Might not be merged for some reason?

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

No branches or pull requests

1 participant