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
-
public class RouterHttpRequestStats extends AbstractVeniceHttpStats
-
-
Field Summary
-
Fields inherited from class com.linkedin.venice.stats.AbstractVeniceStats
DELIMITER
-
-
Constructor Summary
Constructors Constructor Description RouterHttpRequestStats(io.tehuti.metrics.MetricsRepository metricsRepository, java.lang.String storeName, java.lang.String clusterName, RequestType requestType, ScatterGatherStats scatterGatherStats, boolean isKeyValueProfilingEnabled)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
hasInFlightRequests()
void
recordAbortedRetrySensorOtel(TehutiMetricNameEnum tehutiMetricNameEnum, RequestRetryAbortReason abortReason)
void
recordAllowedRetryRequest()
void
recordBadRequest(io.netty.handler.codec.http.HttpResponseStatus responseStatus)
void
recordBadRequestKeyCount(int keyCount)
void
recordCompressedResponseSize(double compressedResponseSize)
void
recordDecompressionTime(double decompressionTime)
void
recordDelayConstraintAbortedRetryRequest()
void
recordDisallowedRetryRequest()
void
recordErrorRetryAttemptTriggeredByPendingRequestCheck()
void
recordErrorRetryCount()
void
recordFanoutRequestCount(int count)
void
recordFindUnhealthyHostRequest()
void
recordHealthyRequest(java.lang.Double latency, io.netty.handler.codec.http.HttpResponseStatus responseStatus)
void
recordIncomingRequest()
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
recordMetaStoreShadowRead()
void
recordMultiGetFallback(int keyCount)
void
recordNoAvailableReplicaAbortedRetryRequest()
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
recordRequestThrottledByRouterCapacity()
void
recordRequestUsage(int usage)
void
recordResponse()
void
recordResponseSize(double responseSize)
void
recordResponseWaitingTime(double waitingTime)
void
recordRetryDelay(double delay)
void
recordRetryRouteLimitAbortedRetryRequest()
void
recordRetryTriggeredSensorOtel(RequestRetryType retryType)
void
recordSlowRouteAbortedRetryRequest()
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
recordUnavailableReplicaStreamingRequest()
void
recordUnavailableRequest()
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(java.lang.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, getMetricsRepository, getName, getSensorFullName, getSensorFullName, isTotalStats, minAndMax, registerOnlyTotalRate, registerOnlyTotalSensor, registerPerStoreAndTotalSensor, registerSensor, registerSensorAttributeGauge, registerSensorIfAbsent, registerSensorIfAbsent, registerSensorIfAbsent, registerSensorWithAggregate, registerSensorWithAggregate, unregisterAllSensors
-
-
-
-
Constructor Detail
-
RouterHttpRequestStats
public RouterHttpRequestStats(io.tehuti.metrics.MetricsRepository metricsRepository, java.lang.String storeName, java.lang.String clusterName, RequestType requestType, ScatterGatherStats scatterGatherStats, boolean isKeyValueProfilingEnabled)
-
-
Method Detail
-
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(java.lang.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)
-
recordUnavailableReplicaStreamingRequest
public void recordUnavailableReplicaStreamingRequest()
-
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
public void recordRetryTriggeredSensorOtel(RequestRetryType retryType)
-
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)
-
recordUnavailableRequest
public void recordUnavailableRequest()
-
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(java.lang.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()
-
-