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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user