This plugin enables the tracing of HTTP calls made within a Kapsel application. This trace information is updated to the SMP server which then forwards it on to a Solution Manager installation specified in the management cockpit under Settings > System > Solution Manager URL. See also End-to-End Analysis Overview.
For additional details on the end-to-end trace plugin see C:\SAP\MobileSDK3\KapselSDK\docs\api\sap.E2ETrace.html or Using the End-to-End Trace Plugin. The following steps will demonstrate how to modify the sample used in the Logon sectionto enable and disable the capturing of the Kapsel End-To-End Trace plugin.
cordova plugin add kapsel-plugin-e2etrace --searchpath %KAPSEL_HOME%/plugins
or
cordova plugin add kapsel-plugin-e2etrace --searchpath $KAPSEL_HOME/plugins
C:\Kapsel_Projects\LogonDemo\www\index.html
This will add ability to start, stop, set the trace level and upload the trace log to the SMP server.<br><button id="start" onclick="sap.E2ETrace.startTrace('DansETEKapselTrace');">Start Trace</button>
<button id="stop" onclick="sap.E2ETrace.endTrace();">End Trace</button><br>
<button id="upload" onclick="sap.E2ETrace.uploadTrace(uploadTraceSuccess, errorCallback);">Upload Trace</button>
Add the following JavaScript method used by the uploadTrace method.function uploadTraceSuccess() {
alert("Trace successfully uploaded");
}
cordova run android
or
cordova run ios
<?xml version="1.0" encoding="UTF-8"?> <BusinessTransaction clientType="Mobile" id="946c1ae53e64437f8ce4679801f3248f" name="DansETEKapselTrace" time="20.08.2014 14:57:11.977 UTC" xmlVersion="7.1.10"> <ClientInformation>SMPClientSDK 3.5.0-sap-07 Android</ClientInformation> <TransactionStep id="946c1ae53e64437f8ce4679801f3248f-1" name="Step-1" reqType="http" time="20.08.2014 14:57:11.977 UTC" traceflags="0d9f"> <Message dsrGuid="f51f88a04195404cb2d3d73e6abc29d1" id="1" name="Message-1"> <duration>1357</duration> <firstByteReceived>20.08.2014 14:57:16.615 UTC</firstByteReceived> <firstByteSent>20.08.2014 14:57:15.258 UTC</firstByteSent> <lastByteReceived>20.08.2014 14:57:16.615 UTC</lastByteReceived> <lastByteSent>20.08.2014 14:57:15.258 UTC</lastByteSent> <rcvd>12289</rcvd> <requestHeader>GET http://10.7.171.196:80/com.mycompany.logon/CarrierCollection?$format=json SAP-PASSPORT: 2A5448... MaxDataServiceVersion: 3.0 Authorization: Basic *************** Accept: application/atomsvc+xml;q=0.8, application/json;odata=fullmetadata;q=0.7, application/json;q=0.5, */*;q=0.1 X-CorrelationID: f51f88a04195404cb2d3d73e6abc29d1-1-1 X-SMP-APPCID: d903c252-8d59-4355-8c2c-98415be34f28 </requestHeader> <requestLine>GET http://10.7.171.196:80/com.mycompany.logon/CarrierCollection?$format=json</requestLine> <responseHeader>server: SAP ntcoent-length: 12289 dataserviceversion: 2.0 etag: version 01 Date: Wed, 20 Aug 2014 14:57:48 GMT Transfer-Encoding: chunked Content-Type: ap ab plication/json;charset=utf-8 </responseHeader> <returnCode>200</returnCode> <sent>0</sent> </Message> </TransactionStep> </BusinessTransaction>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
26 | |
25 | |
21 | |
12 | |
9 | |
8 | |
8 | |
8 | |
8 | |
8 |