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

Rebuild workflow metrics based on webhooks #261

Closed
tboerger opened this issue Oct 8, 2023 · 3 comments
Closed

Rebuild workflow metrics based on webhooks #261

tboerger opened this issue Oct 8, 2023 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@tboerger
Copy link
Member

tboerger commented Oct 8, 2023

To make the workflow metrics integration more reliable and to avoid rate limiting because of the amount of required api calls we should rebuild the workflow metrics based on webhooks sent by GitHub. The webhook will receive all required information by GitHub and will store the information within BoltDB which makes the service sadly a stateful service.

@ardole
Copy link

ardole commented Sep 19, 2024

Hi @tboerger

I'm really interested in this exporter

I was wondering why you chose to use webhooks rather than API calls and i came across this issue.

Do you have any feedback to give on this choice ?

  • is it reliable and stable as you were expecting ?
  • no more problem with github api rates with your exporter ?

Also i wanted to export deployment statuses, have you already thought about that ? afaik it would not be possible to use any hook for that, do you think it would make us reaching the limit as well ?

Thank you

@tboerger
Copy link
Member Author

We have introduced this changed behavior for the workflow metrics to avoid running into api rate limit errors which works out pretty well. You are still able to run into api rate limit errors for the other metrics, but you just need to use a proper paging size and do not too often scrape the exporter to avoid that.

I haven't checked the API for deployments, but since those could also be a lot I would suggest to extend the webhook receiver and use this instead.

@ardole
Copy link

ardole commented Sep 19, 2024

Great, thank you for the feedback !

After check others well known monitoring system for Github are using webhooks as well ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants