getsentry / getsentry/sentry-python

cron interval "too short" warning is spammy

Đang mở
#4,116 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Checks Improvement Python Quality Improvement
Ngôn ngữ chính
Python
Star
2.2k
Fork
669
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
213

Mô tả

### 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

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

### Actual Result

see above

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.