mirror of
https://github.com/RYDE-WORK/full-stack-fastapi-template.git
synced 2026-01-19 21:23:36 +08:00
🔧 Update sentry dns initialization following the environment settings (#1145)
This commit is contained in:
parent
ba3826e6ce
commit
fa9541fb0d
@ -11,7 +11,7 @@ def custom_generate_unique_id(route: APIRoute) -> str:
|
||||
return f"{route.tags[0]}-{route.name}"
|
||||
|
||||
|
||||
if settings.SENTRY_DSN:
|
||||
if settings.SENTRY_DSN and settings.ENVIRONMENT != "local":
|
||||
sentry_sdk.init(dsn=str(settings.SENTRY_DSN), enable_tracing=True)
|
||||
|
||||
app = FastAPI(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user