Files
Dorod-Sky/skyvern/__init__.py

62 lines
1.6 KiB
Python
Raw Normal View History

2024-07-30 16:13:51 -07:00
from ddtrace import tracer
from ddtrace.trace import TraceFilter, Span
from ddtrace.ext import http
import re
from skyvern.forge.sdk.forge_log import setup_logger
class FilterHeartbeat(TraceFilter):
_HB_URL = re.compile(r"http://.*/heartbeat$")
def process_trace(self, trace: list[Span]) -> list[Span] | None:
for span in trace:
url = span.get_tag(http.URL)
if span.parent_id is None and url is not None and self._HB_URL.match(url):
# drop the full trace chunk
return None
return trace
tracer.configure(trace_processors=[FilterHeartbeat()])
setup_logger()
2025-03-16 15:46:34 -07:00
2025-03-30 18:34:48 -07:00
from skyvern.forge import app # noqa: E402, F401
from skyvern.library import Skyvern # noqa: E402
2025-08-10 13:16:46 -07:00
from skyvern.core.script_generations.skyvern_page import RunContext, SkyvernPage # noqa: E402
from skyvern.core.script_generations.run_initializer import setup # noqa: E402
from skyvern.core.script_generations.workflow_wrappers import ( # noqa: E402
2025-08-16 17:48:10 -07:00
cached, # noqa: E402
2025-08-10 13:16:46 -07:00
workflow, # noqa: E402
2025-06-18 00:44:46 -07:00
) # noqa: E402
2025-08-16 17:48:10 -07:00
from skyvern.services.script_service import ( # noqa: E402
action, # noqa: E402
download, # noqa: E402
extract, # noqa: E402
generate_text, # noqa: E402
2025-08-16 17:48:10 -07:00
login, # noqa: E402
render_template, # noqa: E402
2025-08-16 17:48:10 -07:00
run_script, # noqa: E402
run_task, # noqa: E402
wait, # noqa: E402
) # noqa: E402
2025-06-18 00:44:46 -07:00
__all__ = [
"Skyvern",
"SkyvernPage",
"RunContext",
2025-08-16 17:48:10 -07:00
"action",
"cached",
"download",
"extract",
"generate_text",
2025-08-16 17:48:10 -07:00
"login",
"render_template",
2025-08-16 17:48:10 -07:00
"run_script",
"run_task",
2025-06-18 00:44:46 -07:00
"setup",
2025-08-16 17:48:10 -07:00
"wait",
2025-08-10 13:16:46 -07:00
"workflow",
2025-06-18 00:44:46 -07:00
]