This commit is contained in:
13
main.py
13
main.py
@@ -2,6 +2,7 @@ import os
|
||||
import asyncio
|
||||
from os.path import exists
|
||||
|
||||
from sentry_sdk.integrations.strawberry import StrawberryIntegration
|
||||
from strawberry.asgi import GraphQL
|
||||
from starlette.applications import Starlette
|
||||
|
||||
@@ -27,7 +28,17 @@ async def start_up():
|
||||
try:
|
||||
import sentry_sdk
|
||||
|
||||
sentry_sdk.init(SENTRY_DSN)
|
||||
sentry_sdk.init(
|
||||
SENTRY_DSN,
|
||||
enable_tracing=True,
|
||||
integrations=[
|
||||
StrawberryIntegration(
|
||||
# Set async_execution to True if you have
|
||||
# at least one async resolver
|
||||
async_execution=True
|
||||
),
|
||||
],
|
||||
)
|
||||
except Exception as e:
|
||||
print("[sentry] init error")
|
||||
print(e)
|
||||
|
Reference in New Issue
Block a user