File size: 344 Bytes
1b4b6d2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""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