Skip to content

Commit

Permalink
Stop sending tracking errors to Bugsnag
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Nov 22, 2021
1 parent 142e291 commit 17dbca0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/utils/meta.py
Expand Up @@ -2,7 +2,6 @@
from urllib.parse import unquote

import aiohttp
import bugsnag
from aiocache import cached
from sanic.log import logger

Expand Down Expand Up @@ -128,10 +127,7 @@ async def track(request, lines: list[str]):
logger.info(f"Tracker error count: {settings.REMOTE_TRACKING_ERRORS}")
if settings.REMOTE_TRACKING_ERRORS >= settings.REMOTE_TRACKING_ERRORS_LIMIT:
settings.TRACK_REQUESTS = False
bugsnag.notify(
RuntimeError(f"Disabled tracking after {response.status} response"),
metadata={"request": request.url, "message": message},
)
logger.warning(f"Disabled tracking after {response.status} response")


async def search(request, text: str, safe: bool, *, mode="") -> list[dict]:
Expand Down

0 comments on commit 17dbca0

Please sign in to comment.