お問い合わせ

Trace Analysis

Trace Analysis in SAP Focused Run is a tool for isolating a single user interaction through a complete landscape and providing trace information on each of the involved components for one interaction only,starting with the user interaction in the browser and ending with data being committed to the database. Identifying long running user requests within a complex system landscape is the most common use case of E2E Trace Analysis, but you can also identify which functional errors have occurred during the execution of one request. These exceptions (like a dump) are then attached to the trace. So the trace can also be used to do functional testing and ensuring that an activity executed in one system does not lead to functional errors in connected systems during the request execution.

Scope

  • Analyze issues from user client the whole way through the SAP landscape to disk of data base
  • Limit tracking to specific transactions to avoid negative effects on productive systems

Benefits

  • Fast analysis of issues leads to faster resolution and therefore lower costs

Prerequisites

  • Before using the Trace Analysis in SAP Focused Run please make sure, that you have executed the preparation steps.

Using Trace Analysis

In order to use the Trace Analysis in SAP Focused Run you need to specify which systems should be used. This can be done with the Scope Selection.

Scope Selection

When starting initially the trace application from the Launchpad a scope a probably not set. You can do this by clicking on the Scope Selection icon in the header of the shell.


You can save multiple queries of systems you want to analyze. When the flag 'Set as Default' is set, this query is your default query. The flag 'Execute on Select' specifies if this scope selection should be used when you start the application the next time. By setting the 'Share' flag other users can use this scope selection too.


Performing a trace can be separated in four general steps:

  • Enabling
  • Recording
  • Collection  
  • Evaluation

Allow Tracing in the Managed Systems (Trace Enabling)

In the trace application tracing for all selected managed systems can be allowed centrally on the page Trace Enabling.


The screen shot above displays the tracing status for the two J2EE systems FBJ and FSJ and the ABAP systems FBT and FQ7_SM. In this case tracing is allowed for the ABAP systems but not for the J2EE systems. Possible states are:

The screenshot above displays the tracing status for the two J2EE systems FBJ and FSJ and the ABAP systems FBT and FQ7_SM.

In this case tracing is allowed for the ABAP systems but not for the J2EE systems.

Possible states are:

Tracing is enabled and allowed in that system

Tracing is disabled and not allowed in that system

Trace Status is unknown. See details in error message or in default.trc of the Solution Manager Diagnostics.

In progress, Trace status is currently read 

With the button Enable all tracing will be allowed for all systems in this scope.

For each system the status can be toggled.

Explanation of Trace Levels

Trace Level Low

Only statistical records and HTTP log entries are written. HTTP logs are required for HTTP analysis providing front end, server response times (HTTP logs) and derived network times. Statistical records are utilized to show the relationship between different managed systems and to show how much time is spent on each system. No server-side traces are triggered in this case and thus the performance overhead is very low. Use this trace level if you want to do performance measurements.

Trace Level Medium

This trace level represents a performance trace. In the table below you can see which traces are triggered when using this trace level. Use this trace level when you have identified a performance bottleneck and you want to do a drill-down.

Trace Level High

This Trace level represents a functional trace. This could have significant impact on the response time. The following table gives an overview of the traces written per trace level for SAP J2EE:

Trace Level HTTP Log SQL Trace Logging Introscpe Transaction
Low X      
Medium X X   X
High X X X X

The following table gives an overview of the traces written per trace level for ABAP.

Trace Level HTTP Log SQL Trace ABAP Trace (SAT) Application Log (SLG1)
Low X      
Medium X X Aggr.  
High X X Non aggr. X

Trace Enabling

Trace Enabling for SAP HANA

To allow creation of detail traces in HANA (HANA 1.0 >= SP06) set global.ini -> traceprofile_sap_passport_<level> -> enabled = „true“
for the trace level(s) you want to use (medium/ high).

The current status can be displayed in SAP Solution Manager with transaction DBACOCKPIT.

Select the system and then Configuration -> INI Files -> global.ini:


Trace Involving SAP Cloud Platform

Purpose

The purpose of this page is to explain how the trace setup and execution changes if SAP Cloud Platform (CP) SAPUI5 apps or Java applications are involved as parts of a scenario involving both SAP CP Neo services and On-premise systems (hybrid scenario)

Overview

We will explain the prerequisites and steps necessary to perform an trace on a hybrid, cloud based SAPUI5 application with an on-premise back end.

Prerequisites

The trace is a feature present in SAP Focused Run. The minimum Versions supporting the trace collection across SAP CP are:

  • SAP Focused Run 1.00 FP02
Preparation in SAP Focused Run

Define the API Service access endpoint as described in Cloud Services Configuration for Hybrid Scenarios

