Skip to content

Make debug option also configurable via environment - #2450

Merged
antonpirker merged 3 commits into
masterfrom
antonpirker/sentry_debug_env_var
Oct 16, 2023
Merged

antonpirker merged 3 commits into
masterfrom
antonpirker/sentry_debug_env_var

Conversation

@antonpirker

Copy link
Copy Markdown
Contributor

Introducing new SENTRY_DEBUG environment variable that can be used to set the debug option in sentry_sdk.init().

@antonpirker antonpirker changed the title Make "debug" option also configurable via environment Make debug option also configurable via environment Oct 16, 2023
Comment thread sentry_sdk/client.py
Comment on lines +113 to +117
rv["debug"] = os.environ.get("SENTRY_DEBUG", "False").lower() in (
"true",
"1",
"t",
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda remember that we added a helper for determining if a config option was set to something truthy. Can't find it off the top of my head but will look a bit more 👀

@sentrivana sentrivana left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't find the util function. 🤷🏻‍♀️ LGTM.

@antonpirker

Copy link
Copy Markdown
Contributor Author

Thanks!

@antonpirker
antonpirker marked this pull request as ready for review October 16, 2023 14:48
@antonpirker
antonpirker merged commit fee865c into master Oct 16, 2023
@antonpirker
antonpirker deleted the antonpirker/sentry_debug_env_var branch October 16, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants