PHP 8.3.31
Preview: agent_workflow.py Size: 459 B
//opt/hc_python/lib/python3.12/site-packages/sentry_sdk/integrations/openai_agents/spans/agent_workflow.py

from typing import TYPE_CHECKING

import sentry_sdk
from sentry_sdk.ai.utils import get_start_span_function

from ..consts import SPAN_ORIGIN

if TYPE_CHECKING:
    import agents


def agent_workflow_span(agent: "agents.Agent") -> "sentry_sdk.tracing.Span":
    # Create a transaction or a span if an transaction is already active
    span = get_start_span_function()(
        name=f"{agent.name} workflow",
        origin=SPAN_ORIGIN,
    )

    return span

Directory Contents

Dirs: 1 × Files: 6

Name Size Perms Modified Actions
- drwxr-xr-x 2026-06-11 06:30:31
Edit Download
459 B lrw-r--r-- 2026-06-11 06:30:31
Edit Download
2.12 KB lrw-r--r-- 2026-06-11 06:30:31
Edit Download
1.47 KB lrw-r--r-- 2026-06-11 06:30:31
Edit Download
723 B lrw-r--r-- 2026-06-11 06:30:31
Edit Download
3.09 KB lrw-r--r-- 2026-06-11 06:30:31
Edit Download
380 B lrw-r--r-- 2026-06-11 06:30:31
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).