new DimensionAwareMetricsRegistry( [options])
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
options |
DimensionAwareMetricsRegistryOptions |
<optional> |
Configurable options for the Dimension Aware Metrics Registry |
Methods
-
allKeys()
-
Returns an array of all keys of metrics stored in this registry.
Returns:
all keys of metrics stored in this registry.
- Type
- Array.<string>
-
getMetric(name, dimensions)
-
Retrieves a metric with a given name and dimensions is present.
Parameters:
Name Type Description name
string The metric name
dimensions
Dimensions The dimensions for the metric
Returns:
a wrapper object around name, dimension and Metric
- Type
- Metric
-
getMetricWrapperByKey(key)
-
Retrieves a metric by the calculated key (name / dimension combo).
Parameters:
Name Type Description key
string The registered key for the given registered MetricWrapper
Returns:
a wrapper object around name, dimension and Metric
- Type
- MetricWrapper
-
hasMetric(name, dimensions)
-
Checks to see if a metric with the given name and dimensions is present.
Parameters:
Name Type Description name
string The metric name
dimensions
Dimensions The dimensions for the metric
Returns:
true if the metric with given dimensions is present
- Type
- boolean
-
putMetric(name, metric, dimensions)
-
Upserts a Metric in the internal storage map for a given name, dimension combo
Parameters:
Name Type Description name
string The metric name
metric
Metric The Metric impl
dimensions
Dimensions The dimensions for the metric
Returns:
The registry key for the metric, dimension combo
- Type
- string