Class CustomMetric

java.lang.Object
com.datadoghq.datadog_lambda_java.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

    Modifier and Type Method Description
    java.lang.String getName()  
    java.util.Map<java.lang.String,​java.lang.Object> getTags()  
    double getValue()  
    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 Details

    • 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 Details

    • 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
    • getName

      public java.lang.String getName()
    • getValue

      public double getValue()
    • getTags

      public java.util.Map<java.lang.String,​java.lang.Object> getTags()