|
Abstract: Trace the processing of a macro. Trace records are written to a file.
What is it?
Tracing allows one to monitor Net.Data as it is processing a macro. As Net.Data executes an HTML block, it will write out trace information that includes the functions being called, parameters being passed (both input and output), and errors that may be encountered.
Why would I want to use it?
Tracing is mainly to be used for service calls, but can be used by customers when debugging their applications.
How do I use it?
To enable tracing, you need to set configuration variables to specify where the trace file is stored and what level of trace data Net.Data needs to capture.
Setting the Trace Log Directory
The name of the trace log is NETDATA.TRACE. Use the DTW_TRACE_LOG_DIR configuration variable to specify the directory in which the trace file is stored.
Syntax:
DTW_TRACE_LOG_DIR [=] full_directory_path
Example:
DTW_TRACE_LOG_DIR /netdata/trace
Setting the Level of Trace Logging
Determine the level of tracing that Net.Data logs by setting the value of the configuration variable, DTW_TRACE_LOG_LEVEL.
Syntax:
DTW_TRACE_LOG_LEVEL [=] OFF|APPLICATION|SERVICE
Where:
- OFF
- Specifies that no trace data is captured in the trace log. This is the default value.
- APPLICATION
- Net.Data writes application-level trace messages to the trace log.
- SERVICE
- Net.Data writes all trace messages to the trace log. This level of trace should only be used when asked to do so by IBM. The information in a SERVICE trace will not be helpful in debugging your own applications and will make reading the trace more difficult than necessary. You may be asked to set the level to SERVICE to help resolve product service questions.
Example:
DTW_TRACE_LOG_LEVEL SERVICE
Setting Whether Trace Records Should Be Merged
By default, trace records from the processing of a macro running in one thread are interleaved with trace records from the processing of a macro running in another thread. This is fine if you have total control of what URL is to be invoked against your Web site (as is the case in a development environment).
However, in a high traffic environment, having the trace records of the processing of other macros interleaved with trace records that you may be interested in makes it hard to follow the flow of the processing of a macro. You can indicate to Net.Data whether trace records should or should not be merged into one file by setting the value of the configuration variable, DTW_TRACE_MERGE_RECORDS.
Syntax:
DTW_TRACE_MERGE_RECORDS [=] YES|NO
Where:
- YES
- Specifies that trace records are written to one file, NETDATA.TRACE. This is the default value.
- NO
- Specifies that trace records are written to thread-specific file. The file name is NETDATA.TRACE.xxxxx, where xxxxx is the process/thread identifier.
Example:
DTW_TRACE_MERGE_RECORDS NO
Availability
V4R4 and subsequent releases. Ensure you have the latest Net.Data PTF.
|