191
completion ActivityCompletionMetrics,
192
tags ...metrics.Tag,
194
>
metricsHandler := GetPerTaskQueueFamilyScope(
195
>
shard.GetMetricsHandler(),
196
>
namespaceName,
197
>
taskQueue,
198
>
shard.GetConfig(),
199
>
tags...,
200
>
)
201
>
202
>
now := shard.GetTimeSource().Now()
203
>
if completion.Status != ActivityStatusTimeout &&
204
>
!completion.AttemptStartedTime.IsZero() &&
205
>
!completion.AttemptStartedTime.After(now) {
206
latency := now.Sub(completion.AttemptStartedTime)
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