Class RestRequestMetrics


  • public class RestRequestMetrics
    extends java.lang.Object
    A metrics object that is provided as input to RestRequestMetricsTracker.injectMetrics(RestRequestMetrics).

    It is expected that each request type will have it's own instance of RestRequestMetrics and the same instance is used to track all requests of that type.
    • Constructor Summary

      Constructors 
      Constructor Description
      RestRequestMetrics​(java.lang.Class ownerClass, java.lang.String requestType, com.codahale.metrics.MetricRegistry metricRegistry)
      Creates an instance of RestRequestMetrics for requestType and attaches all the metrics related to the request to the given ownerClass.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RestRequestMetrics

        public RestRequestMetrics​(java.lang.Class ownerClass,
                                  java.lang.String requestType,
                                  com.codahale.metrics.MetricRegistry metricRegistry)
        Creates an instance of RestRequestMetrics for requestType and attaches all the metrics related to the request to the given ownerClass. The metrics are also registered in the provided metricRegistry.
        Parameters:
        ownerClass - the Class that is supposed to own the metrics created by this tracker.
        requestType - the type of request for which a tracker is being created.
        metricRegistry - the MetricRegistry to use to register the created metrics.