Package com.linkedin.venice.router.stats
Class RouterHttpRequestStats
java.lang.Object
com.linkedin.venice.stats.AbstractVeniceStats
com.linkedin.venice.stats.AbstractVeniceHttpStats
com.linkedin.venice.router.stats.RouterHttpRequestStats
-
Field Summary
Fields inherited from class com.linkedin.venice.stats.AbstractVeniceStats
DELIMITER
-
Constructor Summary
ConstructorDescriptionRouterHttpRequestStats
(io.tehuti.metrics.MetricsRepository metricsRepository, String storeName, String clusterName, RequestType requestType, ScatterGatherStats scatterGatherStats, boolean isKeyValueProfilingEnabled) -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
void
recordAbortedRetrySensorOtel
(TehutiMetricNameEnum tehutiMetricNameEnum, RequestRetryAbortReason abortReason) void
void
recordBadRequest
(io.netty.handler.codec.http.HttpResponseStatus responseStatus) void
recordBadRequestKeyCount
(int keyCount) void
recordCompressedResponseSize
(double compressedResponseSize) void
recordDecompressionTime
(double decompressionTime) void
void
void
void
void
recordFanoutRequestCount
(int count) void
void
recordHealthyRequest
(Double latency, io.netty.handler.codec.http.HttpResponseStatus responseStatus) void
We record this at the beginning of request handling, so we don't know the latency yet...void
recordKeyCountMetric
(TehutiMetricNameEnum tehutiMetricNameEnum, int keyNum, RequestValidationOutcome outcome) void
recordKeyNum
(int keyNum) void
recordKeySizeInByte
(long keySize) void
recordLatency
(double latency) void
recordLatencyMetric
(TehutiMetricNameEnum tehutiMetricNameEnum, double latency, io.netty.handler.codec.http.HttpResponseStatus responseStatus, VeniceResponseStatusCategory veniceResponseStatusCategory) void
void
recordMultiGetFallback
(int keyCount) void
void
recordQuota
(double quota) void
recordReadQuotaUsage
(int quotaUsage) Record read quota usage based on healthy KPS.void
recordRequestMetric
(TehutiMetricNameEnum tehutiMetricNameEnum, io.netty.handler.codec.http.HttpResponseStatus responseStatus, VeniceResponseStatusCategory veniceResponseStatusCategory) void
recordRequestParsingLatency
(double latency) void
recordRequestRoutingLatency
(double latency) void
recordRequestSize
(double requestSize) void
void
recordRequestUsage
(int usage) void
void
recordResponseSize
(double responseSize) void
recordResponseWaitingTime
(double waitingTime) void
recordRetryDelay
(double delay) void
void
recordRetryTriggeredSensorOtel
(RequestRetryType retryType) void
void
recordTardyRequest
(double latency, io.netty.handler.codec.http.HttpResponseStatus responseStatus) void
recordThrottledRequest
(double latency, io.netty.handler.codec.http.HttpResponseStatus responseStatus) void
recordThrottledRequest
(io.netty.handler.codec.http.HttpResponseStatus responseStatus) Once we stop reporting throttled requests inRouterExceptionAndTrackingUtils
, and we only report them inVeniceResponseAggregator
then we will always have a latency and we'll be able to remove this overload.void
void
void
recordUnhealthyRequest
(double latency, io.netty.handler.codec.http.HttpResponseStatus responseStatus) void
recordUnhealthyRequest
(io.netty.handler.codec.http.HttpResponseStatus responseStatus) protected io.tehuti.metrics.Sensor
registerSensor
(String sensorName, io.tehuti.metrics.MeasurableStat... stats) By default, this function will prepend the request type to the sensor name.Methods inherited from class com.linkedin.venice.stats.AbstractVeniceHttpStats
getFullMetricName, getRequestType, registerSensor, registerSensor, registerSensorWithDetailedPercentiles
Methods inherited from class com.linkedin.venice.stats.AbstractVeniceStats
avgAndMax, avgAndTotal, getMetricFullName, getMetricsRepository, getName, getSensorFullName, getSensorFullName, isTotalStats, minAndMax, registerOnlyTotalRate, registerOnlyTotalSensor, registerPerStoreAndTotalSensor, registerSensor, registerSensorAttributeGauge, registerSensorIfAbsent, registerSensorIfAbsent, registerSensorIfAbsent, registerSensorWithAggregate, registerSensorWithAggregate, unregisterAllSensors
-
Constructor Details
-
RouterHttpRequestStats
public RouterHttpRequestStats(io.tehuti.metrics.MetricsRepository metricsRepository, String storeName, String clusterName, RequestType requestType, ScatterGatherStats scatterGatherStats, boolean isKeyValueProfilingEnabled)
-
-
Method Details
-
recordIncomingRequest
public void recordIncomingRequest()We record this at the beginning of request handling, so we don't know the latency yet... All specific types of requests also have their latencies logged at the same time. -
recordHealthyRequest
public void recordHealthyRequest(Double latency, io.netty.handler.codec.http.HttpResponseStatus responseStatus) -
recordUnhealthyRequest
public void recordUnhealthyRequest(io.netty.handler.codec.http.HttpResponseStatus responseStatus) -
recordUnhealthyRequest
public void recordUnhealthyRequest(double latency, io.netty.handler.codec.http.HttpResponseStatus responseStatus) -
recordReadQuotaUsage
public void recordReadQuotaUsage(int quotaUsage) Record read quota usage based on healthy KPS.- Parameters:
quotaUsage
-
-
recordTardyRequest
public void recordTardyRequest(double latency, io.netty.handler.codec.http.HttpResponseStatus responseStatus) -
recordThrottledRequest
public void recordThrottledRequest(double latency, io.netty.handler.codec.http.HttpResponseStatus responseStatus) -
recordThrottledRequest
public void recordThrottledRequest(io.netty.handler.codec.http.HttpResponseStatus responseStatus) Once we stop reporting throttled requests inRouterExceptionAndTrackingUtils
, and we only report them inVeniceResponseAggregator
then we will always have a latency and we'll be able to remove this overload. TODO: Remove this overload after fixing the above. -
recordErrorRetryCount
public void recordErrorRetryCount() -
recordRetryTriggeredSensorOtel
-
recordAbortedRetrySensorOtel
public void recordAbortedRetrySensorOtel(TehutiMetricNameEnum tehutiMetricNameEnum, RequestRetryAbortReason abortReason) -
recordBadRequest
public void recordBadRequest(io.netty.handler.codec.http.HttpResponseStatus responseStatus) -
recordBadRequestKeyCount
public void recordBadRequestKeyCount(int keyCount) -
recordRequestThrottledByRouterCapacity
public void recordRequestThrottledByRouterCapacity() -
recordFanoutRequestCount
public void recordFanoutRequestCount(int count) -
recordLatency
public void recordLatency(double latency) -
recordLatencyMetric
public void recordLatencyMetric(TehutiMetricNameEnum tehutiMetricNameEnum, double latency, io.netty.handler.codec.http.HttpResponseStatus responseStatus, VeniceResponseStatusCategory veniceResponseStatusCategory) -
recordRequestMetric
public void recordRequestMetric(TehutiMetricNameEnum tehutiMetricNameEnum, io.netty.handler.codec.http.HttpResponseStatus responseStatus, VeniceResponseStatusCategory veniceResponseStatusCategory) -
recordResponseWaitingTime
public void recordResponseWaitingTime(double waitingTime) -
recordRequestSize
public void recordRequestSize(double requestSize) -
recordCompressedResponseSize
public void recordCompressedResponseSize(double compressedResponseSize) -
recordResponseSize
public void recordResponseSize(double responseSize) -
recordDecompressionTime
public void recordDecompressionTime(double decompressionTime) -
recordQuota
public void recordQuota(double quota) -
recordFindUnhealthyHostRequest
public void recordFindUnhealthyHostRequest() -
recordKeyNum
public void recordKeyNum(int keyNum) -
recordKeyCountMetric
public void recordKeyCountMetric(TehutiMetricNameEnum tehutiMetricNameEnum, int keyNum, RequestValidationOutcome outcome) -
recordRequestUsage
public void recordRequestUsage(int usage) -
recordMultiGetFallback
public void recordMultiGetFallback(int keyCount) -
recordRequestParsingLatency
public void recordRequestParsingLatency(double latency) -
recordRequestRoutingLatency
public void recordRequestRoutingLatency(double latency) -
recordDelayConstraintAbortedRetryRequest
public void recordDelayConstraintAbortedRetryRequest() -
recordSlowRouteAbortedRetryRequest
public void recordSlowRouteAbortedRetryRequest() -
recordRetryRouteLimitAbortedRetryRequest
public void recordRetryRouteLimitAbortedRetryRequest() -
recordNoAvailableReplicaAbortedRetryRequest
public void recordNoAvailableReplicaAbortedRetryRequest() -
recordKeySizeInByte
public void recordKeySizeInByte(long keySize) -
recordResponse
public void recordResponse() -
recordAllowedRetryRequest
public void recordAllowedRetryRequest() -
recordDisallowedRetryRequest
public void recordDisallowedRetryRequest() -
recordErrorRetryAttemptTriggeredByPendingRequestCheck
public void recordErrorRetryAttemptTriggeredByPendingRequestCheck() -
recordRetryDelay
public void recordRetryDelay(double delay) -
recordMetaStoreShadowRead
public void recordMetaStoreShadowRead() -
registerSensor
protected io.tehuti.metrics.Sensor registerSensor(String sensorName, io.tehuti.metrics.MeasurableStat... stats) Description copied from class:AbstractVeniceHttpStats
By default, this function will prepend the request type to the sensor name.- Overrides:
registerSensor
in classAbstractVeniceHttpStats
-
hasInFlightRequests
public static boolean hasInFlightRequests()
-