Annotation Interface Timed


Annotated methods are instrumented using a Timer or a LongTaskTimer (longTask flag).

If the instrumented method completes exceptionally, the exception will be recorded in a separate tag. When the annotated method returns a CompletionStage or any of its subclasses, the Timer/LongTaskTimer will be stopped only when the CompletionStage is completed.

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Description of the Timer.
    List of key-value pair arguments to supply the Timer as extra tags.
    boolean
    Whether to enable recording of a percentile histogram for the Timer.
    boolean
    Flag of whether the Timer should be a LongTaskTimer.
    double[]
    List of percentiles to calculate client-side for the Timer.
    Name of the Timer metric.
  • Element Details

    • value

      String value
      Name of the Timer metric.
      Returns:
      name of the Timer metric
      Default:
      ""
    • extraTags

      String[] extraTags
      List of key-value pair arguments to supply the Timer as extra tags.
      Returns:
      key-value pair of tags
      See Also:
      Default:
      {}
    • longTask

      boolean longTask
      Flag of whether the Timer should be a LongTaskTimer.
      Returns:
      whether the timer is a LongTaskTimer
      Default:
      false
    • percentiles

      double[] percentiles
      List of percentiles to calculate client-side for the Timer. For example, the 95th percentile should be passed as 0.95.
      Returns:
      percentiles to calculate
      See Also:
      Default:
      {}
    • histogram

      boolean histogram
      Whether to enable recording of a percentile histogram for the Timer.
      Returns:
      whether percentile histogram is enabled
      See Also:
      Default:
      false
    • description

      String description
      Description of the Timer.
      Returns:
      meter description
      See Also:
      Default:
      ""