Skip to content

Provide a processor to support stack_info #87

@PeterJCLaw

Description

@PeterJCLaw

The standard library supports passing stack_info as a kwarg to log lines which aren't exceptions but you still want a stack trace, which can be useful for logging usages of a function. (The docs are part of Logger.debug's docs)

structlog also supports this through its StackInfoRenderer, however that renders to a string which then doesn't work well in Sentry.

It would be great if this library contained a similar processor which emitted the data in the format which Sentry expects.
sentry_sdk.utlis.current_stacktrace looks like it might be useful for this, though I'm not sure how you'd get the data into the right place on the event object to ensure it shows up as a full stack (rather than as data) in the UI.

Broadly what I'm trying to achieve here is like Sentry's attach_stacktrace client option, but available on a per-log basis rather than a setting on the client as a whole.

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