Struts 2 Monitoring

Apache Struts 2 is an open source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model–view–controller (MVC) architecture. The CA APM Struts 2 monitoring extension instruments Struts 2 applications and reports metrics for Struts 2 actions under Struts|Struts2|Apps|{appName}|action|{action}.
apmdevops106
Apache Struts 2 is an open source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model–view–controller (MVC) architecture. The CA APM Struts 2 monitoring extension instruments Struts 2 applications and reports metrics for Struts 2 actions under
Struts|Struts2|Apps|{appName}|action|{action}
.
The Struts 2 monitoring extension comes bundled with CA Application Performance Management in the form of two artifacts:
  • Struts2Monitoring.jar
    Consists of the tracer, the name-formatter, and the clamp property configuration classes for this feature.
  • struts.pbd
    Consists of the ProbeBuilder directives for the tracer mappings. This is an already existing artifact which earlier consisted of ProbeBuilder directives for Struts1.
In the Map view, Struts 2 applications are represented by dedicated Struts 2 nodes. The nodes provide an additional layer of visibility in the graph by linking the frontend to the backend components. Each Struts 2 node has an attribute called
Struts2ActionName
, which can help in generating custom filtering or perspective for Struts 2 components of the application in view:
wikiDoc_ATC2.png
Struts 2 Monitoring Metrics
For any given Strut 2 application, the following BlamePoint metrics are reported:
  • Average Response Time (ms)
    The weighted average response time, in milliseconds, for all operations under this node, during the most recent interval
  • Concurrent Invocations
    The total number of requests for all operations under this node that were completed, during the most recent interval
  • Errors Per Interval
    The total number of errors for all operations under this node that occurred, during the most recent interval
  • Responses Per Interval
    Total responses per interval of all operations under this node, during the most recent interval
  • Stall Count
    The total number of stalled transactions for all operations under this node, during the most recent interval
Struts 2 Metric Clamp
To avoid possible metric explosion caused by a high number of Strut 2 actions triggered, a clamp has been put on the total number of actions to be generated in metrics for a given application. The default value is 20. Once the clamp is reached, all new actions are reported under the Default node.
: When the clamp size is set to a certain value and then reduced, metrics for any older, unclamped actions continue to be reported under the respective action names. Only new actions appear under the Default node.
The property is defined in the
IntroscopeAgent.profile
file as follows:
#introscope.agent.struts2.action.clamp=20
By default, the property is commented out. The property is hot, that is, it does not require an agent restart for changes to take effect.