diff --git a/src/WorkflowCore/Services/WorkflowActivity.cs b/src/WorkflowCore/Services/WorkflowActivity.cs index 9230f595..80c719fb 100644 --- a/src/WorkflowCore/Services/WorkflowActivity.cs +++ b/src/WorkflowCore/Services/WorkflowActivity.cs @@ -35,6 +35,20 @@ internal static Activity StartPoll(string type) return activity; } + + internal static void Enrich(WorkflowInstance workflow, string action) + { + var activity = Activity.Current; + if (activity != null) + { + activity.DisplayName = $"workflow {action} {workflow.WorkflowDefinitionId}"; + activity.SetTag("workflow.id", workflow.Id); + activity.SetTag("workflow.definition", workflow.WorkflowDefinitionId); + activity.SetTag("workflow.status", workflow.Status); + } + } + + internal static void Enrich(WorkflowStep workflowStep) { var activity = Activity.Current;