You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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/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
The text was updated successfully, but these errors were encountered: