Skip to content

Commit 96efc92

Browse files
authored
use official middleware (#25)
1 parent 7fe38b9 commit 96efc92

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pydantic = {extras = ["dotenv"],version = "*"}
3333
python-dateutil = "*"
3434
requests = "*"
3535
scout-apm = "*"
36-
sentry-asgi = "*"
36+
sentry-sdk = "*"
3737
uvicorn = "*"
3838

3939
[requires]

Pipfile.lock

Lines changed: 2 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
import logging
55

66
import pydantic
7-
import sentry_asgi
87
import sentry_sdk
98
import uvicorn
109
from fastapi import FastAPI, Request, Response
1110
from fastapi.middleware.cors import CORSMiddleware
1211
from fastapi.middleware.gzip import GZipMiddleware
1312
from fastapi.responses import JSONResponse
1413
from scout_apm.async_.starlette import ScoutMiddleware
14+
from sentry_sdk.integrations.asgi import SentryAsgiMiddleware
1515

1616
from .config import get_settings
1717
from .data import data_source
@@ -55,7 +55,7 @@
5555
# Sentry Error Tracking
5656
if SETTINGS.sentry_dsn: # pragma: no cover
5757
LOGGER.info("Adding Sentry middleware")
58-
APP.add_middleware(sentry_asgi.SentryMiddleware)
58+
APP.add_middleware(SentryAsgiMiddleware)
5959

6060
# Enable CORS.
6161
APP.add_middleware(

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ python-dateutil==2.8.1
3030
python-dotenv==0.13.0
3131
requests==2.23.0
3232
scout-apm==2.14.1
33-
sentry-asgi==0.2.0
3433
sentry-sdk==0.14.3
3534
six==1.14.0
3635
starlette==0.13.2

0 commit comments

Comments
 (0)