anchor.diff:  * camelCase is translated to camel_case
   * Double underscore is translated to single underscore
   * Colon-underscore (`:_`) is translated to single colon
  -* The unit is appended to the name, separated by underscore. See also below.
  -
  -
  -===== Handling of tags
  +* The unit is appended to the name, separated by underscore. See <<prometheus_units>>
  +
  +
  +==== Handling of tags
   
   Metric tags are appended to the metric name in curly braces `{` and `}` and are separated by comma.
   Each tag is a key-value-pair in the format of `<key>="<value>"`.
   
  -===== Handling of units
  -
  -Units are appended as the base unit of the respective family. Metric values are scaled accordingly.
  +[[prometheus_units]]
  +==== Handling of units
  +
  +*Gauges and Histograms*
  +
  +The metric name and values for `Gauge` and `Histogram` are set according to the `unit` value in the Metadata.
  +
  +- If the Metadata is empty, `NONE`, or null. The metric name is used as is without appending the unit name and no scaling is applied.
  +- If the metric's metadata contains a known unit defined in <<metric_units>>, the Prometheus value should be scaled to the _base unit_ of the respective family. The name of the base unit is appended to the metric name delimited by underscores (`_`).
  +- If the `unit` is specified and is not defined in <<metric_units>>, the value is not scaled but the `unit` is still appended to the metric name delimited by underscores (`_`).
  +
   
   Unit families and their base units are described under https://prometheus.io/docs/practices/naming/#base-units[Prometheus metric names, Base units].
   
  
positive.code: ----
  <1> Metric names are turned from camel case into snake_case.
  <2> The description goes into the HELP line
  <3> Metric names gets the base unit of the family appended with `_` and defined labels. Values are scaled accordingly
  
  ===== Translation rules for metric names
  
  Prometheus text format does not allow for all characters and adds the base unit of a family to the name.
  
  
negative.code: an overall view if the same metric has different metadata.
  
  === Metric Registry
  The `MetricRegistry` stores the metrics and metadata information.
  There is one `MetricRegistry` instance for each of the scopes listed in <<scopes>>.
  
  Metrics can be added to or retrieved from the registry either using the <<annotations, Metrics Annotations>> or using the `MetricRegistry` object directly.
  
  [[rest-api]]
  === Exposing metrics via REST API
  
  Data is exposed via REST over HTTP under the `/metrics` base path in two different data formats for `GET` requests:
  
  * JSON format - used when the HTTP Accept header matches `application/json`
  * Prometheus text format - default response format when the HTTP Accept header does not match `application/json`
  
  Formats are detailed below.
  
  