getsentry / getsentry/sentry-python

Allow inclusion of _IGNORED_LOGGERS in breadcrumbs in LoggingIntegration

Đang mở
#1,247 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
Feature Integration: Logging Logs Python
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ả

I am trying to investigate some http connection pooling issues when making a lot of http requests.

I'm getting a lovely sentry report on the failures, but with 'Pool is closed' errors I **really** want to see DEBUG logs from urllib3 in my breadcrumbs.

So, I tried setting up `LoggingIntegration(level=logging.DEBUG)` and `logging.getLogger("urllib3").setLevel(logging.DEBUG)`

But I see nothing.

And, then I see [_IGNORED_LOGGERS](https://github.com/getsentry/sentry-python/blob/ed4ba68cad42ebfbab162b37bf7edad25ebeae55/sentry_sdk/integrations/logging.py#L34) in that LogginIntegration and the reasons why:
* https://github.com/getsentry/sentry-python/issues/788
* https://github.com/getsentry/sentry-python/issues/655

Which are great reasons. But, do those reasons really apply to breadcrumbs?

I appreciate how an error in sending a sentry event over urllib3 is going to create another event, ad infinitum. But (especially with `MAX_BREADCRUMBS` as some protection) is it safe to have `_IGNORED_LOGGERS` apply to `_handler` but not apply to `_breadcrumb_handler` ?

In fact, if there was any urllib3 logging output on the attempt to send the issue, those breadcrumbs would be added to the event that won't be fired because _handler is still adhering to IGNORED_LOGGERS

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.