Skip to content

Spec and TCK disagree on naming for metrics derived from annotations on superclasses #801

@tjquinno

Description

@tjquinno

In the spec, the annotated naming conventions section in the second table (for annotations on a class) states that the metric name uses information (the package or canonical class name) of the declaring class, meaning the class which declares the method.

The TCK includes AbstractTimedBean with a class-level @Timed annotation and a timedMethod method. ConcreteExtendedTimedBean extends AbstractTimedBean and adds anotherTimedMethod.

The TCK's ConcreteExtendedTimedBeanTest#callTimedMethodOnce test method invokes timedMethod and makes sure the timer's count changes by 1. But interestingly to look up the timer to check the timer's count that test uses the subclass name. From the spec would we expect the test to look up the timer for the timedMethod method using the superclass name which is the declaring class of the method being invoked?

Existing implementations of the spec pass the TCK but they and the TCK seem in conflict with the spec here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions