Class MetricsMap

  • All Implemented Interfaces:
    com.codahale.metrics.Gauge<Map<String,​Object>>, com.codahale.metrics.Metric, DynamicMBean, MapSerializable, MapWriter, NavigableObject

    public class MetricsMap
    extends Object
    implements com.codahale.metrics.Gauge<Map<String,​Object>>, MapWriter, DynamicMBean
    Dynamically constructed map of metrics, intentionally different from MetricSet where each metric had to be known in advance and registered separately in MetricRegistry.

    Note: this awkwardly extends Gauge and not Metric because awkwardly Metric instances are not supported by MetricRegistryListener :(

    Note 2: values added to this metric map should belong to the list of types supported by JMX: OpenType.ALLOWED_CLASSNAMES_LIST, otherwise only their toString() representation will be shown in JConsole.