fix(baseapp): startTime of telemetry metric should be calculated before defer (backport #21968) (#21970)
Co-authored-by: beep <beepdeepor@gmail.com>
This commit is contained in:
parent
8b843727b0
commit
39fe6693ce
@ -180,7 +180,8 @@ func (app *BaseApp) Query(_ context.Context, req *abci.QueryRequest) (resp *abci
|
||||
|
||||
telemetry.IncrCounter(1, "query", "count")
|
||||
telemetry.IncrCounter(1, "query", req.Path)
|
||||
defer telemetry.MeasureSince(telemetry.Now(), req.Path)
|
||||
start := telemetry.Now()
|
||||
defer telemetry.MeasureSince(start, req.Path)
|
||||
|
||||
if req.Path == QueryPathBroadcastTx {
|
||||
return queryResult(errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "can't route a broadcast tx message"), app.trace), nil
|
||||
|
||||
Loading…
Reference in New Issue
Block a user