package com.github.dikhan.dropwizard.headermetric.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * An annotation for marking a method of an annotated object as TraceConfiguredHeaders.
 * <p/>
 * Given a method like this:
 * <pre><code>
 *     {@literal @}TraceConfiguredHeaders(name = "fancyName")
 *     public String fancyName(String name) {
 *         return "Sir Captain " + name;
 *     }
 * </code></pre>
 * <p/>
 * A counter for the defining class with the name {@code fancyName} will be created for each of the
 * headers configured in the yml file. And each time the method {@code #fancyName(String)} with such annotation in
 * place is invoked, the method's execution will be counted should any of the headers in the request match the
 * configured headers on start up.
 *
 * For instance, let's assume the above example is end actual GET end-point also annotated with @TraceConfiguredHeaders
 * annotation. Additionally, on start-up we have configured the following header (x-custom-header: x-custom-header-value)
 * to be tracked.
 *
 * If we receive a request to the given end point containing the aforementioned header, the counter metric associated with
 * that endpoint/header/value will be increased and reported using DropWizard's configured reporters.
 *
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface TraceConfiguredHeaders {

    /**
     * @return The name of the end point where headers need to be tracked.
     */
    String name() default "";

}

@@ -226,16 +226,19 @@
 %0A/**%0A * 
+%3Cp%3E
 An annot
@@ -313,23 +313,19 @@
 Headers.
-%0A * %3Cp/
+%3C/p
 %3E%0A * Giv
@@ -355,16 +355,24 @@
  * %3Cpre%3E
+%0A *     
 %3Ccode%3E%0A 
@@ -534,16 +534,20 @@
 %7D%0A *
+    
  %3C/code%3E
 %3C/pr
@@ -542,16 +542,20 @@
  %3C/code%3E
+%0A * 
 %3C/pre%3E%0A 
@@ -558,17 +558,20 @@
 e%3E%0A * %3Cp
-/
+%3E%3C/p
 %3E%0A * A c

Fix issue with javadoc - self-closing element not allowed