Saturday 14 September 2019

Apache Sling's Request Processing Analyzer

AEM provides a console to check recent requests, by default only 20 requests can be seen which is a troublesome in production environment as we get millions of requests. We can update the default value, but it will be difficult when we get some millions of requests in production.

Recent requests in AEM:



Apache Sling provides a tool to analyze all the recent requests using "Request Processing Analyzer". To install this tool download the code from GitHub and run mvn clean install. Once build is success, we can see jar files in target folder. Install org.apache.sling.reqanalyzer-0.0.1-SNAPSHOT.jar to AEM instance.

A log file requesttracker.txt is created in ${sling.home}/logs folder. To analyze this log file we need to run below command, which opens a graphical window
java -jar org.apache.sling.reqanalyzer-0.0.1-SNAPSHOT.jar D:\CQ5\CQ5\AEM6.4\crx-quickstart\logs\requesttracker.txt

We can see below info in the window
  • Start time stamp in milliseconds
  • Request processing time in milliseconds
  • Request method
  • Request URL
  • Response content type
  • Response status
To analyze a specific request, click on it then we can see new window with more info.

We can see below info
  • Timestamp - shows the timestamp of each step that the request
  • Delta - time between each step
  • Message - shows info about which step is processed

No comments :

Post a Comment