(Optional) End to end tracing enables an application developer and end user to trace a request that is sent from the client to the back-end. This spans the entire landscape where you can derive a correlation of traces at the client, server and back-end.
On the client side, the client framework enables an application developer to switch on the trace for messages. The client traces the request at predefined points and all these transactions/requests are recorded in a Business Transaction XML. Additionally, the client maintains a unique identifier in the HTTP header called the SAP Passport that is used to correlate traces across various components. This Business Transaction XML can later be uploaded to the SAP Solution Manager which is a central location to correlate all logging information.
The end to end tracing APIs are available in the SMPClientConnection class. For more information on the significance of different trace levels, see REST SDK API Usage > Rest Client API Reference for Android > PropertyID class.
public void setTraceLevel(int level);
public void startTrace();
public void stopTrace() throws SMPException;
public void uploadTrace() throws SMPException;
clientConnection.setTraceLevel(PropertyId.TrcLvl_MEDIUM);
Start trace level
clientConnection.startTrace();
Stop trace level
Try{ clientConnection.stopTrace(); }catch(SMPException e){ e.printStrackTrace(); }
Upload trace level
Try{ clientConnection.uploadTrace(); }catch(SMPException e){ e.printStackTrace(); }