feat: refactor logs to parse as a single log line each and filter out 404s from sentry (#5242)

* add multiline log auto detect

* implement logger.exception()

* filter out 404

* remove potentially problematic changes
This commit is contained in:
Kian Jones
2025-10-10 14:12:29 -07:00
committed by Caren Thomas
parent a7718ccdad
commit c2e474e03a
9 changed files with 35 additions and 20 deletions

View File

@@ -1367,7 +1367,7 @@ def fire_and_forget(coro, task_name: Optional[str] = None, error_callback: Optio
t.result() # this re-raises exceptions from the task
except Exception as e:
task_desc = f"Background task {task_name}" if task_name else "Background task"
logger.error(f"{task_desc} failed: {str(e)}\n{traceback.format_exc()}")
logger.exception(f"{task_desc} failed: {str(e)}")
if error_callback:
try: