Homec4science

errorlib: Sentry logging improvements

Authored by Guillaume Lastecoueres <PX9e@gmx.fr> on Nov 19 2014, 23:51.

Description

errorlib: Sentry logging improvements

  • Adds a security check by catching and sending to Sentry any exception which could occur during the process of the original exception for Sentry.
  • Adds a "SentryEncoder", it is a simple encoder which will avoid to raise exception by trying to encode all the object. First it will try to get the dict by calling the dict attribute. If it fails then it will try to cast the object as a string.

    This is needed because sometimes we get non serializable objects from mod_wsgi. By preprocessing data thanks to this encoder we can ensure that the whole data will be serializable.

    This method has been implemented because in the future if someone want to improve how we manage non serializable object by improving the encoder, it is possible.
  • (closes #2535) (PR #2546)

Signed-off-by: Guillaume Lastecoueres <guillaume@tind.io>
Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>

Details

Committed
Tibor Simko <tibor.simko@cern.ch>Jan 27 2015, 11:18
Parents
R3600:a078102a1672: installation: all upgrade recipes in tabcreate
Branches
Unknown
Tags
Unknown

Event Timeline

Tibor Simko <tibor.simko@cern.ch> committed R3600:c76a697041c2: errorlib: Sentry logging improvements (authored by Guillaume Lastecoueres <PX9e@gmx.fr>).Jan 27 2015, 11:18