Package io.vertx.micrometer
Interface MetricsService
-
public interface MetricsService
The metrics service mainly allows to return a snapshot of measured objects.
This service is derived and adapted fromMetricsService
in the vertx-dropwizard-metrics module.- Author:
- Nick Scavelli, Joel Takvorian
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static MetricsService
create(Measured measured)
Creates a metric service for a givenMeasured
object.String
getBaseName()
JsonObject
getMetricsSnapshot()
Will return the metrics that correspond with themeasured
object, null if no metrics is available.JsonObject
getMetricsSnapshot(String baseName)
Will return the metrics that begins with thebaseName
, null if no metrics is available.Set<String>
metricsNames()
-
-
-
Method Detail
-
create
static MetricsService create(Measured measured)
Creates a metric service for a givenMeasured
object.- Parameters:
measured
- the measured object- Returns:
- the metrics service
-
getBaseName
String getBaseName()
- Returns:
- the base name of the measured object
-
getMetricsSnapshot
JsonObject getMetricsSnapshot()
Will return the metrics that correspond with themeasured
object, null if no metrics is available.- Returns:
- the map of metrics where the key is the name of the metric (excluding the base name unless for the Vert.x object) and the value is the json data representing that metric
-
getMetricsSnapshot
JsonObject getMetricsSnapshot(String baseName)
Will return the metrics that begins with thebaseName
, null if no metrics is available.- Returns:
- the map of metrics where the key is the name of the metric and the value is the json data representing that metric
-
-