Class MetricsExample

java.lang.Object
org.opendaylight.serviceutils.metrics.sample.MetricsExample
All Implemented Interfaces:
AutoCloseable, Runnable

@Singleton public final class MetricsExample extends Object implements Runnable, AutoCloseable
Example illustrating usage of metrics API, and demo.

This can be run either via a simple (standalone) main(), see MetricsExampleMain and MetricsPrometheusExampleMain, or in Karaf under OSGi by "feature:install odl-infrautils-metrics-sample" (in which case you will need to feature:install an implementation of MetricProvider, first).

Author:
Michael Vorburger.ch
  • Constructor Details

    • MetricsExample

      @Inject public MetricsExample(MetricProvider metricProvider)
  • Method Details

    • close

      @PreDestroy public void close()
      Specified by:
      close in interface AutoCloseable
    • run

      public void run()
      Specified by:
      run in interface Runnable