public final class RaftServerMetrics extends RatisMetrics
| Modifier and Type | Field and Description |
|---|---|
static String |
FOLLOWER_LAST_HEARTBEAT_ELAPSED_TIME_METRIC |
static String |
LEADER_METRIC_PEER_COMMIT_INDEX |
static String |
RAFT_CLIENT_READ_REQUEST |
static String |
RAFT_CLIENT_STALE_READ_REQUEST |
static String |
RAFT_CLIENT_WATCH_REQUEST |
static String |
RAFT_CLIENT_WRITE_REQUEST |
static String |
RATIS_SERVER_METRICS |
static String |
RATIS_SERVER_METRICS_DESC |
static String |
REQUEST_BYTE_SIZE |
static String |
REQUEST_BYTE_SIZE_LIMIT_HIT_COUNTER |
static String |
REQUEST_QUEUE_LIMIT_HIT_COUNTER |
static String |
REQUEST_QUEUE_SIZE |
static String |
RESOURCE_LIMIT_HIT_COUNTER |
static String |
RETRY_CACHE_ENTRY_COUNT_METRIC |
static String |
RETRY_CACHE_HIT_COUNT_METRIC |
static String |
RETRY_CACHE_HIT_RATE_METRIC |
static String |
RETRY_CACHE_MISS_COUNT_METRIC |
static String |
RETRY_CACHE_MISS_RATE_METRIC |
RATIS_APPLICATION_NAME_METRICS, registry| Modifier and Type | Method and Description |
|---|---|
void |
addFollower(RaftPeer peer)
Register a follower with this Leader Metrics registry instance.
|
void |
addPeerCommitIndexGauge(RaftPeerId peerId)
Register a commit index tracker for the peer in cluster.
|
com.codahale.metrics.Timer |
getClientRequestTimer(RaftClientRequest request) |
com.codahale.metrics.Counter |
getCounter(String counterName) |
com.codahale.metrics.Timer |
getFollowerAppendEntryTimer(boolean isHeartbeat) |
static com.codahale.metrics.Gauge |
getPeerCommitIndexGauge(RaftServerImpl server,
RaftServerImpl peerServer)
Get the commit index gauge for the given peer of the server
|
static RaftServerMetrics |
getRaftServerMetrics(RaftServerImpl raftServer) |
RatisMetricRegistry |
getRegistry() |
com.codahale.metrics.Timer |
getTimer(String timerName) |
void |
onRequestQueueLimitHit() |
void |
recordFollowerHeartbeatElapsedTime(RaftPeer peer,
long elapsedTime)
Record heartbeat elapsed time for a follower within a Raft group.
|
static void |
removeRaftServerMetrics(RaftServerImpl raftServer) |
create, unregisterpublic static final String RATIS_SERVER_METRICS
public static final String RATIS_SERVER_METRICS_DESC
public static final String FOLLOWER_LAST_HEARTBEAT_ELAPSED_TIME_METRIC
public static final String LEADER_METRIC_PEER_COMMIT_INDEX
public static final String RAFT_CLIENT_READ_REQUEST
public static final String RAFT_CLIENT_STALE_READ_REQUEST
public static final String RAFT_CLIENT_WRITE_REQUEST
public static final String RAFT_CLIENT_WATCH_REQUEST
public static final String REQUEST_QUEUE_LIMIT_HIT_COUNTER
public static final String RESOURCE_LIMIT_HIT_COUNTER
public static final String REQUEST_BYTE_SIZE_LIMIT_HIT_COUNTER
public static final String REQUEST_QUEUE_SIZE
public static final String REQUEST_BYTE_SIZE
public static final String RETRY_CACHE_ENTRY_COUNT_METRIC
public static final String RETRY_CACHE_HIT_COUNT_METRIC
public static final String RETRY_CACHE_HIT_RATE_METRIC
public static final String RETRY_CACHE_MISS_COUNT_METRIC
public static final String RETRY_CACHE_MISS_RATE_METRIC
public static RaftServerMetrics getRaftServerMetrics(RaftServerImpl raftServer)
public static void removeRaftServerMetrics(RaftServerImpl raftServer)
public void addFollower(RaftPeer peer)
peer - representing the followerpublic void addPeerCommitIndexGauge(RaftPeerId peerId)
public static com.codahale.metrics.Gauge getPeerCommitIndexGauge(RaftServerImpl server, RaftServerImpl peerServer)
server - peerServer - public void recordFollowerHeartbeatElapsedTime(RaftPeer peer, long elapsedTime)
peer - representing the follower.elapsedTime - Elapsed time in Nanos.public com.codahale.metrics.Timer getFollowerAppendEntryTimer(boolean isHeartbeat)
public com.codahale.metrics.Timer getTimer(String timerName)
public com.codahale.metrics.Counter getCounter(String counterName)
public com.codahale.metrics.Timer getClientRequestTimer(RaftClientRequest request)
public void onRequestQueueLimitHit()
public RatisMetricRegistry getRegistry()
getRegistry in class RatisMetricsCopyright © 2017–2020 The Apache Software Foundation. All rights reserved.