Class MetricsV2

java.lang.Object
com.thingworx.metrics.v2.MetricsV2

@ThingworxExtensionApiClass(since={9,7,0}) public class MetricsV2 extends Object
  • Field Details

    • EXT_INSTRUMENTATION_SCOPE_NAME

      public static String EXT_INSTRUMENTATION_SCOPE_NAME
  • Constructor Details

    • MetricsV2

      protected MetricsV2()
  • Method Details

    • gauge

      @ThingworxExtensionApiMethod(since={9,7,0}) public static IGauge gauge(String name)


      Gets the instance of the Gauge metric. This method verifies that the requested metrics is an external metrics and throws a ValidationException exception if it's not.
      Parameters:
      name - of the metric being requested.
    • gauge

      @ThingworxExtensionApiMethod(since={9,7,0}) public static IGauge gauge(String name, MetricOptions options)


      Gets the instance of gauge metric if present or Creates the instance if not present. This method verifies that the requested metrics is an external metrics and throws a ValidationException exception if it's not.
      Parameters:
      name - of the metric being requested.
      options - instance of MetricOptions (metadata of the metric).
    • asyncGauge

      @ThingworxExtensionApiMethod(since={9,7,0}) public static IAsyncGauge asyncGauge(String name)


      Gets the instance of the AsyncGauge metric. This method verifies that the requested metrics is an external metrics and throws a ValidationException exception if it's not.
      Parameters:
      name - of the metric being requested.
    • asyncGauge

      @ThingworxExtensionApiMethod(since={9,7,0}) public static IAsyncGauge asyncGauge(String name, Supplier<MetricRecord> callBack, MetricOptions options)


      Gets the instance of asyncgauge metric if present or Creates the instance if not present. This method verifies that the requested metrics is an external metrics and throws a ValidationException exception if it's not.
      Parameters:
      name - of the metric being requested.
      callBack - supplier a MetricRecord is used to manufacture a Gauge.
      options - instance of MetricOptions (metadata of the metric).
    • upDownCounter

      @ThingworxExtensionApiMethod(since={9,7,0}) public static ICounter upDownCounter(String name)


      Gets the instance of the upDown counter metric. This method verifies that the requested metrics is an external metrics and throws a ValidationException exception if it's not.
      Parameters:
      name - of the metric being requested.
    • upDownCounter

      @ThingworxExtensionApiMethod(since={9,7,0}) public static ICounter upDownCounter(String name, MetricOptions options)


      Gets the instance of upDown counter metric if present or Creates the instance if not present. This method verifies that the requested metrics is an external metrics and throws a ValidationException exception if it's not.
      Parameters:
      name - of the metric being requested.
      options - instance of MetricOptions (metadata of the metric).
    • counter

      @ThingworxExtensionApiMethod(since={9,7,0}) public static ICounter counter(String name)


      Gets the instance of the up counter metric. This method verifies that the requested metrics is an external metrics and throws a ValidationException exception if it's not.
      Parameters:
      name - of the metric being requested.
    • counter

      @ThingworxExtensionApiMethod(since={9,7,0}) public static ICounter counter(String name, MetricOptions options)


      Gets the instance of up counter metric if present or Creates the instance if not present. This method verifies that the requested metrics is an external metrics and throws a ValidationException exception if it's not.
      Parameters:
      name - of the metric being requested.
      options - instance of MetricOptions (metadata of the metric).
    • asyncCounter

      @ThingworxExtensionApiMethod(since={9,7,0}) public static IAsyncCounter asyncCounter(String name)


      Gets the instance of the AsyncCounter metric. This method verifies that the requested metrics is an external metrics and throws a ValidationException exception if it's not.
      Parameters:
      name - of the metric being requested.
    • asyncCounter

      @ThingworxExtensionApiMethod(since={9,7,0}) public static IAsyncCounter asyncCounter(String name, Supplier<MetricRecord> callBack)


      Gets the instance of asynccounter metric if present or Creates the instance if not present. This method verifies that the requested metrics is an external metrics and throws a ValidationException exception if it's not.
      Parameters:
      name - of the metric being requested.
      callBack - supplier a MetricRecord that is used to manufacture a AsyncCounter.
    • asyncCounter

      @ThingworxExtensionApiMethod(since={9,7,0}) public static IAsyncCounter asyncCounter(String name, Supplier<MetricRecord> callBack, MetricOptions options)


      Gets the instance of asynccounter metric if present or Creates the instance if not present. This method verifies that the requested metrics is an external metrics and throws a ValidationException exception if it's not
      Parameters:
      name - of the metric being requested.
      callBack - supplier a MetricRecord that is used to manufacture a AsyncCounter.
      options - instance of MetricOptions (metadata of the metric).
    • explicitBucketHistogram

      @ThingworxExtensionApiMethod(since={9,7,0}) public static IHistogram explicitBucketHistogram(String name)


      Gets the instance of the histogram metric. This method verifies that the requested metrics is an external metrics and throws a ValidationException exception if it's not.
      Parameters:
      name - of the metric being requested.
    • explicitBucketHistogram

      @ThingworxExtensionApiMethod(since={9,7,0}) public static IHistogram explicitBucketHistogram(String name, List<Double> bucketBounderies)


      Gets the instance of histogram metric if present or Creates the instance if not present. This method verifies that the requested metrics is an external metrics and throws a runtime exception if it's not.
      Parameters:
      name - of the metric being requested.
      bucketBounderies - Set the explicit bucket buckets boundaries advice.
    • explicitBucketHistogram

      @ThingworxExtensionApiMethod(since={9,7,0}) public static IHistogram explicitBucketHistogram(String name, List<Double> bucketBounderies, MetricOptions options)


      Gets the instance of histogram metric if present or Creates the instance if not present. This method verifies that the requested metrics is an external metrics and throws a ValidationException exception if it's not.
      Parameters:
      name - of the metric being requested.
      bucketBounderies - set the explicit bucket buckets boundaries advice.
      options - instance of MetricOptions (metadata of the metric).