aboutsummaryrefslogtreecommitdiffstats
path: root/snekbox/utils/logging.py
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2022-05-31 14:06:54 -0700
committerGravatar MarkKoz <[email protected]>2022-05-31 14:09:16 -0700
commit8d33cab2cb3baf179941e9692b682150d50bbbe5 (patch)
tree1498f265d4f294c0afac774676305235980ec20b /snekbox/utils/logging.py
parentFix package discovery for setuptools (diff)
Docker: install package in image and use version to tag it
Diffstat (limited to '')
-rw-r--r--snekbox/utils/logging.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/snekbox/utils/logging.py b/snekbox/utils/logging.py
index 9a713f8..c15e3f1 100644
--- a/snekbox/utils/logging.py
+++ b/snekbox/utils/logging.py
@@ -19,7 +19,7 @@ def init_logger(debug: bool) -> None:
log.addHandler(handler)
-def init_sentry() -> None:
+def init_sentry(version: str) -> None:
"""Initialise the Sentry SDK if it's installed."""
try:
import sentry_sdk
@@ -27,10 +27,9 @@ def init_sentry() -> None:
except ImportError:
return
- git_sha = os.environ.get("GIT_SHA", "development")
sentry_sdk.init(
dsn=os.environ.get("SNEKBOX_SENTRY_DSN", ""),
integrations=[FalconIntegration()],
send_default_pii=True,
- release=f"snekbox@{git_sha}"
+ release=f"snekbox@{version}"
)