Skip to content

Commit

Permalink
hotfix: Add custom attributes to the workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Singh Tomer <[email protected]>
  • Loading branch information
creatorrr committed Oct 16, 2024
1 parent fffa9b4 commit f09267c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions agents-api/agents_api/workflows/task_execution/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ async def run(
start: TransitionTarget = TransitionTarget(workflow="main", step=0),
previous_inputs: list[Any] = [],
) -> Any:
# Add metadata to the workflow run
workflow.upsert_search_attributes(
{
"task_id": execution_input.task.id,
"execution_id": execution_input.execution.id,
}
)

workflow.logger.info(
f"TaskExecutionWorkflow for task {execution_input.task.id}"
f" [LOC {start.workflow}.{start.step}]"
Expand Down

0 comments on commit f09267c

Please sign in to comment.