Debugging Series: Using Selective Tracing in Fusion Applications
By Richard Bingham-Oracle on Apr 08, 2013
From Release 5 onwards Oracle Fusion Applications comes with a new feature to help debug problems, known as Selective Tracing. This tool is actually part of Fusion Middleware and quite simply allows the administrator to generate detailed logs for every underlying activity spawned for one user, for a specific period of time.
The reason this option is especially helpful is that is extends standard Fusion Applications logging into a rich data source with content from all compliant technologies (i.e. most of middleware). As such if your users are running into problems that stem from the underlying technology components (such as ADF, ESS, Security, or Attachments) then a Selective Trace will provide additional end-to-end logs of their sessions actions.
Creating a Selective Trace
Selective Trace is available through Enterprise Manager, and only operates at the WebLogic Domain level, roughly equivalent to one Fusion Applications product family. As such the log includes all lines for all WebLogic servers in that domain and generated as a result of an action by a specified user. This is helpful since some activities can span servers, such as a page that submits an ESS job or starts a SOA composite process.
Figure1 – Menu for Selective Tracing
Selective Trace supports several options and whilst many are obvious a few may benefit from a little explanation.
- Option Name – usually left as Username, however also supports tracing one specific Java EE application, a Client (by IP or hostname), a SOA Composite, or a WebService.
- Level – equates to the standard Java logging levels.
- Duration – should be set as short as possible.
- ODL – specifies if it includes application log events, normally recommended.
- Apps Trace – provides an additional output based on the associated ADF log activity. This is recommended for all Fusion Applications UI issues. The options within this should be left as the defaults, and the result can be found on the filesystem, or inside an incident if created.
- Loggers – by default selects everything. This is useful if issues are poorly understood however some limitation to specific technology component loggers is recommended as is reduces the output size.
Figure 2 – Selective Trace options
Once submitted the tracing starts immediately and the end user can begin reproducing the issue. Enterprise Manager provides a screen where active traces can be viewed and disabled once complete. Below that is the Tracing History region showing all recently completed tracing jobs.
Figure 3 – The active and completed Selective Traces.
Each trace is essentially just a set of logs uniquely identified by a Trace ID value. The log lines created are written to their normal files, as selective tracing does not create any files itself. As such when you click one of the Trace ID’s it opens the standard Enterprise Manager log viewer page with the appropriate search filter applied.
As illustrated in Figure 4 below, the results span many log files and include not just Fusion J2EE Applications but logs from the different middleware technologies based on the loggers selected. The example shows security logs written as the user accessed the ItemDashboard page.
Figure 4 – One Java Platform Security (JPS) log line as part of the Selective Trace (ending in e93)
Whilst Selective Trace is simple to use, there are a few considerations that may help you get the most from this powerful logging tool.
- It will create a substantial amount of logs, since all code modules invoked as a result of this users actions will write logs. As such try to consider which areas are of real importance and focus on those only.
- Using the View Log Messages screen in Enterprise Manager to filter the results. Use the available log fields (columns) to remove some of the noise.
- Don’t set the logging period open for too long (it defaults to 30minutes which is rather long). Normally 5minutes is long enough for most testcases. If you are not reproducing the problem yourself, speak with the end user during the operation so that as soon as they complete the steps the tracing can be disabled.
- Consider creating an incident from the trace, using the button shown in Figure 3. This adds considerably more diagnostic information to the problem record, especially for issues related to the lower level technology components. Once created the incidents can be found on the filesystem or in Enterprise Manager Cloud Control within its Support Workbench feature.
The following documents provide more details on this feature and contain additionally linked documents for specific areas that may be of further interest.
From the Fusion Applications Developer Relations Blog:
From the Product Documentation: