Skip to content

Commit

Permalink
Merge pull request #6083 from jdevillard/enh/tenants/otel-props
Browse files Browse the repository at this point in the history
[Feat: OTEL + Tenants] : Add TenantId Property to Span
  • Loading branch information
sfmskywalker authored Dec 11, 2024
2 parents 9d00466 + 5c3770d commit 06b7ba4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 06b7ba4

Please sign in to comment.