Class MetricDescriptor
- java.lang.Object
 - 
- org.opendaylight.infrautils.metrics.MetricDescriptor
 
 
- 
- Direct Known Subclasses:
 ImmutableMetricDescriptor
@Immutable public abstract class MetricDescriptor extends Object
Descriptor of Metric.- Author:
 - Michael Vorburger.ch
 - See Also:
 MetricProvider
 
- 
- 
Constructor Summary
Constructors Constructor Description MetricDescriptor() 
- 
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Objectanchor()Instance of the class "containing" this Metric.static ImmutableMetricDescriptor.AnchorBuildStagebuilder()protected voidcheck()Stringdescription()Human readable description of the Metric.abstract Stringid()abstract Stringmodule()Name of OpenDaylight module the Metric is for, unique within givenproject().abstract Stringproject()Name of OpenDaylight project the Metric is for, unique at opendaylight.org. 
 - 
 
- 
- 
Method Detail
- 
builder
public static ImmutableMetricDescriptor.AnchorBuildStage builder()
 
- 
anchor
public abstract Object anchor()
Instance of the class "containing" this Metric. 
- 
project
public abstract String project()
Name of OpenDaylight project the Metric is for, unique at opendaylight.org. E.g. "netvirt" or "genius" or "openflowplugin" or "infrautils" etc. The project/module/id together must be unique within ODL. Valid values match[a-z0-9]+(lower case and no dots nor underscores). 
- 
module
public abstract String module()
Name of OpenDaylight module the Metric is for, unique within givenproject(). E.g. "vpnmanager" or "lockmanager" or "jobcoordinator" etc. The project/module/id together must be unique within ODL. Valid values match[a-z0-9]+(lower case and no dots nor underscores). 
- 
id
public abstract String id()
ID of the Metric, unique within givenproject()+module(). E.g. "jobsPending" or "dropped_packets" or "traffic" etc. The project/module/id together must be unique within ODL. Valid values match[a-zA-Z0-9_]+(lower and upper case and underscore allowed, but not starting with). The dot character is not allowed here because at least one of the implementations (Prometheus.io) does not accept dots in its IDs. 
- 
description
@Default public String description()
Human readable description of the Metric. E.g. "Counts the number of bla bla bla". No validation of valid values; anything goes. Defaults to be the same as id(); but highly recommended to be set so that external Dashboard type UIs can show it as documentation or help for this Metric. 
- 
check
@Check protected void check()
 
 - 
 
 -