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 metricCustomMetric(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
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 metricvalue
- The value of the metrictags
- 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 metricvalue
- The value of the metrictags
- A map of tags (if any) that you want to assign to the metrictime
- 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()
-