Initializing the Trace

Set the trace level and start the trace. The SAP Mobile Server administrator sets the trace level from SAP Control Center.

Set the passport trace level to one of the following values.
Trace Level Description
0 (NONE) 0 (NONE) Do not use. Not Supported. (Specific to trace analysis on the client. No traces are triggered on the server.)
1 (LOW) Corresponds to response time- distribution analysis. This helps to analyse the time taken on each server component.
2 (MEDIUM) Corresponds to performance analysis. Performance traces are triggered on the server side. Example: Introscope Transaction Trace, ABAP Trace, SQL Traces and so on.
3 (HIGH) Corresponds to functional analysis.
...buttonClickEvent()
{
  E2ETraceLevel level = null;
    If(val == 0)
      level = E2EtraceLevel.NONE;
    else if(val == 1)
      level = E2EtraceLevel.LOW;
...		
//Get an instance of the E2E trace handler 
E2ETraceService e2eTraceService = E2ETraceServiceImpl.getInstace();
//Set the trace level to the E2ETraceService instance
e2eTraceService.setTraceLevel(level); 
//Call the ‘startTrace’ method of the E2E trace service
...
e2eTraceService.startTrace ();
}

When you call the startTrace() method, the E2ETraceService initializes the trace and sets appropriate flags to indicate the trace has started. The method may perform other tasks as required by SAP's BTX API, such as getting a handle to the BTX writer from the BTX API.