airbrake / pybrake

Python exception notifier for Airbrake
https://airbrake.io
Other
37 stars 17 forks source link

Fix manageemnt failed data sent #222

Closed smurf-U closed 2 years ago

smurf-U commented 2 years ago

Losing data whenever an API call fails or there is any error from Airbrake. Because Pybrake create a local variable, copy the data, and set the class variable to None, when PyBrake sends statistics to AirBrake. However, when Pybrake encounter API failure or errors, Pybrake do not update or reassign statistics data to the class verifiable.

To fix this, creating a circular buffer or invalidate list type variable and appending json data to it while the API call fails, then at flush time sending current stats first and then checking that the list is not empty, pop data and sending those data as well if it fails, putting that again in it.

smurf-U commented 2 years ago

PTAL