# Class: MetricsService

## vertx-micrometer-metrics-js/metrics_service~ MetricsService

#### new MetricsService()

The metrics service mainly allows to return a snapshot of measured objects.

Source:
  - vertx-micrometer-metrics-js/metrics_service.js, line 29

### Methods

#### getBaseName() → {string}

Source:
  - vertx-micrometer-metrics-js/metrics_service.js, line 40

##### Returns:

the base name of the measured object

Type
  string

#### getMetricsSnapshot(baseName) → {Object}

Will return the metrics that begins with the `baseName`, null if no metrics is available.

##### Parameters:

Name | Type | Description
--- | --- | ---
`baseName` | string |

Source:
  - vertx-micrometer-metrics-js/metrics_service.js, line 67

##### Returns:

the map of metrics where the key is the name of the metric and the value is the json data representing that metric

Type
  Object

#### metricsNames() → {Array.<string>}

Source:
  - vertx-micrometer-metrics-js/metrics_service.js, line 53

##### Returns:

the known metrics names by this service

Type
  Array.<string>