Skip to content

Commit

Permalink
Merge pull request #243 from promhippie/docs-page-size
Browse files Browse the repository at this point in the history
docs: add note about page size and request timeout
  • Loading branch information
tboerger committed Aug 10, 2023
2 parents f33559c + b8e7e18 commit 07b0c24
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/content/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,27 @@ access the exporter at
[http://localhost:9504/metrics](http://localhost:9504/metrics) and
[Prometheus][prometheus] at [http://localhost:9090](http://localhost:9090).

If you have enabled the workflows metrics it could happen quite easily that you
will run into rate limits for the GitHub API. In that case it could already help
to increase the request timeout and the page size of the requests against the
GitHub API. Just expand your configuration with values which work best for you:

{{< highlight diff >}}
github_exporter:
image: promhippie/github-exporter:latest
restart: always
environment:
+ - GITHUB_EXPORTER_REQUEST_TIMEOUT=5m
+ - GITHUB_EXPORTER_PER_PAGE=5000
- GITHUB_EXPORTER_TOKEN=bldyecdtysdahs76ygtbw51w3oeo6a4cvjwoitmb
- GITHUB_EXPORTER_LOG_PRETTY=true
- GITHUB_EXPORTER_ORG=promhippie
- GITHUB_EXPORTER_REPO=promhippie/example
{{< / highlight >}}

Also don't forget to set a higher scrape interval, otherwise Prometheus will
scrape the exporter more often than needed.

## Configuration

{{< partial "envvars.md" >}}
Expand Down

0 comments on commit 07b0c24

Please sign in to comment.