Skip to content

Instantly share code, notes, and snippets.

View nguqtruong's full-sized avatar
🎯
Focusing

Ngu Truong nguqtruong

🎯
Focusing
View GitHub Profile
@nguqtruong
nguqtruong / fastapi_app.py
Created April 8, 2021 16:21
Integrate Sentry to FastAPI
import os
from fastapi import FastAPI
from sentry_sdk.integrations.asgi import SentryAsgiMiddleware
import sentry_sdk
sentry_sdk.init(
dsn='your Sentry dns', # CHANGE HERE
environment=os.getenv('ENV', 'dev'), # You should read it from environment variable