diff --git a/physical/raft/raft.go b/physical/raft/raft.go index 217c82ac174..2ff177dfc4c 100644 --- a/physical/raft/raft.go +++ b/physical/raft/raft.go @@ -991,8 +991,11 @@ func (b *RaftBackend) applyLog(ctx context.Context, command *LogData) error { return err } + defer metrics.AddSample([]string{"raft-storage", "entry_size"}, float32(len(commandBytes))) + var chunked bool var applyFuture raft.ApplyFuture + switch { case len(commandBytes) <= raftchunking.ChunkSize: applyFuture = b.raft.Apply(commandBytes, 0)