Skip to content

Commit

Permalink
Add sentry integration
Browse files Browse the repository at this point in the history
  • Loading branch information
fliepeltje committed Mar 8, 2024
1 parent ade3bbb commit 31502ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions humitifier/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
from humitifier.models import Host, get_hosts
from humitifier.logging import logging

import sentry_sdk

if sentry_dsn := os.getenv("SENTRY_DSN"):
sentry_sdk.init(dsn=sentry_dsn, traces_sample_rate=1.0, profiles_sample_rate=1.0)

template_env = Environment(loader=FileSystemLoader("humitifier/templates"))
app = FastAPI()
app.mount("/static", StaticFiles(directory="static"), name="static")
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ toml = "^0.10.2"
parallel-ssh = "^2.12.0"
rocketry = "^2.5.1"
asyncpg = "^0.29.0"
sentry-sdk = {extras = ["fastapi"], version = "^1.41.0"}


[tool.poetry.group.dev.dependencies]
Expand Down

0 comments on commit 31502ae

Please sign in to comment.