-
Notifications
You must be signed in to change notification settings - Fork 129
Description
Previous versions of the exporter used a GITHUB_RATE_LIMIT environment variable. This setting allowed the exporter to proactively refresh the GitHub App token if the remaining API rate limit dropped below the configured threshold (default 15,000). This logic ensured that for organizations with large numbers of repositories or high API usage, the exporter could avoid exhausting the GitHub API quota by generating a new token before hitting the rate limit.
This logic was removed in commit ce81cac6997e866824714472fa9a893140f4951e. The exporter now only refreshes tokens on expiry, not on low quota, relying on the standard go-github library behavior.
Impact:
For large organizations or those with high-frequency scraping, the exporter can now hit the GitHub API rate limit and stop collecting metrics until the quota resets, since it no longer refreshes tokens proactively.
This explains why after upgrading, metrics collection fails for large orgs but continues to work for smaller orgs.
Request:
Would it be possible to restore the configuration and logic that allowed quota-based token refreshing (using GITHUB_RATE_LIMIT or similar) in the current version? This is important for supporting metrics collection in environments with high API usage, where hitting the rate limit is otherwise unavoidable.