Download utils/observability.py from Basel0/qshub: direct link, hf CLI and curl.
- Browser
- Download file 344 Bytes
-
https://huggingface.co/spaces/Basel0/qshub/resolve/main/utils/observability.py
- Command line
-
hf download hf://spaces/Basel0/qshub/utils/observability.py
-
curl -L -o observability.py https://huggingface.co/spaces/Basel0/qshub/resolve/main/utils/observability.py
344 Bytes
| """Production observability setup.""" | |
| from __future__ import annotations | |
| from utils.settings import get_setting | |
| def init_observability() -> None: | |
| dsn = get_setting("SENTRY_DSN") | |
| if not dsn: | |
| return | |
| try: | |
| import sentry_sdk | |
| sentry_sdk.init(dsn=dsn, traces_sample_rate=0.1) | |
| except Exception: | |
| pass | |