File tree Expand file tree Collapse file tree
util/opentelemetry-util-genai
src/opentelemetry/util/genai Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -285,6 +285,9 @@ class WorkflowInvocation(GenAIInvocation):
285285 default_factory = _new_output_messages
286286 )
287287
288+ def __post_init__ (self ) -> None :
289+ self .operation_name = "invoke_workflow"
290+
288291
289292@dataclass
290293class LLMInvocation (GenAIInvocation ):
Original file line number Diff line number Diff line change @@ -47,6 +47,10 @@ class TelemetryHandlerWorkflowTest(_WorkflowTestBase):
4747 # start_workflow
4848 # ------------------------------------------------------------------
4949
50+ def test_operation_name_is_immutable (self ) -> None :
51+ invocation = WorkflowInvocation (name = "wf" , operation_name = "custom_op" )
52+ self .assertEqual (invocation .operation_name , "invoke_workflow" )
53+
5054 def test_start_workflow_creates_span (self ) -> None :
5155 invocation = WorkflowInvocation (name = "my_workflow" )
5256 self .handler .start (invocation )
You can’t perform that action at this time.
0 commit comments