always log ip and arn in the pbs logs (#3927)

This commit is contained in:
LawyZheng
2025-11-06 23:11:05 +08:00
committed by GitHub
parent 8372bd2c95
commit e37458851d
2 changed files with 6 additions and 0 deletions

View File

@@ -29,6 +29,8 @@ class SkyvernContext:
frame_index_map: dict[Frame, int] = field(default_factory=dict)
dropped_css_svg_element_map: dict[str, bool] = field(default_factory=dict)
max_screenshot_scrolls: int | None = None
browser_container_ip: str | None = None
browser_container_task_arn: str | None = None
# feature flags
enable_parse_select_in_extract: bool = False

View File

@@ -45,6 +45,10 @@ def add_kv_pairs_to_msg(logger: logging.Logger, method_name: str, event_dict: Ev
event_dict["task_v2_id"] = context.task_v2_id
if context.browser_session_id:
event_dict["browser_session_id"] = context.browser_session_id
if context.browser_container_ip:
event_dict["browser_container_ip"] = context.browser_container_ip
if context.browser_container_task_arn:
event_dict["browser_container_task_arn"] = context.browser_container_task_arn
# Add env to the log
event_dict["env"] = settings.ENV