Class EventMetric


  • public class EventMetric
    extends Object
    Metric measurements for events.
    • Constructor Detail

      • EventMetric

        public EventMetric​(MetricsService metricsService,
                           String componentName,
                           String featureName)
        Constructor.
        Parameters:
        metricsService - the Metrics Service to use for Metrics registration and deregistration
        componentName - the Metrics Component Name to use for Metrics registration and deregistration
        featureName - the Metrics Feature Name to use for Metrics registration and deregistration
    • Method Detail

      • registerMetrics

        public void registerMetrics()
        Registers the metrics.
      • removeMetrics

        public void removeMetrics()
        Removes the metrics.
      • eventReceived

        public void eventReceived()
        Updates the metric measurements for a single event.
      • lastEventTimestampGauge

        public com.codahale.metrics.Gauge<Long> lastEventTimestampGauge()
        Gets the last event timestamp Gauge (ms from the Epoch).
        Returns:
        the last event timestamp Gauge (ms from the Epoch)
      • eventRateMeter

        public com.codahale.metrics.Meter eventRateMeter()
        Gets the event rate meter.
        Returns:
        the event rate meter