Skip to content

cron interval "too short" warning is spammy #4116

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

Open
asottile-sentry opened this issue Mar 3, 2025 · 0 comments
Open

cron interval "too short" warning is spammy #4116

asottile-sentry opened this issue Mar 3, 2025 · 0 comments

Comments

@asottile-sentry
Copy link
Member

How do you use Sentry?

Sentry Saas (sentry.io)

Version

mainline

Steps to Reproduce

sentry has a few celerybeat tasks which are configured with very short intervals -- the sdk emits this warning log line every time they run which produces a lot of logspam:

Intervals shorter than one minute are not supported by Sentry Crons. Monitor 'getsentry-billing-usage-scan-usage-buffer' has an interval of 10 seconds. Use the exclude_beat_tasks option in the celery integration to exclude it.

Expected Result

it should ideally only warn once per process

perhaps either by (ab)using the python warnings system or by wrapping the warning log line in an lru_cache

something like

@functools.cache
def _warn_interval_too_short(monitor_name: str) -> None:
    logger.warning(...)

Actual Result

see above

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

No branches or pull requests

2 participants