🔧 Update sentry dns initialization following the environment settings (#1145)
This commit is contained in:
@@ -11,7 +11,7 @@ def custom_generate_unique_id(route: APIRoute) -> str:
|
|||||||
return f"{route.tags[0]}-{route.name}"
|
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)
|
sentry_sdk.init(dsn=str(settings.SENTRY_DSN), enable_tracing=True)
|
||||||
|
|
||||||
app = FastAPI(
|
app = FastAPI(
|
||||||
|
Reference in New Issue
Block a user