Class MetricLogger


  • public class MetricLogger
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      MetricLogger()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void logMetric​(java.lang.String source, java.lang.String name, long value, java.util.Map<java.lang.String,​java.lang.String> tags)
      Logs a counter metric for a source.
      static void logMetric​(java.lang.String source, java.lang.String did, java.lang.String flow, java.lang.String name, long value)
      Logs a counter metric for a source, delta file id, and flow.
      static void logMetric​(java.lang.String source, java.lang.String did, java.lang.String flow, java.lang.String name, long value, java.util.Map<java.lang.String,​java.lang.String> additionalTags)
      Logs a counter metric for a source, delta file id, and flow.
      static void logMetric​(java.lang.String source, MetricType type, java.lang.String name, long value, java.util.Map<java.lang.String,​java.lang.String> tags)
      Logs a metric for a source.
      • Methods inherited from class java.lang.Object

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

      • MetricLogger

        public MetricLogger()
    • Method Detail

      • logMetric

        public static void logMetric​(java.lang.String source,
                                     java.lang.String did,
                                     java.lang.String flow,
                                     java.lang.String name,
                                     long value)
        Logs a counter metric for a source, delta file id, and flow. Delta file id and flow are added as the only tags.
        Parameters:
        source - the source
        did - the delta file id
        flow - the flow
        name - the name
        value - the value
      • logMetric

        public static void logMetric​(java.lang.String source,
                                     java.lang.String did,
                                     java.lang.String flow,
                                     java.lang.String name,
                                     long value,
                                     java.util.Map<java.lang.String,​java.lang.String> additionalTags)
        Logs a counter metric for a source, delta file id, and flow. Delta file id and flow are added as tags along with the provided additional tags.
        Parameters:
        source - the source
        did - the delta file id
        flow - the flow
        name - the name
        value - the value
        additionalTags - additional tags (key/value pairs) to add to the log entry
      • logMetric

        public static void logMetric​(java.lang.String source,
                                     java.lang.String name,
                                     long value,
                                     java.util.Map<java.lang.String,​java.lang.String> tags)
        Logs a counter metric for a source.
        Parameters:
        source - the source
        name - the name
        value - the value
        tags - additional tags (key/value pairs) to add to the log entry
      • logMetric

        public static void logMetric​(java.lang.String source,
                                     MetricType type,
                                     java.lang.String name,
                                     long value,
                                     java.util.Map<java.lang.String,​java.lang.String> tags)
        Logs a metric for a source.
        Parameters:
        source - the source
        type - the type
        name - the name
        value - the value
        tags - additional tags (key/value pairs) to add to the log entry