Class RouterHttpRequestStats


public class RouterHttpRequestStats extends AbstractVeniceHttpStats
  • 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)
    • 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 in RouterExceptionAndTrackingUtils, and we only report them in VeniceResponseAggregator 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(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 class AbstractVeniceHttpStats
    • hasInFlightRequests

      public static boolean hasInFlightRequests()