github-exporter icon indicating copy to clipboard operation
github-exporter copied to clipboard

GitHub Enterprise without rate-limiting will fail

Open mkgrei opened this issue 3 years ago • 1 comments

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 avatar Feb 27 '22 13:02 mkgrei

https://github.com/infinityworks/github-exporter/issues/17

Might not be merged for some reason?

mkgrei avatar Feb 27 '22 13:02 mkgrei