-
Notifications
You must be signed in to change notification settings - Fork 179
Align workflow_task_schedule_to_start_latency #2669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
import static io.temporal.serviceclient.MetricsTag.METRICS_TAGS_CALL_OPTIONS_KEY; | ||
|
||
import com.google.protobuf.Timestamp; | ||
import com.uber.m3.tally.Scope; | ||
import com.uber.m3.util.ImmutableMap; | ||
import io.grpc.Context; | ||
|
@@ -154,10 +153,9 @@ public CompletableFuture<WorkflowTask> poll(SlotPermit permit) | |
pollerMetricScope | ||
.counter(MetricsType.WORKFLOW_TASK_QUEUE_POLL_SUCCEED_COUNTER) | ||
.inc(1); | ||
Timestamp startedTime = ProtobufTimeUtils.getCurrentProtoTime(); | ||
pollerMetricScope | ||
.timer(MetricsType.WORKFLOW_TASK_SCHEDULE_TO_START_LATENCY) | ||
.record(ProtobufTimeUtils.toM3Duration(startedTime, r.getScheduledTime())); | ||
.record(ProtobufTimeUtils.toM3Duration(r.getStartedTime(), r.getScheduledTime())); | ||
Comment on lines
-160
to
+158
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any idea of what the practical time difference could be for users that may be monitoring this metric? I guess we can just call it out in release notes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clock skew between the Server and Worker, maybe some unaccounted for network time. The main issue is the async poller was measuring it differently then everywhere else which is a bug.
Comment on lines
-160
to
+158
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see this same logic for activity, do we want to update that one to use the activity poll response start time too? I also saw this logic with Nexus, but no start time on its response (I also confirmed the activity and workflow started time fields on the response go as far back as Temporal, so we're safe for old server versions) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah good catch, fixed |
||
return new WorkflowTask(r, (reason) -> slotSupplier.releaseSlot(reason, permit)); | ||
}) | ||
.whenComplete( | ||
|
Uh oh!
There was an error while loading. Please reload this page.