Annotation Type Counted


  • @Inherited
    @Target(METHOD)
    @Retention(RUNTIME)
    public @interface Counted
    Annotated methods would expose a few counter metrics about their execution status. By default, both failed and successful attempts would be reported. Switching the recordFailuresOnly() to true would instruct the corresponding aspect to only record the failed attempts.
    Since:
    1.2.0
    See Also:
    CountedAspect
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String description
      An optional description for what the underlying counter is going to record.
      boolean recordFailuresOnly
      By default, both failed and successful attempts are recorded.
      java.lang.String value
      Represents the metric name for the to-be-recorded counters.
    • Element Detail

      • value

        java.lang.String value
        Represents the metric name for the to-be-recorded counters.
        Returns:
        The metric name.
        Default:
        "method.counted"
      • recordFailuresOnly

        boolean recordFailuresOnly
        By default, both failed and successful attempts are recorded. Switch it to true in order to only record failed attempts.
        Returns:
        Whether to only report failures.
        Default:
        false
      • description

        java.lang.String description
        An optional description for what the underlying counter is going to record.
        Returns:
        The counter description.
        Default:
        ""