Skip to content

Commit 3b581ea

Browse files
Fix AsyncActivityPollTask
1 parent bffc066 commit 3b581ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import static io.temporal.serviceclient.MetricsTag.METRICS_TAGS_CALL_OPTIONS_KEY;
44

55
import com.google.protobuf.DoubleValue;
6-
import com.google.protobuf.Timestamp;
76
import com.uber.m3.tally.Scope;
87
import io.grpc.Context;
98
import io.temporal.api.common.v1.WorkerVersionCapabilities;
@@ -113,10 +112,11 @@ public CompletableFuture<ActivityTask> poll(SlotPermit permit) {
113112
metricsScope.counter(MetricsType.ACTIVITY_POLL_NO_TASK_COUNTER).inc(1);
114113
return null;
115114
}
116-
Timestamp startedTime = ProtobufTimeUtils.getCurrentProtoTime();
117115
metricsScope
118116
.timer(MetricsType.ACTIVITY_SCHEDULE_TO_START_LATENCY)
119-
.record(ProtobufTimeUtils.toM3Duration(startedTime, r.getScheduledTime()));
117+
.record(
118+
ProtobufTimeUtils.toM3Duration(
119+
r.getStartedTime(), r.getCurrentAttemptScheduledTime()));
120120
return new ActivityTask(
121121
r,
122122
permit,

0 commit comments

Comments
 (0)