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
import org.eclipse.microprofile.metrics.annotation.Metered;
import org.eclipse.microprofile.metrics.annotation.Timed;
import javax.enterprise.context.ApplicationScoped;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@ApplicationScoped
@Path("ping")
public class PingResource {
@GET
@Metered
@Timed
public String ping() {
return "Hello World";
}
}
Context (Optional)
What I wanted to accomplish is to measure different aspects of a method execution - thus I've placed two types of metrics-annotations on top of a REST-Resource to get
it's execution time
the number of calls during app-runtim
Environment
Payara Version: 5.182, 4.181
Edition: Micro
JDK Version: 8 u152 - OpenJDK
Operating System: Linux / Mac
Database: no DB involved
The text was updated successfully, but these errors were encountered:
Description
Annotating a managed bean with more than one metrics annotation (i.e.
@Metered
and@Timed
) causes aClassCastException
.Expected Outcome
My expectation was to have both types registered - one metrics-measurement for each annotation.
Current Outcome
Well, when calling the annotated bean this leads to a
ClassCastException
.Steps to reproduce (Only for bug reports)
Take the attached archive - unpack it - build and start it using:
After the app was started, hit the defined endpoint:
Samples
Context (Optional)
What I wanted to accomplish is to measure different aspects of a method execution - thus I've placed two types of metrics-annotations on top of a REST-Resource to get
Environment
The text was updated successfully, but these errors were encountered: