def raised(self) -> 'Span': self.error_occurred = True self.logs = [ Log(items=[ LogItem(key='Traceback', val=traceback.format_exc()), ]) ] return self
def log(self, ex: Exception) -> 'Span': self.error_occurred = True self.logs.append(Log(items=LogItem(key='Traceback', val=str(ex)))) return self