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

@@ -203,7 +203,7 @@ class OpenAIStreamingInterface:
except Exception as e:
import traceback
logger.error("Error processing stream: %s\n%s", e, traceback.format_exc())
logger.exception("Error processing stream: %s", e)
if ttft_span:
ttft_span.add_event(
name="stop_reason",
@@ -632,7 +632,7 @@ class SimpleOpenAIStreamingInterface:
except Exception as e:
import traceback
logger.error("Error processing stream: %s\n%s", e, traceback.format_exc())
logger.exception("Error processing stream: %s", e)
if ttft_span:
ttft_span.add_event(
name="stop_reason",
@@ -873,7 +873,7 @@ class SimpleOpenAIResponsesStreamingInterface:
except Exception as e:
import traceback
logger.error("Error processing stream: %s\n%s", e, traceback.format_exc())
logger.exception("Error processing stream: %s", e)
if ttft_span:
ttft_span.add_event(
name="stop_reason",