getsentry / sentry-python

The official Python SDK for Sentry.io
https://sentry.io/for/python/
MIT License
1.93k stars 510 forks source link

Allow inclusion of _IGNORED_LOGGERS in breadcrumbs in LoggingIntegration #1247

Open tomharvey opened 3 years ago

tomharvey commented 3 years ago

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 in that LogginIntegration and the reasons why:

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

tomharvey commented 3 years ago

... or is there some setting with the http integration that will allow me to see debug of http requests in the breadcrumbs? I can only really find old raven info on the http breadcrumb integration.

sl0thentr0py commented 3 years ago

Hey @tomharvey, thanks for the great report! Yes I think you're right, we should have different ignore lists for the 2 cases. I'll test things out and get back to you once fixed.

tomharvey commented 3 years ago

Awesome. Thanks for the update @sl0thentr0py

github-actions[bot] commented 2 years ago

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

antonpirker commented 2 years ago

I have put this on the internal backlog with low priority. We will do road map planning in the next couple of weeks, where we decide what we will tackle.

In the mean time: If you want to supply a PR for fixing this issue, please do so. We are always happy to help get PRs from the community merged and deployed!