Package com.thingworx.metrics.v2
Class MetricsV2
java.lang.Object
com.thingworx.metrics.v2.MetricsV2
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInitializes this instace with default values. -
Method Summary
Modifier and TypeMethodDescriptionstatic IAsyncCounterasyncCounter(String name) Gets the instance of the AsyncCounter metric.static IAsyncCounterasyncCounter(String name, Supplier<MetricRecord> callBack) Gets the instance of asynccounter metric if present or Creates the instance if not present.static IAsyncCounterasyncCounter(String name, Supplier<MetricRecord> callBack, MetricOptions options) Gets the instance of asynccounter metric if present or Creates the instance if not present.static IAsyncGaugeasyncGauge(String name) Gets the instance of the AsyncGauge metric.static IAsyncGaugeasyncGauge(String name, Supplier<MetricRecord> callBack, MetricOptions options) Gets the instance of asyncgauge metric if present or Creates the instance if not present.static ICounterGets the instance of the up counter metric.static ICountercounter(String name, MetricOptions options) Gets the instance of up counter metric if present or Creates the instance if not present.static IHistogramGets the instance of the histogram metric.static IHistogramexplicitBucketHistogram(String name, List<Double> bucketBounderies) Gets the instance of histogram metric if present or Creates the instance if not present.static IHistogramexplicitBucketHistogram(String name, List<Double> bucketBounderies, MetricOptions options) Gets the instance of histogram metric if present or Creates the instance if not present.static IGaugeGets the instance of the Gauge metric.static IGaugegauge(String name, MetricOptions options) Gets the instance of gauge metric if present or Creates the instance if not present.static ICounterupDownCounter(String name) Gets the instance of the upDown counter metric.static ICounterupDownCounter(String name, MetricOptions options) Gets the instance of upDown counter metric if present or Creates the instance if not present.
-
Field Details
-
EXT_INSTRUMENTATION_SCOPE_NAME
-
-
Constructor Details
-
MetricsV2
protected MetricsV2()Initializes this instace with default values.
-
-
Method Details
-
gauge
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
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
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
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
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).
-