@@ -592,11 +592,15 @@ func (e *Engine) handleAllTriggerEvents(ctx context.Context) {
592592 e .logger ().Debugw ("Scheduling a trigger event for execution" , "eventID" , eventID )
593593 e .srvcEng .GoCtx (context .WithoutCancel (ctx ), func (ctx context.Context ) {
594594 defer free ()
595+ creCtx := contexts .CREValue (ctx )
595596 // Tracer is no-op if DebugMode is false
596597 ctx , span := e .tracer .Start (ctx , "workflow_execution" ,
597598 trace .WithAttributes (
598599 attribute .String ("workflow_name" , e .cfg .WorkflowName .String ()),
599600 attribute .String ("version" , "v2" ),
601+ attribute .String ("org_id" , creCtx .Org ),
602+ attribute .String ("owner_id" , creCtx .Owner ),
603+ attribute .String ("workflow_id" , creCtx .Workflow ),
600604 ))
601605 defer span .End ()
602606 e .startExecution (ctx , queueHead )
@@ -660,6 +664,7 @@ func (e *Engine) startExecution(ctx context.Context, wrappedTriggerEvent enqueue
660664 }
661665 e .metrics .IncrementExecutionIDLegacyCounter (ctx )
662666 }
667+ trace .SpanFromContext (ctx ).SetAttributes (attribute .String ("execution_id" , executionID ))
663668
664669 // disallow duplicate executions
665670 _ , addErr := e .cfg .ExecutionsStore .Add (ctx , nil , executionID , e .cfg .WorkflowID , store .StatusStarted )
0 commit comments