Arnica Platform trace levels - useful numbers

September 14, 2018 by Igor Lozhkin
Tracing in Arnica Platform applications helps to find out the source of a problem.  Unlike trace output provided by code profilers, which includes tons of super technical bit-level diagnostics, Arnica tracing generates the right level diagnostics which present facts related to both business and technical aspects of request processing  to understand what really went wrong, e.g.:

- specifics of slow queries 
- low space for cache storage 
- code blocks with slow calculation
- reasons for failed authentication
- details of failed validations
- details of unexpected response from server-to-server web API call
- missed configuration properties
- cases of "file not found"
- query resulted in too many records or no records
- etc.

At the Arnica Platform core, the trace events were injected into many parts of its execution pipeline. When a trace flag is enabled at run-time, the platform code enables trace output based on the requested trace level, specified by the user. The higher the trace level number, the more details are included in the trace output. 

For example, trace flag with level 1000 only captures the start of the request. Trace level 1001 captures the start and the end of the request with time taken to process the request and generate the output. 

Higher trace levels include more detail in trace output, but also have their own performance penalty. For example, with trace level 1100 and 1300, the performance is expected to drop by the factor of 2-3 times. With The trace level 3000, trace output will include so much detail that the overhead of processing might slowdown by he factor of 5-10 times.

Table below lists trace levels and the type of events included in trace output. 

For typical troubleshooting, trace levels of 1100...1300 are the most adequate for diagnosing a problem.

Trace Level

Information included in the trace log file

>= 1000

Object instance creation data.

>= 1001

All of the above, plus object instance release data and total instance time.

>= 1002...1004

All of the above, plus high-level application-specific tracing.  Trace level 1002 specifies the subject of object instance.

>= 1005

All of the above, plus more detailed object initiation events.

>= 1006...1008

All of the above, plus more detailed application-specific tracing.

>= 1010

All of the above, plus events from the aaSQLSession class.

>= 1020

All of the above, plus events from the aaWeb class.

>= 1030

All of the above, plus events from the aaHTML class.

>= 1040

All of the above, plus events from the aaXML/JSON class.

>= 1100

All of the above, plus events from the aaSystem class.

>= 1200

All of the above, plus detailed application-specific events, which usually include significant amount of data from custom applications.

>= 1300

All of the above, plus detailed framework-specific events, which usually include significant amount of data.

>= 1330

All of the above, plus local cursor queries.

>= 1350 and <= 1399

All of the above, plus detailed application-specific events, which usually include significant amount of data into the trace.

>= 1400

All of the above, plus more detailed framework-specific events, with large amount of data and call stack events

>= 1500

All of the above, plus cursor content created by methods of the aaSQLSession class, when this cursor contains only one record

>= 2000 and <= 2999

All of the above plus detailed application-specific events with the highest level of detail and large amount of data.

>= 3000 and <= 3999

All of the above plus detailed framework-specific events with the highest level of detail and large amount of data.

3010

All of the above plus cursor content created by methods of the aaSQLSession class.