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
All Methods Instance Methods Concrete Methods 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 metricvoid
write()
Write writes the CustomMetric to Datadog
-
-
-
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 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 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
-
getName
public java.lang.String getName()
-
getValue
public double getValue()
-
getTags
public java.util.Map<java.lang.String,java.lang.Object> getTags()
-
-