Skip to content

Commit a68f201

Browse files
Align workflow_task_schedule_to_start_latency
1 parent 4631b16 commit a68f201

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

temporal-sdk/src/main/java/io/temporal/internal/worker/AsyncWorkflowPollTask.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,9 @@ public CompletableFuture<WorkflowTask> poll(SlotPermit permit)
154154
pollerMetricScope
155155
.counter(MetricsType.WORKFLOW_TASK_QUEUE_POLL_SUCCEED_COUNTER)
156156
.inc(1);
157-
Timestamp startedTime = ProtobufTimeUtils.getCurrentProtoTime();
158157
pollerMetricScope
159158
.timer(MetricsType.WORKFLOW_TASK_SCHEDULE_TO_START_LATENCY)
160-
.record(ProtobufTimeUtils.toM3Duration(startedTime, r.getScheduledTime()));
159+
.record(ProtobufTimeUtils.toM3Duration(r.getStartedTime(), r.getScheduledTime()));
161160
return new WorkflowTask(r, (reason) -> slotSupplier.releaseSlot(reason, permit));
162161
})
163162
.whenComplete(

0 commit comments

Comments
 (0)