8000 fix: Read release and environment from os.environ · etherscan-io/sentry-python@d846986 · GitHub
[go: up one dir, main page]

Skip to content

Commit d846986

Browse files
committed
fix: Read release and environment from os.environ
Fix getsentry#193
1 parent e715e18 commit d846986

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sentry_sdk/client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ def get_options(*args, **kwargs):
5151
if rv["dsn"] is None:
5252
rv["dsn"] = os.environ.get("SENTRY_DSN")
5353

54+
if rv["release"] is None:
55+
rv["release"] = os.environ.get("SENTRY_RELEASE")
56+
57+
if rv["environment"] is None:
58+
rv["environment"] = os.environ.get("SENTRY_ENVIRONMENT")
59+
5460
return rv # type: ignore
5561

5662

0 commit comments

Comments
 (0)
0