Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Logging improvements for the pusher #4691

Merged
merged 2 commits into from
Feb 20, 2019
Merged

Logging improvements for the pusher #4691

merged 2 commits into from
Feb 20, 2019

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Feb 20, 2019

  • Don't log massive exception stacktraces the entire time
  • reduce the amount of logging in startup

@richvdh richvdh requested a review from a team February 20, 2019 11:22
except Exception as e:
logger.warning(
"Failed to push event %s to %s: %s %s",
event.event_id, self.name, type(e), e,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit cautious about catching all the exceptions here in case it masks actual programming exceptions, can we not catch HttpResponseException etc?

OTOH, it was already logging at warning, so this isn't the end of the world

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wellll....

normally I'd agree with you, but the exception that was causing a problem is a twisted.web._newclient.RequestGenerationFailed: [<twisted.python.failure.Failure twisted.internet.defer.CancelledError: >]. AFAICT that doesn't seem to be part of twisted's public interface, so it seems to be not a great idea to try and catch it here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh great. It also doesn't look like I added RequestSendFailed stuff to the normal http client either.

@richvdh richvdh merged commit b2200a8 into develop Feb 20, 2019
@richvdh richvdh deleted the rav/pusher_logging branch February 20, 2019 11:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants