Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions core/services/workflows/v2/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,11 +592,15 @@ func (e *Engine) handleAllTriggerEvents(ctx context.Context) {
e.logger().Debugw("Scheduling a trigger event for execution", "eventID", eventID)
e.srvcEng.GoCtx(context.WithoutCancel(ctx), func(ctx context.Context) {
defer free()
creCtx := contexts.CREValue(ctx)
// Tracer is no-op if DebugMode is false
ctx, span := e.tracer.Start(ctx, "workflow_execution",
trace.WithAttributes(
attribute.String("workflow_name", e.cfg.WorkflowName.String()),
attribute.String("version", "v2"),
attribute.String("org_id", creCtx.Org),
attribute.String("owner_id", creCtx.Owner),
attribute.String("workflow_id", creCtx.Workflow),
))
defer span.End()
e.startExecution(ctx, queueHead)
Expand Down Expand Up @@ -660,6 +664,7 @@ func (e *Engine) startExecution(ctx context.Context, wrappedTriggerEvent enqueue
}
e.metrics.IncrementExecutionIDLegacyCounter(ctx)
}
trace.SpanFromContext(ctx).SetAttributes(attribute.String("execution_id", executionID))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to correct variable


// disallow duplicate executions
_, addErr := e.cfg.ExecutionsStore.Add(ctx, nil, executionID, e.cfg.WorkflowID, store.StatusStarted)
Expand Down
Loading