Host Trace

Administration PageApplication/ContractSyracuse/CollaborationClasstraceRecordsRepresentationtraceRecord

This function allows you to create technical trace files on request to send to Sage support.

This function provides:

The content of a record cannot be retrieved before the record is stopped.

Query facet for traces record

In this facet, you can find the list of trace records and their state. Note the following information:
* The name can be given manually (manual trace) or start with "Auto Record" followed by the date (automatic traces).
* Auto records are handled at system startup. At any given moment, several auto records can run simultaneously (one per node.js instance when the load balancer is in operation).
* The alterable flag is set when the user can modify the parameters of the trace. This is only possible on the node process on which the user is connected.
* The status can be running, error, or complete.

Auto record

A standard auto record is automatically started when a node.js process is started. But a specific record can be started to log specific events.

A rotation mechanism has been put in place to be able to launch a new auto record each new day.
Another rotation mechanism allows you to split records by size. In this way, you can be sure that a record will not become too large. A nodelocal.js configuration allows you to define these behaviors:

 exports.config = {...,traces: {maxSize: "5m",maxFiles: 3,}},

The maxSize property allows you to define the maximum size that can be applied to a record. The syntax allowed is k or *m or *g (kilo, mega or giga octets) where is a number.

The maxFiles property allows you to limit the number of files for a same record (same date and same PID). When the maximum size is reached, or when a stop action is called on an auto record, a new auto record is created and launched with the same name as the previous one, and the previous one is renamed by adding the suffix .1. For the next rotation, the .1 is renamed as .2, the previous running is .1 in the suffix and so on...

With the configuration given in example, you could have :

Auto_Record_2014-10-22_PID-10440: runningAuto_Record_2014-10-22_PID-10440.1: completedAuto_Record_2014-10-22_PID-10440.2: completed

But no 4th record is created because maxFiles is set to 3. So, on the next rotation, the .2 record is deleted.

Manual record

For specific needs (on bug investigation for example), you may need to create a manual record.
This kind of record is not related to a rotation mechanism like auto records.
However, it provides two more options :

Several types of events are traced and identified in the Configuration grid. For every type of event traced, it is possible to have different trace levels:
* Error only traces the errors found.
* Warning also traces the warning found.
* Info adds the information log to the previous events.
* Debug is the most verbose trace that returns a lot more information.

For every type of event (and sometimes for subcategories, depending on the type), a trace level can be given.
For example: at the X3 communication layer, the call of javascript functions from a 4GL process, the X3 client pool requests, the 'sadfsq' communication layer, the print server layer... can be traced at the different levels available.

The trace settings are used for each new auto record. Therefore, it is necessary to edit these settings to adjust auto records.

However, for manual records, these settings are only available as a default configuration. You can only customize it before starting the record.

Once the setup is complete and saved, it is possible to: Start, to Pause or to Stop a started trace, to Resume a paused trace, or to flush the current trace file and to start another one.

Storage and setup principles

All trace configurations are stored in the one instance of entity 'traceSetting'.

Each record configuration is synchronized at the server startup :

For an auto record, the nodelocal.js default values needs to be declared as follows:
exports.config = {...,traces: {levels: {// Example for tracers with submodulesorm: { // Object-relational mappingfactory: "info", // Syracuse entities managementx3: "debug", // X3 ERP entities managementmongodb: "error", // MongoDB interactions},// Example for tracers without submodulesearch: "debug", // Elastic search communication}},

How to create the records

The Traces grid lists all the files created for a trace session. As soon as the corresponding file is no longer active, it can be downloaded manually by clicking the corresponding icon.

A trace file is no longer active after stopping the trace or after a flush in order to start another trace file.

A Download all link is also available to download all the inactive files corresponding to the session.

The files download in a compressed format that need to be sent to Sage Support for analysis.