Skip to content

Commit 84e00eb

Browse files
Revert "format tracebacks with cause (#100)" (#102)
This reverts commit 1c94520.
1 parent 00751f9 commit 84e00eb

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

lightstep/recorder.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import warnings
1515

1616
from basictracer.recorder import SpanRecorder
17-
from opentracing.logs import ERROR_KIND, STACK, ERROR_OBJECT
17+
from opentracing.logs import ERROR_KIND, STACK
1818

1919
from lightstep.http_converter import HttpConverter
2020
from lightstep.thrift_converter import ThriftConverter
@@ -171,11 +171,7 @@ def _normalize_log(self, log):
171171
log.key_values[ERROR_KIND] = util._format_exc_type(log.key_values[ERROR_KIND])
172172

173173
if STACK in log.key_values:
174-
log.key_values[STACK] = util._format_exc_tb(
175-
log.key_values.get(ERROR_OBJECT),
176-
log.key_values.get(ERROR_KIND),
177-
log.key_values[STACK]
178-
)
174+
log.key_values[STACK] = util._format_exc_tb(log.key_values[STACK])
179175

180176
return log
181177

lightstep/util.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ def _coerce_to_unicode(val):
105105
return '(encoding error)'
106106

107107

108-
def _format_exc_tb(exc_value, exc_type, exc_tb):
108+
def _format_exc_tb(exc_tb):
109109
if type(exc_tb) is types.TracebackType:
110-
return ''.join(traceback.format_exception(exc_value, exc_type, exc_tb))
110+
return ''.join(traceback.format_tb(exc_tb))
111111

112112
return exc_tb
113113

0 commit comments

Comments
 (0)