FacesTrace - tracing your JSF applications

Markus Eisele
4
Ever wondered, where your JSF app spends it's evenings? FacesTrace aims to enhance the traceability of JavaServer Faces based applications. It collects several trace information and performance metrics and presents them on the
page being traced. It is related to but not dependent on PrimeFaces.
The main metrics and information covered are:

• JSF LifeCycle visualizer
• Performance Tracker
• Scoped Attributes
• Log4J appender
• FacesMessage Lister
• Component Tree visualizer

I tryed it with weblogic 11g and it works fine.
FacesTrace has a single jar called facestrace-{version}.jar, it has no dependency to any other PrimeFaces module and can be used seperately. The only other dependency you need is a recent commons-logging-{version}.jar.
FacesTrace setup is simply about having the facestrace jar in your classpath. No other configuration beside the *.jsf mapping needed. FacesTrace is both compatible with Facelets and JSP. In order to display the trace information, simply add trace=true request parameter to the page youʼre tracing.


http://localhost:7001/myapp/mypage.jsf?trace=true


Performance Tracker
The performance tracker keeps track of how long each jsf phase takes and displays the execution times.

Lifecycle Tracker
Visualizes the JSF Request Lifecycle and displays each phases's state in different color. Green means, the phase is executed with success. Red means, the phase caused an error. Gray indicates, that the phase was never executed.

Variables
Displays each key-value pair in different scopes like application, session, request, cookies,params and more.

Faces Messages
Displays FacesMessages added to the FaceContext for the request being processed.

Logs
FacesTrace has it's own appender, setting the log4j to use this appender will alow
FacesTrace to display the logs at the page

Component Tree
The component tree of the view, can be traversed using the dhtml tree view of the
FacesTrace.

Post a Comment

4Comments

  1. Hi,

    After installing the facestrace, where would I be able to see the trace info ?

    ReplyDelete
  2. If you add the request param to the page, scroll down to the bottom.
    That's all.
    Thanks,
    M

    ReplyDelete
  3. done that, like http://localhost:8080/wompower6/faces/home.xhtml?trace=true

    still nothing appears.

    ReplyDelete
  4. Maybe, you could get your answer in the primefaces forums: http://primefaces.prime.com.tr/forum/

    ReplyDelete
Post a Comment