How to get web service performance metrics
These metrics include Request/Response time, number of calls, and so on.
The CXF management module also provides a feature (the MetricsFeature) which provides aggregate statistics for services running in the CXF Bus. It is not enabled by default to avoid unnecessary runtime overhead during web service call processing, but it needs to be added as JAX-WS feature.
<jaxws:endpoint id="my-service" implementor="ex.example.MyServiceImpl" address="/myService">
<jaxws:features>
<bean class="org.apache.cxf.metrics.MetricsFeature"/>
</jaxws:features>
</jaxws:endpoint>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-features-metrics</artifactId>
<version>${cxf.version}</version>
</dependency>
In WAR deployments, this additional dependency must also be declared:
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrix-core</artifactId>
<version>${dropwizard.metrics.version}</version>
</dependency>
The MetricsFeature collects the following metrics: invocations, checked application faults, unchecked application faults, runtime faults, logical runtime faults, mean handling time, max handling time, and min handling time. Note a SOAP call will need to occur against the web service before you will see the MBean within your JMX monitoring software.