io.vertx.ext.dropwizard

## Interface MetricsService

-     public interface MetricsService

  The metrics service mainly allows to return a snapshot of measured objects.
  Author:
    Nick Scavelli

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static MetricsService` | `create(Vertx vertx)` Creates a metric service for a given `Vertx` instance.
    `String` | `getBaseName(Measured measured)`
    `JsonObject` | `getMetricsSnapshot(Measured measured)` Will return the metrics that correspond with the `measured` object, null if no metrics is available. Note: in the case of scaled servers, the JsonObject returns an aggregation of the metrics as the dropwizard backend reports to a single server.
    `JsonObject` | `getMetricsSnapshot(String baseName)` Will return the metrics that begins with the `baseName`, null if no metrics is available. Note: in the case of scaled servers, the JsonObject returns an aggregation of the metrics as the dropwizard backend reports to a single server.
    `Set<String>` | `metricsNames()`

- - ### Method Detail

    - #### create

          static MetricsService create(Vertx vertx)

      Creates a metric service for a given `Vertx` instance.
      Parameters:
        `vertx` - the vertx instance
      Returns:
        the metrics service

    - #### getBaseName

          String getBaseName(Measured measured)

      Parameters:
        `measured` - the measure object
      Returns:
        the base name of the measured object

    - #### metricsNames

          Set<String> metricsNames()

      Returns:
        the known metrics names by this service

    - #### getMetricsSnapshot

          JsonObject getMetricsSnapshot(Measured measured)

      Will return the metrics that correspond with the `measured` object, null if no metrics is available.

      Note: in the case of scaled servers, the JsonObject returns an aggregation of the metrics as the dropwizard backend reports to a single server.
      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 the `baseName`, null if no metrics is available.

      Note: in the case of scaled servers, the JsonObject returns an aggregation of the metrics as the dropwizard backend reports to a single server.
      Returns:
        the map of metrics where the key is the name of the metric and the value is the json data representing that metric

Copyright © 2024 Eclipse. All rights reserved.