204
!completion.AttemptStartedTime.IsZero() &&
205
!completion.AttemptStartedTime.After(now) {
206
>
latency := now.Sub(completion.AttemptStartedTime)
metrics.go
207
>
// ActivityE2ELatency is deprecated due to its inaccurate naming. It captures the attempt duration instead of an end-to-end duration as its name suggests. For now record both metrics
208
>
metrics.ActivityE2ELatency.With(metricsHandler).Record(latency)
209
>
metrics.ActivityStartToCloseLatency.With(metricsHandler).Record(latency)
210
>
}
211
212
// Record true end-to-end duration only for terminal states (includes retries and backoffs)