October 1, 2020
Estimated Post Reading Time ~

Apache Sling's Request Processing Analyser

AEM provides a console to check recent requests, by default only 20 requests can be seen which is troublesome in the 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 analyse all the recent requests using "Request Processing Analyser". To install this tool download the code from GitHub and run mvn clean install. Once the build is successful, 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 analyse this log file we need to run the 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 the 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 analyse a specific request, click on it then we can see a new window with more info.


We can see the 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.