예제 #1
0
 def log_error(exception):
     handler = AirbrakeErrorHandler(
         api_key=application.config['AIRBRAKE_API_KEY'],
         api_url=application.config['AIRBRAKE_API_URL'],
         env_name=application.config['version_hash'],
         env_variables={'type': 'logged'},
         request_url=request.url,
         request_path=request.path,
         request_method=request.method,
         request_args=request.args,
         request_headers=request.headers)
     handler.emit(exception)
예제 #2
0
 def log_error(exception):
     handler = AirbrakeErrorHandler(
         api_key=application.config['AIRBRAKE_API_KEY'],
         api_url=application.config['AIRBRAKE_API_URL'],
         env_name=application.config['version_hash'],
         env_variables={'type': 'logged'},
         request_url=request.url,
         request_path=request.path,
         request_method=request.method,
         request_args=request.args,
         request_headers=request.headers)
     handler.emit(exception)
예제 #3
0
 def log_exception(sender, exception, **extra):
     if isinstance(exception, (ClientDisconnected, )):
         return
     handler = AirbrakeErrorHandler(
         api_key=application.config['AIRBRAKE_API_KEY'],
         api_url=application.config['AIRBRAKE_API_URL'],
         env_name=application.config['version_hash'],
         env_variables={'type': 'caught'},
         request_url=request.url,
         request_path=request.path,
         request_method=request.method,
         request_args=request.args,
         request_headers=request.headers)
     handler.emit(exception)
예제 #4
0
 def log_exception(sender, exception, **extra):
     if isinstance(exception, (ClientDisconnected, )):
         return
     handler = AirbrakeErrorHandler(
         api_key=application.config['AIRBRAKE_API_KEY'],
         api_url=application.config['AIRBRAKE_API_URL'],
         env_name=application.config['version_hash'],
         env_variables={'type': 'caught'},
         request_url=request.url,
         request_path=request.path,
         request_method=request.method,
         request_args=request.args,
         request_headers=request.headers)
     handler.emit(exception)