Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
chore(observability): downgrade routine browser WARN logs to info + sample (#6827)
Shuchang Zhengae99e976b6fd
diff --git a/skyvern/core/script_generations/skyvern_page.py b/skyvern/core/script_generations/skyvern_page.pyindex a26bbbb92..469549246 100644--- a/skyvern/core/script_generations/skyvern_page.py+++ b/skyvern/core/script_generations/skyvern_page.py@@ -401,8 +401,9 @@ class SkyvernPage(Page):return selectorexcept Exception:pass # retry failed too — fall through to AI- LOG.warning(+ LOG.info("CSS selector click failed, falling back to AI",+ sampling=True,selector=selector,error=str(e),)diff --git a/skyvern/webeye/actions/caching.py b/skyvern/webeye/actions/caching.pyindex ef52383c8..4f5eec321 100644--- a/skyvern/webeye/actions/caching.py+++ b/skyvern/webeye/actions/caching.py@@ -100,7 +100,7 @@ async def _retrieve_action_plan(task: Task, step: Step, scraped_page: ScrapedPag)breakelse:- LOG.warning("No element found with the hash", element_hash=cached_action.skyvern_element_hash)+ LOG.info("No element found with the hash", element_hash=cached_action.skyvern_element_hash, sampling=True)break# If there are no items in the list we just built, we need to revert back to no-cache mode. Return empty list.diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.pyindex c3b8c388e..bb8fa2273 100644--- a/skyvern/webeye/actions/handler.py+++ b/skyvern/webeye/actions/handler.py@@ -4357,8 +4357,9 @@ async def input_or_auto_complete_input(if fallback_result is not None:return fallback_result- LOG.warning(+ LOG.info("Auto completion didn't finish, this might leave the input value to be empty.",+ sampling=True,context=input_or_select_context,)return Nonediff --git a/skyvern/webeye/utils/dom.py b/skyvern/webeye/utils/dom.pyindex b4753ce44..157ef1941 100644--- a/skyvern/webeye/utils/dom.py+++ b/skyvern/webeye/utils/dom.py@@ -856,16 +856,18 @@ class SkyvernElement:try:return await self.move_mouse_to(page, timeout=timeout)except NoElementBoudingBox:- LOG.warning(+ LOG.info("Failed to move mouse to the element - NoElementBoudingBox",+ sampling=True,task_id=task_id,step_id=step_id,element_id=element_id,exc_info=True,)except ElementOutOfCurrentViewport:- LOG.warning(+ LOG.info("Failed to move mouse to the element - ElementOutOfCurrentViewport",+ sampling=True,task_id=task_id,step_id=step_id,element_id=element_id,diff --git a/skyvern/webeye/utils/page.py b/skyvern/webeye/utils/page.pyindex 3476c5ff8..224134dec 100644--- a/skyvern/webeye/utils/page.py+++ b/skyvern/webeye/utils/page.py@@ -877,7 +877,7 @@ class SkyvernFrame:await self._wait_for_loading_indicators_gone(timeout_ms=loading_indicator_timeout_ms)except (TimeoutError, asyncio.TimeoutError):loading_indicator_result = "timeout"- LOG.warning("Loading indicator timeout - some indicators may still be present, proceeding")+ LOG.info("Loading indicator timeout - some indicators may still be present, proceeding", sampling=True)except Exception:loading_indicator_result = "error"LOG.warning("Failed to check loading indicators, proceeding", exc_info=True)@@ -893,7 +893,7 @@ class SkyvernFrame:await self.frame.wait_for_load_state("networkidle", timeout=network_idle_timeout_ms)except (TimeoutError, asyncio.TimeoutError):network_idle_result = "timeout"- LOG.warning("Network idle timeout - page may have constant activity, proceeding")+ LOG.info("Network idle timeout - page may have constant activity, proceeding", sampling=True)finally:_ni_span.set_attribute("result", network_idle_result)