Initializing the Trace

Set the trace level and start the trace.

Set the passport trace level to one of the following values.
Trace Level Description
0 (NONE) 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.
SUPE2ETraceLevel level = SUPE2ETraceLevel_NONE;
switch (val)
{
  case 1:
    level = SUPE2ETraceLevel_LOW;
    break;
...
SUPE2ETraceServiceImpl *e2eTraceService = [SUPE2ETraceServiceImpl getInstance];
[e2eTraceService setTraceLevel:level];
[e2eTraceService startTrace];

When you call the startTrace method, the SUPE2ETraceService 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.