Coverage for src / sql_tool / core / monitoring.py: 100%
5 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-02-14 15:28 -0500
« prev ^ index » next coverage.py v7.13.4, created at 2026-02-14 15:28 -0500
1"""Sentry integration for error tracking and performance monitoring.
3Sentry is initialized early in main() after logging setup.
4"""
6import sentry_sdk
8from sql_tool.__about__ import __version__
10_SENTRY_DSN = "https://36ad37dfb52a69bccdd8cf8d8940c747@o4508594232426496.ingest.us.sentry.io/4510874339966977"
13def setup_sentry(environment: str = "local") -> None:
14 """Initialize Sentry with public DSN for error tracking."""
15 sentry_sdk.init(
16 dsn=_SENTRY_DSN,
17 traces_sample_rate=0.03,
18 environment=environment,
19 release=__version__,
20 attach_stacktrace=True,
21 send_default_pii=False,
22 )