Skip to content

Special handling for exception tracebacks? #69

Closed
@zehauser

Description

@zehauser

The OpenTracing specification contains some standard fields for logging exceptions, and seems to encourage tracer implementations to extract information from these standard fields:

This scheme allows Tracer implementations to extract what information they need from the actual error object when it's available.

The opentracing Python library helpfully catches exceptions and adds the standard log fields for us.

In particular, the above code makes it clear that the intent of the stack field is to hold the actual traceback object itself.

But when I tie all this together and go look at a sample trace in the Lightstep UI... I get this:

stack: "<traceback object at 0x7fe002d01ac8>"

Which is not very useful to me! I would be better off manually doing something like this:

import traceback
[...]
catch Exception as e:
    span.set_tag('traceback', ''.join(traceback.format_tb(e.__traceback__)))

It seems to me that ideally Lightstep would be doing something here. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions