feat: add Sentry error monitoring and tracing to FastAPI backend
- Install sentry-sdk[fastapi] with auto-enabled FastAPI + Anthropic integrations - Init before app = FastAPI() with env-aware sample rates (100% dev, 20% prod) - Filter /health endpoint from traces to reduce noise - Add SENTRY_DSN to config settings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -118,6 +118,9 @@ class Settings(BaseSettings):
|
||||
"""Check if any AI provider is configured."""
|
||||
return self.ANTHROPIC_API_KEY is not None or self.GOOGLE_AI_API_KEY is not None
|
||||
|
||||
# Monitoring
|
||||
SENTRY_DSN: Optional[str] = None
|
||||
|
||||
# Deployment – auto-seed test data on PR environments
|
||||
SEED_ON_DEPLOY: bool = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user