Interface Metric<T>
- Type Parameters:
T- the type of value this metric holds
public interface Metric<T>
Represents a single telemetry data source.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new Array metric.Creates a new Boolean metric.static <E> Metric<Collection<Object>> collection(String name, Callable<Collection<E>> supplier) Creates a new Collection metric.getName()Gets the unique name identifying this metric.getValue()Retrieves the current value of the metric.Creates a new Map metric.Creates a new Number metric.Creates a new String metric.
-
Method Details
-
string
-
number
-
bool
-
map
Creates a new Map metric. Entry values are automatically normalized to standard supported types (Boolean, Number, String).- Type Parameters:
V- the original value type of the map- Parameters:
name- the name of the metricsupplier- the callable providing the map- Returns:
- a new Metric instance returning a normalized Map
-
collection
Creates a new Collection metric. Elements are automatically normalized to standard supported types (Boolean, Number, String).- Type Parameters:
E- the original element type of the collection- Parameters:
name- the name of the metricsupplier- the callable providing the collection- Returns:
- a new Metric instance returning a normalized Collection
-
array
Creates a new Array metric. Elements are automatically normalized to standard supported types (Boolean, Number, String).- Type Parameters:
E- the original element type of the array- Parameters:
name- the name of the metricsupplier- the callable providing the array- Returns:
- a new Metric instance returning a normalized Array
-
getName
-
getValue
-