April 26, 2020
Estimated Post Reading Time ~

Apache Sling's Request Processing Analyzer

AEM provides a console to check recent requests, by default only 20 requests can be seen which is troublesome in a 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 a success, we can see jar files in the 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 a 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


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.