diff --git a/litellm/integrations/langsmith.py b/litellm/integrations/langsmith.py index 505f1ba78..ec5632e27 100644 --- a/litellm/integrations/langsmith.py +++ b/litellm/integrations/langsmith.py @@ -24,6 +24,9 @@ from litellm.llms.custom_httpx.http_handler import ( httpxSpecialProvider, ) +DEFAULT_BATCH_SIZE = 512 +DEFAULT_FLUSH_INTERVAL_SECONDS = 5 + class LangsmithInputs(BaseModel): model: Optional[str] = None @@ -71,11 +74,12 @@ class LangsmithLogger(CustomLogger): ) _batch_size = ( - os.getenv("LANGSMITH_BATCH_SIZE", 100) or litellm.langsmith_batch_size + os.getenv("LANGSMITH_BATCH_SIZE", DEFAULT_BATCH_SIZE) + or litellm.langsmith_batch_size ) self.batch_size = int(_batch_size) self.log_queue = [] - self.flush_interval = 10 # 5 seconds + self.flush_interval = DEFAULT_FLUSH_INTERVAL_SECONDS # 10 seconds self.last_flush_time = time.time() asyncio.create_task(self.periodic_flush()) self.flush_lock = asyncio.Lock() diff --git a/litellm/proxy/proxy_config.yaml b/litellm/proxy/proxy_config.yaml index 98ca86db3..a0e22451b 100644 --- a/litellm/proxy/proxy_config.yaml +++ b/litellm/proxy/proxy_config.yaml @@ -16,4 +16,6 @@ general_settings: master_key: sk-1234 litellm_settings: - success_callback: ["langsmith"] + success_callback: ["langsmith", "prometheus"] + service_callback: ["prometheus_system"] + callbacks: ["otel"]