Class MetricDescriptor

java.lang.Object
org.opendaylight.serviceutils.metrics.MetricDescriptor
Direct Known Subclasses:
ImmutableMetricDescriptor

@Immutable public abstract class MetricDescriptor extends Object
Descriptor of Metric.
Author:
Michael Vorburger.ch
See Also:
  • Constructor Details

    • MetricDescriptor

      public MetricDescriptor()
  • Method Details

    • 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 given project(). 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 given project() + 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()