sentry-python icon indicating copy to clipboard operation
sentry-python copied to clipboard

Allow inclusion of _IGNORED_LOGGERS in breadcrumbs in LoggingIntegration

Open tomharvey opened this issue 4 years ago • 5 comments

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:

  • 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

tomharvey avatar Nov 11 '21 11:11 tomharvey

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

tomharvey avatar Nov 11 '21 11:11 tomharvey

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.

sl0thentr0py avatar Nov 17 '21 13:11 sl0thentr0py

Awesome. Thanks for the update @sl0thentr0py

tomharvey avatar Nov 18 '21 12:11 tomharvey

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 🥀

github-actions[bot] avatar Dec 23 '21 15:12 github-actions[bot]

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!

antonpirker avatar Feb 28 '22 12:02 antonpirker