mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-21 18:55:16 +02:00
feat: add performance logging middleware and enhance performance tracking across services
- Introduced RequestPerfMiddleware to log request performance metrics, including slow request thresholds. - Updated various services and retrievers to utilize the new performance logging utility for better tracking of execution times. - Enhanced existing methods with detailed performance logs for operations such as embedding, searching, and indexing. - Removed deprecated logging setup in stream_new_chat and replaced it with the new performance logger.
This commit is contained in:
parent
68bb196d45
commit
664c43ca13
11 changed files with 430 additions and 36 deletions
|
|
@ -28,8 +28,9 @@ from app.agents.new_chat.system_prompt import (
|
|||
from app.agents.new_chat.tools.registry import build_tools_async
|
||||
from app.db import ChatVisibility
|
||||
from app.services.connector_service import ConnectorService
|
||||
from app.utils.perf import get_perf_logger
|
||||
|
||||
_perf_log = logging.getLogger("surfsense.perf")
|
||||
_perf_log = get_perf_logger()
|
||||
|
||||
# =============================================================================
|
||||
# Connector Type Mapping
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue