anchor.diff:  All annotations (Except `RegistryType`) have the following fields that correspond to the metadata fields described
   in <<meta-data-def>>.
   
  -`String name`::  the name of the metric. If not explicitly given it is determined from the annotated object and the
  +`String name`:: Optional. Sets the name of the metric. If not explicitly given it is determined from the annotated object and the
   fully qualified name of the surrounding class, unless `absolute` is true.
  -`boolean absolute`:: If `true` use the given name as an absolute name. If `false`, use the given name relative to
  -the annotated class
  -`String displayName`:: Optionally provide a human readable display name for metadata.
  -`String description`:: Optionally provide a description of the metric.
  -`MetricUnit unit:: Unit of the metric
  -`String[] tags`:: Array of Strings in the `<key>=<value>` format to supply special tags to a metric.
  +`boolean absolute`:: If `true` use the given name as an absolute name of the metric. If `false`, use the given name relative to
  +the annotated class. Default value is `false`.
  +`String displayName`:: Optional. A human readable display name for metadata.
  +`String description`:: Optional. A description of the metric.
  +`MetricUnit unit`:: Unit of the metric
  +`String[] tags`:: Optional. Array of Strings in the `<key>=<value>` format to supply special tags to a metric.
   
   NOTE:: Implementors are encouraged to issue warnings in the server log if metadata is missing. While this is
   less important for description and displayName, it is very important for Units.
   
  -
  +[[annotated-naming-convention]]
  +==== Annotated Naming Convention
  +Annotated metrics are registered into the _application_ `MetricRegistry` with the name based on the annotation's `name` and `absolute` fields.
  +
  +.Example of annotated metric names
  +[source, java]
  +----
  +package com.example;
  +public class Colors {
  +
  +  @Inject
  +  @Metric
  +  Counter redCount;
  +
  +  @Inject
  +  @Metric(name="blue")
  +  Counter blueCount;
  +
  +  @Inject
  +  @Metric(absolute=true)
  +  Counter greenCount;
  +
  +  @Inject
  +  @Metric(name="purple", absolute=true)
  +  Counter purpleCount;
  +}
  +----
  +The above bean would produce the following entries in the `MetricRegistry`
  +----
  +com.example.redCount
  +com.example.blue
  +greenCount
  +purple
  +----
  +
  +
  +==== @Counted
  +An annotation for marking a method, constructor, or type as a counter.
  +
  +The implementation must support the following annotation targets:
  +
  +  * `CONSTRUCTOR`
  +  * `METHOD`
  +  * `TYPE`
  +
  +In addition to the metadata fields, `@Counted` has the following field:
  +
  +`monotonic`:: If `false` (default), the counter is decremented when the annotated method returns, counting current invocations of the annotated method.
  +If `true`, the counter increases monotonically, counting total invocations of the annotated method.
  +
  +
  +The following lists the behavior for each annotation target.
  +
  +===== CONSTRUCTOR
  +
  +When a constructor is annotated, the implementation must register a counter for the constructor using the <<annotated-naming-convention>>. The counter is incremented and/or decremented according to the `monotonic` field when the constructor is invoked.
  +
  +.Example of an annotated constructor
  +[source, java]
  +----
  +@Counted
  +public CounterBean() {
  +}
  +----
  +
  +===== METHOD
  +
  +When a method is annotated, the implementation must register a counter for the method using the <<annotated-naming-convention>>. The counter is incremented and/or decremented according to the `monotonic` field when the method is invoked.
  +
  +.Example of an annotated method
  +[source, java]
  +----
  +@Counted
  +public void run() {
  +}
  +----
  +
  +===== TYPE
  +When a type/class is annotated, the implementation must register a counter for each of the constructor and methods using the <<annotated-naming-convention>>. The counters are incremented and/or decremented according to the `monotonic` field when the corresponding constructor/method is invoked.
  +
  +.Example of an annotated type/class
  +[source, java]
  +----
  +@Counted
  +public class CounterBean {
  +
  +  public void countMethod1() {}
  +  public void countMethod2() {}
  +
  +}
  +----
  +
  +==== @Gauge
  +An annotation for marking a method of field as a gauge.
  +
  +The implementation must support the following annotation targets:
  +
  +  * `FIELD`
  +  * `METHOD`
  +
  +
  +The following lists the behavior for each annotation target.
  +
  +===== FIELD
  +
  +When a field is annotated, the implementation must register a gauge for the field using the <<annotated-naming-convention>>. The gauge value and type is equal to the annotated field value and type.
  +
  +.Example of an annotated field
  +[source, java]
  +----
  +@Gauge
  +long value;
  +----
  +
  +===== METHOD
  +
  +When a method is annotated, the implementation must register a gauge for the method using the <<annotated-naming-convention>>. The gauge value and type is equal to the annotated method return value and type.
  +
  +.Example of an annotated method
  +[source, java]
  +----
  +@Gauge
  +public long getValue() {
  +  return value;
  +}
  +----
  +
  +
  +==== @Metered
  +An annotation for marking a constructor or method as metered. The meter counts the invocations
  +of the constructor or method.
  +
  +The implementation must support the following annotation targets:
  +
  +  * `CONSTRUCTOR`
  +  * `METHOD`
  +  * `TYPE`
  +
  +The following lists the behavior for each annotation target.
  +
  +===== CONSTRUCTOR
  +
  +When a constructor is annotated, the implementation must register a meter for the constructor using the <<annotated-naming-convention>>. The meter is marked each time the constructor is invoked.
  +
  +.Example of an annotated constructor
  +[source, java]
  +----
  +@Metered
  +public MeteredBean() {
  +}
  +----
  +
  +===== METHOD
  +
  +When a method is annotated, the implementation must register a meter for the method using the <<annotated-naming-convention>>. The meter is marked each time the method is invoked.
  +
  +.Example of an annotated method
  +[source, java]
  +----
  +@Metered
  +public void run() {
  +}
  +----
  +
  +===== TYPE
  +When a type/class is annotated, the implementation must register a meter for each of the constructor and methods using the <<annotated-naming-convention>>. The meters are marked each time the corresponding constructor/method is invoked.
  +
  +.Example of an annotated type/class
  +[source, java]
  +----
  +@Metered
  +public class MeteredBean {
  +
  +  public void meteredMethod1() {}
  +  public void meteredMethod2() {}
  +
  +}
  +----
  +
  +==== @Timed
  +An annotation for marking a constructor or method of an annotated object as timed.
  +The metric of type Timer records the time it took to invoke the annotated object.
  +
  +The implementation must support the following annotation targets:
  +
  +  * `CONSTRUCTOR`
  +  * `METHOD`
  +  * `TYPE`
  +
  +The following lists the behavior for each annotation target.
  +
  +===== CONSTRUCTOR
  +
  +When a constructor is annotated, the implementation must register a timer for the constructor using the <<annotated-naming-convention>>. Each time the constructor is invoked, the execution will be timed.
  +
  +.Example of an annotated constructor
  +[source, java]
  +----
  +@Timed
  +public TimedBean() {
  +}
  +----
  +
  +===== METHOD
  +
  +When a method is annotated, the implementation must register a timer for the method using the <<annotated-naming-convention>>. Each time the method is invoked, the execution will be timed.
  +
  +.Example of an annotated method
  +[source, java]
  +----
  +@Timed
  +public void run() {
  +}
  +----
  +
  +===== TYPE
  +When a type/class is annotated, the implementation must register a timer for each of the constructor and methods using the <<annotated-naming-convention>>. Each time a constructor/method is invoked, the execution will be timed with the corresponding timer.
  +
  +.Example of an annotated type/class
  +[source, java]
  +----
  +@Timed
  +public class TimedBean {
  +
  +  public void timedMethod1() {}
  +  public void timedMethod2() {}
  +
  +}
  +----
  +
  +==== @Metric
  +An annotation requesting that a metric should be injected. This annotation can be used on the fields of type `Meter`, `Timer`, `Counter`, and `Histogram`.
  +
  +The implementation must support the following annotation targets:
  +
  +  * `FIELD`
  +  * `METHOD`
  +  * `PARAMETER`
  +
  +The following lists the behavior for each annotation target.
  +
  +===== FIELD
  +
  +When a field of type Meter, Timer, Counter or Histogram is annotated, the implementation must provide the registered metric to the application. The implementation must register the metric for the field using the <<annotated-naming-convention>> if it does not already exist, otherwise it will retrieve the metric from the registry and produce it to the application.
  +
  +.Example of an annotated field
  +[source, java]
  +----
  +@Inject
  +@Metric("applicationCount")
  +Counter count;
  +----
  +
  +===== METHOD
  +
  +<TO DO>
  +
  +===== PARAMETER
  +<TO DO>
  +
  +
  +[[metric-registry]]
   === Metric Registry
  +
  +The `MetricRegistry` is used to maintain a collection of metrics along with their metadata.
  +There is one shared singleton of the `MetricRegistry` per scope (_application_, _base_, and _vendor_).
  +When metrics are registered using annotations, the metrics must be registered to the _application_ `MetricRegistry`.
  +
  +When injected, the `@RegistryType` is used as a qualifier to selectively inject either the `APPLICATION`, `BASE`, or `VENDOR` registry.
  +If no qualifier is used, the default `MetricRegistry` returned is the `APPLICATION` registry.
  +
  +==== @RegistryType
  +The `@RegistryType` can be used to retrieve the `MetricRegistry` for a specific scope.
  +The implementation must produce the corresponding `MetricRegistry` specified by the `RegistryType`.
  +
  +NOTE:: The implementor can optionally provide a _read_only_ copy of the `MetricRegistry` for _base_ and _vendor_ scopes.
  +
  +==== Application Metric Registry
  +The implementation must produce the _application_ `MetricRegistry` when no `RegistryType` is provided (`@Default`) or when the `RegistryType` is `APPLICATION`.
  +
  +.Example of the application injecting the application registry
  +[source, java]
  +----
  +@Inject
  +MetricRegistry metricRegistry;
  +----
  +
  +.is equivalent to
  +[source, java]
  +----
  +@Inject
  +@RegistryType(type=MetricRegistry.Type.APPLICATION)
  +MetricRegistry metricRegistry;
  +----
  +
  +==== Base Metric Registry
  +The implementation must produce the _base_ `MetricRegistry` when the `RegistryType` is `BASE`. The _base_ `MetricRegistry` must contain the required metrics specified in <<required-metrics>>.
  +
  +.Example of the application injecting the base registry
  +[source, java]
  +----
  +@Inject
  +@RegistryType(type=MetricRegistry.Type.BASE)
  +MetricRegistry baseRegistry;
  +----
  +
  +==== Vendor Metric Registry
  +The implementation must produce the _vendor_ `MetricRegistry` when the `RegistryType` is `VENDOR`. The _vendor_ `MetricRegistry` must contain any vendor specific metrics.
  +
  +.Example of the application injecting the vendor registry
  +[source, java]
  +----
  +@Inject
  +@RegistryType(type=MetricRegistry.Type.VENDOR)
  +MetricRegistry vendorRegistry;
  +----
   
   
   === Java API Classes
  
positive.code: === Responsibility of the Microprofile Metrics implementation
  
  * The implementation must scan the application at deploy time for <<api-annotations>> and register the
  Metrics along with their metadata in the MetricsRegistry.
  * The implementation must watch the annotated objects and update its internal data structures when the values of the
  annotated objects change.
  * The implementation must expose the values of the objects registered in the MetricsRegistry via REST-API as described
  
negative.code: [[app-metrics-api]]
  == Application Metrics Programming Model
  
  Microprofile Metrics provides a way to register Application-specific metrics to allow applications to expose metrics in
  the _application_ scope (see <<_scopes>> for the description of scopes).
  
  Metrics and their metadata are added to a _Metric Registry_ upon definition and can afterwards have their values set
  