Class: DimensionAwareMetricsRegistry

DimensionAwareMetricsRegistry

Simple registry that stores Metrics by name and dimensions.


new DimensionAwareMetricsRegistry( [options])

Parameters:
Name Type Argument Description
options DimensionAwareMetricsRegistryOptions <optional>

Configurable options for the Dimension Aware Metrics Registry

Source:

Methods


allKeys()

Returns an array of all keys of metrics stored in this registry.

Source:
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

Source:
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

Source:
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

Source:
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

Source:
Returns:

The registry key for the metric, dimension combo

Type
string