Class StreamMetricsReporter

  • All Implemented Interfaces:
    io.dropwizard.metrics5.Reporter, Closeable, AutoCloseable

    public class StreamMetricsReporter
    extends io.dropwizard.metrics5.ScheduledReporter
    A Dropwizard Metrics Reporter that sends metrics into a Nuxeo Stream.
    Since:
    11.5
    • Constructor Summary

      Constructors 
      Constructor Description
      StreamMetricsReporter​(io.dropwizard.metrics5.MetricRegistry registry, io.dropwizard.metrics5.MetricFilter filter)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected String getNodeId()  
      protected void putGaugeMetric​(com.fasterxml.jackson.databind.node.ObjectNode metric, Object o)  
      void report​(SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Gauge> gauges, SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Counter> counters, SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Histogram> histograms, SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Meter> meters, SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Timer> timers)  
      protected void reportCounter​(com.fasterxml.jackson.databind.node.ArrayNode metrics, io.dropwizard.metrics5.MetricName key, io.dropwizard.metrics5.Counter value)  
      protected void reportGauge​(com.fasterxml.jackson.databind.node.ArrayNode metrics, io.dropwizard.metrics5.MetricName key, io.dropwizard.metrics5.Gauge<?> value)  
      protected void reportTimer​(com.fasterxml.jackson.databind.node.ArrayNode metrics, io.dropwizard.metrics5.MetricName key, io.dropwizard.metrics5.Timer value)  
      • Methods inherited from class io.dropwizard.metrics5.ScheduledReporter

        close, convertDuration, convertRate, getDisabledMetricAttributes, getDurationUnit, getRateUnit, isShutdownExecutorOnStop, report, start, start, stop
    • Field Detail

      • OBJECT_MAPPER

        protected static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER
      • hostIp

        protected String hostIp
      • hostname

        protected String hostname
      • nodeId

        protected String nodeId
    • Constructor Detail

      • StreamMetricsReporter

        public StreamMetricsReporter​(io.dropwizard.metrics5.MetricRegistry registry,
                                     io.dropwizard.metrics5.MetricFilter filter)
    • Method Detail

      • getNodeId

        protected String getNodeId()
      • report

        public void report​(SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Gauge> gauges,
                           SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Counter> counters,
                           SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Histogram> histograms,
                           SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Meter> meters,
                           SortedMap<io.dropwizard.metrics5.MetricName,​io.dropwizard.metrics5.Timer> timers)
        Specified by:
        report in class io.dropwizard.metrics5.ScheduledReporter
      • reportTimer

        protected void reportTimer​(com.fasterxml.jackson.databind.node.ArrayNode metrics,
                                   io.dropwizard.metrics5.MetricName key,
                                   io.dropwizard.metrics5.Timer value)
      • reportCounter

        protected void reportCounter​(com.fasterxml.jackson.databind.node.ArrayNode metrics,
                                     io.dropwizard.metrics5.MetricName key,
                                     io.dropwizard.metrics5.Counter value)
      • reportGauge

        protected void reportGauge​(com.fasterxml.jackson.databind.node.ArrayNode metrics,
                                   io.dropwizard.metrics5.MetricName key,
                                   io.dropwizard.metrics5.Gauge<?> value)
      • putGaugeMetric

        protected void putGaugeMetric​(com.fasterxml.jackson.databind.node.ObjectNode metric,
                                      Object o)