-
Notifications
You must be signed in to change notification settings - Fork 30
Respect with_locals
setting
#74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Current work around import functools
import sentry_sdk
import structlog
import structlog_sentry
structlog_sentry.event_from_exception = functools.partial(
structlog_sentry.event_from_exception,
client_options={
"with_locals": sentry_sdk.Hub.current.client.options.get("with_locals")
},
)
structlog.configure(
processors=[structlog_sentry.SentryProcessor],
) |
hi @paveldedik, thank you. That's done :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR, it looks good :-), I have just a minor thing.
Also please rebase again (sorry for that, the CI weren't running for your branch so hopefully I fixed that in master - you may need to follow https://www.conventionalcommits.org/en/v1.0.0/ as I added a check for that too).
hi @paveldedik - I've updated the tests and rebased. To pass the configuration into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I like this approach :-)
Hi!
This is a patch to use the
with_locals
setting from the Sentry client when creating an event.with_locals
is a setting you can enable when initialising the Sentry SDK () that can turn off local varibales being displayed with each stackframe.
event_from_exception
uses it's own "client_options
" which is used when creating the frames.