Report errors to Glitchtip

This commit is contained in:
Fabian Müller 2025-02-26 01:10:52 +01:00
parent cdeca9498c
commit e82f7224c5
3 changed files with 593 additions and 328 deletions

View File

@ -1,5 +1,7 @@
import locale
import os
import sentry_sdk
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from fastapi.staticfiles import StaticFiles
@ -7,6 +9,21 @@ from fastapi.staticfiles import StaticFiles
from fabcal.routers import api_v1, frontend
sentry_sdk.init(
dsn=os.environ.get("SENTRY_DSN"),
# Add data like request headers and IP for users, if applicable;
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
send_default_pii=True,
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for tracing.
traces_sample_rate=1.0,
# Set profiles_sample_rate to 1.0 to profile 100%
# of sampled transactions.
# We recommend adjusting this value in production.
profiles_sample_rate=1.0,
)
app = FastAPI()
app.mount("/static", StaticFiles(directory="static"), name="static")

901
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@ package-mode = false
[tool.poetry.dependencies]
python = "^3.10"
icalendar = "^4.0.9"
fastapi = "^0.75.0"
fastapi = "^0.115.0"
uvicorn = {extras = ["standard"], version = "^0.17.6"}
Jinja2 = "^3.1.0"
Babel = "^2.9.1"
@ -20,6 +20,7 @@ recurring-ical-events = "^1.0.1-beta.0"
pyyaml = "^6.0"
asyncache = "^0.3.1"
pytz = "^2025.1"
sentry-sdk = {extras = ["fastapi"], version = "^2.22.0"}
[tool.poetry.dev-dependencies]
black = "^22.1.0"