Class CustomMetric


  • public class CustomMetric
    extends java.lang.Object
    All the information for a custom Datadog distribution metric.
    • Constructor Summary

      Constructors 
      Constructor Description
      CustomMetric​(java.lang.String name, double value, java.util.Map<java.lang.String,​java.lang.Object> tags)
      Create a custom distribution metric
      CustomMetric​(java.lang.String name, double value, java.util.Map<java.lang.String,​java.lang.Object> tags, java.util.Date time)
      Create a custom distribution metric with custom a custom time
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toJson()
      Create a JSON string representing the distribution metric
      void write()
      Write writes the CustomMetric to Datadog
      • Methods inherited from class java.lang.Object

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

      • CustomMetric

        public CustomMetric​(java.lang.String name,
                            double value,
                            java.util.Map<java.lang.String,​java.lang.Object> tags)
        Create a custom distribution metric
        Parameters:
        name - The name assigned to the metric
        value - The value of the metric
        tags - A map of tags (if any) that you want to assign to the metric
      • CustomMetric

        public CustomMetric​(java.lang.String name,
                            double value,
                            java.util.Map<java.lang.String,​java.lang.Object> tags,
                            java.util.Date time)
        Create a custom distribution metric with custom a custom time
        Parameters:
        name - The name assigned to the metric
        value - The value of the metric
        tags - A map of tags (if any) that you want to assign to the metric
        time - The time that you want to give to the metric
    • Method Detail

      • toJson

        public java.lang.String toJson()
        Create a JSON string representing the distribution metric
        Returns:
        the Metric's JSON representation
      • write

        public void write()
        Write writes the CustomMetric to Datadog