Skip to content

Commit

Permalink
add lag metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
jayy04 committed May 7, 2024
1 parent 20c3a3d commit 69c1c4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions protocol/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import (
"github.com/cosmos/cosmos-sdk/server/api"
"github.com/cosmos/cosmos-sdk/server/config"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
"github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/version"
Expand Down Expand Up @@ -1493,6 +1494,8 @@ func (app *App) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) {

// EndBlocker application updates every end block
func (app *App) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) {
defer telemetry.MeasureSince(ctx.BlockTime(), "end_blocker_lag")

ctx = ctx.WithExecMode(lib.ExecModeEndBlock)

// Reset the logger for middleware.
Expand Down

0 comments on commit 69c1c4b

Please sign in to comment.