E2E Trace only supports SAP Cloud Platform API endpoint

Preparation of an Upload Channel for E2E Trace in SAP Cloud Platform

If you want to utilize the functionality of automatic uploading of the client side trace data in the background on end of trace follow the following steps in WebIDE or your development platform for the applications in focus. Note that this will have to be performed for each SAPUI5 application separately.

  1. Open your application in WebIDE and open the file neo-app.jsonE
  2. Enter an additional "routes" record of type destination similar to below to the file and save it


3
Maintain the destination in SAP Cloud Platform and Cloud Connector

4 Deploy the SAPUI5 application again to SAP Cloud Platform

Perform Trace

The trace can be performed in several different situations, which will be described in this section:

  • Performing a Trace Using SAP Client Plug-In for Internet Explorer (IE)
  • Performing a Trace in a SAPUI5 Application


Performing a Trace Using SAP Client Plug-In for Internet Explorer (IE)

IMPORTANT NOTE: By starting an End-To-End trace the users running the trace allow that their userid is recorded in involved systems as part of the trace data. 

Use this method if you are tracing an application not having a SAP UI5 User Interface (e.g. a JAVA application in SAP Cloud Platform Neo)

1 Download the most recent SAP Client Plugin from SAP Note 1435190, use the _x86 version even if you are running on an x64 computer.

2 Start as described in the Note

a. Check that the settings in the MS Windows Registry for the Internet Explorer are as mentioned in the SAP Note

b. Unpack the zip file and start SAPClientPlugIn.exe

3 In the user Interface select the Internet Explorer from the drop-down box and choose launch

4 the IE starts with a window 'about:blank' you can now enter the URL to your application in here or, if you want to record the startup of the application ui in the IE you may want to start the Trace first and the enter the URL.

5 The plugin will start the IE and insert itself as an in-process proxy, you can now enter a Name for the trace.

6 When you want to record the trace, use the 'Start Transaction' Button

7 After each finished step you can maintain the step name and the trace level for the next step, then choose 'New Step'

8 If the Trace is finished, select 'Stop Transaction', the client side XML now gets saved.

9 Choose 'Exit', this will also close the IE.

Performing a Trace in a SAPUI5 Application

IMPORTANT NOTE: By starting an End-To-End trace the users running the trace allow that their userid is recorded in involved systems as part of the trace data. 

1 Within any SAPUI5 application you can start the Diagnostics following the description in the help portal for Troubleshooting: Diagnostics with CTRL+SHIFT+ALT+S. Please be aware, that this can only be used in the same tab. In case you open a new window, you need parameter sap-ui-xx-e2e-trace=true.

2 For selected mobile devices you can find it in the Mobile Diagnostics

3 When you have started the Diagnostics UI open the Technical Information section and scroll to the bottom of that section to find the Trace subsection


4
Select the desired trace level (LOW|MEDIUM|HIGH) and press the Start Button

Initial Start

In case you want to trace the initial loading of an application you can add the url parameter sap-ui-xx-e2e-trace=true. It records a trace with level medium without the need of opening the Diagnostics dialog.

If you are asked to record starting the application with a higher trace level then you could add sap-ui-xx-e2e-trace-level=HIGH. Usually this is not required.

5 In the Window of the SAPUI5 application you can now perform the actions you want to trace

a.     After each interaction with the application you need to wait for a while as the end of the interaction is detected via a timeout mechanism on the requests being sent/received

b.     After interaction end has been detected by tracing tool you will receive a pop-up asking if you want to continue tracing or not. Press cancel, when you want to end tracing.

c.     If you have had maintained an upload connection the upload will be performed automatically, nevertheless you can also copy the client side XML for reference or manual upload to a local file with CTRL+C, CTRL+V to a text editor and save it under a name following the pattern BusinessTransaction.*\.xml

6 When you have ended tracing, it is important to reload the currently traced app to get a new session. 

a.    Reason 1 is that the ID of the trace is coupled to the session window of SAP UI5. If you do not create a new session the next recorded trace will be overwriting the previous trace or be discarded during upload as the previous trace registered under th same ID.

b.   Reason 2 is to ensure all trace flags are being reset for the next steps.

Collecting Traces

To check if new traces in the managed systems are available you need to click on the Refresh icon above the table:

Depending on the support package you either click on the icon  in the second column or on the icon  behind the Business Transaction Name.


When the collection is running you see a pop-up with the current status:


When the pop-up is closed and server side data has been collected the status of the Business Transaction is changed and the system IDs are displayed. By clicking on the lock icon you can prevent that this trace is deleted by housekeeping.