Skip to content

Commit

Permalink
Update store/copr/coprocessor.go
Browse files Browse the repository at this point in the history
Co-authored-by: you06 <you1474600@gmail.com>
  • Loading branch information
cfzjywxk and you06 authored Mar 8, 2023
1 parent 840a78f commit dc0c681
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion store/copr/coprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,11 @@ func (worker *copIteratorWorker) handleTaskOnce(bo *Backoffer, task *copTask, ch
}
storeID := strconv.FormatUint(req.Context.GetPeer().GetStoreId(), 10)
isInternal := util.IsRequestSourceInternal(&task.requestSource)
metrics.TiKVCoprocessorHistogram.WithLabelValues(storeID, strconv.FormatBool(staleRead), strconv.FormatBool(isInternal)).Observe(costTime.Seconds())
scope := metrics.LblGeneral
if isInternal {
scope = metrics.LblInternal
}
metrics.TiKVCoprocessorHistogram.WithLabelValues(storeID, strconv.FormatBool(staleRead), scope).Observe(costTime.Seconds())
if copResp != nil {
tidbmetrics.DistSQLCoprRespBodySize.WithLabelValues(storeAddr).Observe(float64(len(copResp.Data)))
}
Expand Down

0 comments on commit dc0c681

Please sign in to comment.