Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ dependencies = [
"pytz >= 2023.3",
"structlog >= 23.2.0",
"uvicorn >= 0.24.0",
"numpy==1.26.4"
"numpy==1.26.4",
"sentry-sdk == 2.1.1",
]

[project.optional-dependencies]
Expand Down
12 changes: 12 additions & 0 deletions src/india_api/cmd/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""The main entrypoint to the application."""

import uvicorn
import sentry_sdk
import version

from india_api import internal
from india_api.internal.config import Config
Expand All @@ -9,6 +11,16 @@

cfg = Config()

sentry_sdk.init(
dsn=os.getenv("SENTRY_DSN"),
environment=os.getenv("ENVIRONMENT", "local"),
traces_sample_rate=1
)

sentry_sdk.set_tag("app_name", "india_api")
sentry_sdk.set_tag("version",version.__version__)


match cfg.SOURCE:
case "indiadb":
if cfg.DB_URL == "" or cfg.DB_URL is None:
Expand Down
Loading