From 84e00eb010f7bf1f73656c115e95d20dd7f0df07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Neuh=C3=A4user?= <37899626+dneuhaeuser-zalando@users.noreply.github.com> Date: Fri, 28 Aug 2020 17:19:24 +0200 Subject: [PATCH] Revert "format tracebacks with cause (#100)" (#102) This reverts commit 1c945209689be023cd4a7d3634ff3148a8e064a3. --- lightstep/recorder.py | 8 ++------ lightstep/util.py | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lightstep/recorder.py b/lightstep/recorder.py index 9bedbee..1e06282 100644 --- a/lightstep/recorder.py +++ b/lightstep/recorder.py @@ -14,7 +14,7 @@ import warnings from basictracer.recorder import SpanRecorder -from opentracing.logs import ERROR_KIND, STACK, ERROR_OBJECT +from opentracing.logs import ERROR_KIND, STACK from lightstep.http_converter import HttpConverter from lightstep.thrift_converter import ThriftConverter @@ -171,11 +171,7 @@ def _normalize_log(self, log): log.key_values[ERROR_KIND] = util._format_exc_type(log.key_values[ERROR_KIND]) if STACK in log.key_values: - log.key_values[STACK] = util._format_exc_tb( - log.key_values.get(ERROR_OBJECT), - log.key_values.get(ERROR_KIND), - log.key_values[STACK] - ) + log.key_values[STACK] = util._format_exc_tb(log.key_values[STACK]) return log diff --git a/lightstep/util.py b/lightstep/util.py index 33c403e..50b61d3 100755 --- a/lightstep/util.py +++ b/lightstep/util.py @@ -105,9 +105,9 @@ def _coerce_to_unicode(val): return '(encoding error)' -def _format_exc_tb(exc_value, exc_type, exc_tb): +def _format_exc_tb(exc_tb): if type(exc_tb) is types.TracebackType: - return ''.join(traceback.format_exception(exc_value, exc_type, exc_tb)) + return ''.join(traceback.format_tb(exc_tb)) return exc_tb