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