Skip to content

Commit 62bd926

Browse files
authored
Include number of new events in task
1 parent 9e187d5 commit 62bd926

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

internal/tracing/attributes.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ package tracing
33
const (
44
WorkflowInstanceID = "workflow.instance_id"
55
WorkflowName = "workflow.name"
6+
67
WorkflowTaskID = "workflow_task.id"
7-
ActivityTaskID = "activity_task.id"
8-
ScheduleEventID = "schedule_event_id"
8+
WorkflowTaskEvents = "workflow_task.events"
9+
10+
ActivityTaskID = "activity_task.id"
11+
12+
ScheduleEventID = "schedule_event_id"
913
)

internal/workflow/executor.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ func (e *executor) ExecuteTask(ctx context.Context, t *task.Workflow) (*Executio
8686
ctx, span := e.tracer.Start(ctx, "WorkflowTaskExecution", trace.WithAttributes(
8787
attribute.String(tracing.WorkflowInstanceID, t.WorkflowInstance.InstanceID),
8888
attribute.String(tracing.WorkflowTaskID, t.ID),
89+
attribute.Int(tracing.WorkflowTaskEvents, len(t.NewEvents)),
8990
))
9091
defer span.End()
9192

0 commit comments

Comments
 (0)