diff --git a/src/modules/Elsa.OpenTelemetry/Middleware/OpenTelemetryTracingActivityExecutionMiddleware.cs b/src/modules/Elsa.OpenTelemetry/Middleware/OpenTelemetryTracingActivityExecutionMiddleware.cs index 025ad12f0c..d5c5fdc7b7 100644 --- a/src/modules/Elsa.OpenTelemetry/Middleware/OpenTelemetryTracingActivityExecutionMiddleware.cs +++ b/src/modules/Elsa.OpenTelemetry/Middleware/OpenTelemetryTracingActivityExecutionMiddleware.cs @@ -29,7 +29,8 @@ public async ValueTask InvokeAsync(ActivityExecutionContext context) span.SetTag("activity.type", activity.Type); span.SetTag("activity.name", activity.Name); span.SetTag("activityInstance.id", context.Id); - span.SetTag("activityExecution.startTimeUtc", span.StartTimeUtc); + span.SetTag("activityExecution.startTimeUtc", span.StartTimeUtc); + span.SetTag("tenantId", context.WorkflowExecutionContext.Workflow.Identity.TenantId); span.AddEvent(new ActivityEvent("Executing", tags: CreateStatusTags(context))); diff --git a/src/modules/Elsa.OpenTelemetry/Middleware/OpenTelemetryTracingWorkflowExecutionMiddleware.cs b/src/modules/Elsa.OpenTelemetry/Middleware/OpenTelemetryTracingWorkflowExecutionMiddleware.cs index 019f498762..c0e88ef645 100644 --- a/src/modules/Elsa.OpenTelemetry/Middleware/OpenTelemetryTracingWorkflowExecutionMiddleware.cs +++ b/src/modules/Elsa.OpenTelemetry/Middleware/OpenTelemetryTracingWorkflowExecutionMiddleware.cs @@ -38,7 +38,8 @@ public override async ValueTask InvokeAsync(WorkflowExecutionContext context) span.SetTag("workflowDefinition.definitionId", workflow.Identity.DefinitionId); span.SetTag("workflowDefinition.version", workflow.Identity.Version); span.SetTag("workflowDefinition.name", workflow.WorkflowMetadata.Name); - span.SetTag("workflowExecution.startTimeUtc", span.StartTimeUtc); + span.SetTag("workflowExecution.startTimeUtc", span.StartTimeUtc); + span.SetTag("tenantId", workflow.Identity.TenantId); if(context.TriggerActivityId != null) {