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

Feature/sentry stale event check #1036

Merged

Conversation

mikesndrs
Copy link
Contributor

@mikesndrs mikesndrs commented Oct 21, 2024

Added config option to check for disproportionate amount of stale or rejected events after scraping. Send sentry warning if threshold is met.

Checklist

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree
    to license it to the TeSS codebase under the
    BSD license.

@mikesndrs mikesndrs force-pushed the feature/sentry_stale_event_check branch from 6be1846 to f851b8b Compare October 21, 2024 11:19
lib/scraper.rb Outdated Show resolved Hide resolved
@@ -79,6 +79,8 @@ def run
end
end

scraper_event_check(data_sources)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just call this from within the scrape method? Then you don't have to iterate over all the data sources again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opted for afterwards since you can have multiple sources with the same content_provider so if you check right after the source specific scrape you are checking on events that have not been rescraped yet. Should not be a problem if the difference between your stale threshold and your scraping frequency is big enough but this felt cleaner.

@mikesndrs mikesndrs requested a review from fbacall October 23, 2024 07:51
@fbacall fbacall merged commit 6e704b2 into ElixirTeSS:master Oct 24, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants