You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public abstract class C {
@Gauge(name = "foo", unit = MetricUnits.NONE)
long metric () { return 0; }
}
When the Quarkus application starts, the GaugeAnnotationHandler complains about C uses a @Gauge annotation, but is not @ApplicationScoped, a @singleton, or a REST endpoint. This doesn't make sense because abstract class can never be instantiated and therefore never report any metrics. Only concrete subclasses can and there the check make sense.
Expected behavior
Abstract classes are not checked by the annotation handlers.
Actual behavior
Abstract classes are checked for annotations when it doesn't make sense.
How to Reproduce?
See description.
Output of uname -a or ver
Output of java -version
17.0.11
Quarkus version or git rev
Tested with 3.2.12.Final but the code hasn't change since then
Build tool (ie. output of mvnw --version or gradlew --version)
Maven 3.9.2
Additional information
No response
The text was updated successfully, but these errors were encountered:
Just a bug. I was trying to be clear about limitations using the MP Metrics Gauge annotation as it does not work the same in the Micrometer extension as it did with SmallRye Metrics.
Describe the bug
Consider the following abstract class:
When the Quarkus application starts, the GaugeAnnotationHandler complains about C uses a @Gauge annotation, but is not @ApplicationScoped, a @singleton, or a REST endpoint. This doesn't make sense because abstract class can never be instantiated and therefore never report any metrics. Only concrete subclasses can and there the check make sense.
Expected behavior
Abstract classes are not checked by the annotation handlers.
Actual behavior
Abstract classes are checked for annotations when it doesn't make sense.
How to Reproduce?
See description.
Output of
uname -a
orver
Output of
java -version
17.0.11
Quarkus version or git rev
Tested with 3.2.12.Final but the code hasn't change since then
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven 3.9.2
Additional information
No response
The text was updated successfully, but these errors were encountered: