Skip to Content
Author's profile photo Daniel Van Leeuwen

Getting Started with Kapsel – Part 16 — End-to-End Trace


End-to-End Trace (New in SP05)

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 the JavaScript file in a project that includes this plugin at


or the JS Documentation at Kapsel End-to-End Trace Plugin API Reference. The following steps will demonstrate how to modify the sample used in the Logon section to enable and disable the capturing of the Kapsel End-To-End Trace plugin.

  • Add the e2etrace plugin.
    cordova -d plugin add
  • Add a the following HTML just above the table tag in

    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");
  • In the management cockpit, Under Settings > System > Solution Manager Settings, specify the URL to the Solution Manager where the captured trace information will be sent and check Enabled for End to End Tracing.

    The XML file can be captured by using a program like TcpTrace if you do not have access to Solution Manager.

  • Copy the files to the platform directory by running
    cordova -d prepare
  • Use the Android IDE or Xcode to deploy and run the project. 
  • The following is the captured XML that would be sent to Solution Manager after pressing Start Trace, Read, End Trace, Upload Trace.
    Note that the log level is increased to debug after starting a trace and is returned to the previous log level when the trace is ended.
    <?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">
              <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>
                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
              <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

Back to Getting Started With Kapsel

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Wayne Smith
      Wayne Smith

      This is great if the customer is using Solution Manager.

      However we have a lot of customer who don't

      So the question is can you modify  and dump the trace to

      client log or to the SMP log ?

      Author's profile photo Daniel Van Leeuwen
      Daniel Van Leeuwen
      Blog Post Author

      I have forwarded your comment on to the dev team.

      I don't believe it is currently possible to indicate the E2E trace details should be added to the client log.


      Dan van Leeuwen