SAP Cloud Platform

SAP Cloud Platform, the in-memory Platform-as-a-Service offering from SAP, enables customers and developers to build, extend, and run applications on SAP HANA in the cloud. It provides access to a development environment in the cloud. The platform includes a comprehensive set of services for integration, enterprise mobility, collaboration, and analytics.  

Integration Monitoring and Exception Management

User Tracing

Technical Prerequisites

The following technical prerequisites have to be met in order to monitor this scenario:

  • Monitoring SAP Cloud Platform is available starting from SAP Solution Manager 7.2 SP03, or FRun 1.0 FP02.
  • Application tracing is supported for SAP Cloud Platform from March 2018 onwards, and requires at least SAP Solution Manager 7.2 SP06, or FRun 1.0 FP02.
  • Import Cloud Service SSL Certificate into SAP Solution Manager

Import Cloud Service SSL Certificate

In the context of Hybrid Scenarios, data collectors are connecting from Solution Manager to the Cloud Service provider in order to collect exceptions and/or statistical data. To allow this outgoing connection from Solution Manager, the SSL Certificate of the Cloud Service provider has to be imported in Trust Manager (STRUST).

  1. Open the cloud service URL in your web browser.
  2. Click on the padlock next to the Cloud Service URL (within the address input field).
  3. When using Firefox, click on ‘Show Connection details', ‘More Information', 'View Certificate' and select the ‘Details' tab.
  4. When using Microsoft IExplorer, click on ‘View Certificate' and select the 'Certificate Path' tab.
  5. When using Google Chrome, click on ‘Certificate' and select the 'Certificate Path' tab.
  6. In the displayed certificate hierarchy select the Certification Authority (CA) certificate you plan to trust.
  7. When using Firefox, press ‘Export…'.
  8. When using Microsoft IExplorer or Google Chrome, press ‘View Certificate' and in the displayed pop-up navigate to the ‘Details' tab, to press ‘Copy to File…'.
  9. Select an export format you would like to use and that is supported by STRUST transaction, and export the certificate.
  10. Now, log on to SAP Solution Manager and go to transaction STRUST.
  11. Switch to Edit.
  12. Double click on entry 'SSL client SSL Client (Anonymous)'.
  13. Import the previously exported CA certificate, by pressing – within section ‘Certificate' – the icon ‘Import Certificate'.
  14. Press ‘Add to Certificate List'.
  15. Finally ‘Save' this modification.

Available Monitoring Content

The following SAP Cloud Platform scenarios are currently covered in public cloud operations with SAP Solution Manager:

  • Java application errors

SAP Cloud Platform integrates with on premise systems via different technologies. Depending on the integration technology used for your cloud scenario you also have to monitor the integration solution to ensure end-to-end monitoring coverage for the cloud scenario, as described below.

The following integration scenarios are possible (and which monitoring objects they have):

  1. Integrating SAP Cloud Platform via SAP Cloud Platform Integration: 1, 3
  2. Integrating SAP Cloud Platform via SAP Cloud Platform Integration for data services: 1, 2
  3. Integrating SAP Cloud Platform via SAP Cloud Connector Integration: 1, 4

For the SAP Cloud Platform the following monitoring content is relevant.

# Scenario Components Monitoring Object Description Monitoring Template Since SP
Cloud Exceptions in SAP CP 

Java application errors occurring in SAP Cloud Platform

Cloud (SAP HCP) 7.2 SP03
Integration Exceptions in SAP CPI for data services Errors in projects and project tasks in SAP Cloud Platform Integration for Data Services Cloud (SAP HCI DS)  7.2 SP03 
Integration Exceptions in SAP CPI Exceptions in iFlows in SAP Cloud Platform Integration for the communication with SAP Cloud Platform Cloud (SAP HCI) 7.1 SP12*
Integration Exceptions in SAP Cloud Connector   planned  

*) Monitoring content was extended with later support packages (see monitoring template page for details)

Monitoring Template: Cloud (SAP HCP)

Metric Name Description MAI Category Since SP

Number of exceptions in SAP HCP

Number of Java application errors collected from the SAP Cloud Platform. These statistics is retrieved from central Exception Management in Solution Manager. Data Collection is executed in delta mode.

The statistics are based on single exceptions which are retrieved via an API from SAP CP into central Exception Management in Solution Manager

Exceptions

7.2 SP03

Single exceptions in SAP HCP

Single exceptions detected in SAP CP. Exceptions are retrieved via an API from SAP CP into central Exception Management in Solution Manager. Data Collection is executed in delta mode.

Exceptions

7.2 SP03

In the context of this hybrid landscape, Trace Analysis, also allows you to trace end-user requests having excessive execution times, showing performance metrics, like application response time, interactions between UI and SAP Cloud Platform, and outbound communications.

Configuration

Step 1: Define Cloud Service in SAP Solution Manager

You need the following information to create the SAP Cloud Platform service:

  • User
  • Password
  • Root URL (The root URL of the SAP Cloud Platform API server which corresponds to your account host)

Determining the API Root URL for SAP Cloud Platform

The API Root URL for SAP Cloud Platform depends on the host on which your account is hosted on.

The host depends on the region as described here: SAP Cloud Platform Regions and Hosts (e.g. If your host is us1.hana.ondemand.com, the Root URL to configure is https://publicapingplog.us1.hana.ondemand.com)

The Cloud Services configuration is now accessible from the SAP Solution Manager Configuration (SOLMAN_SETUP) → Managed Systems Configuration → Tab 'Cloud Services'.

Create Cloud Service:

  1. Select 'Cloud Service Operations' → Create Cloud Service
  2. Select Service Type: 'SAP Cloud Platform' from the drop-down list.
  3. Define Service:
    • Account: The SAP Cloud Platform account name
  4. Define Root URL: Enter the <Main URL> as Root URL.
    • You can also adjust the extended service ID (The ID used as SID in LMDB) here.
  5. Confirmation: Check your input values and click 'Finish'

The second step is to create the end-point for the cloud service.

Create the End-Point:

  1. Select your SAP Cloud Platform cloud service from the list and click 'Configure Cloud Service' 
  2. Configure Endpoints: Click the 'Add' button on the 'HTTP Endpoints' tab.
  3. Enter the following information:
    • Description: A meaningful description
    • User: <User>
    • Password: <Password>
    • If necessary add proxy information to connect to SAP Cloud Platform

Step 2: Configure Exception Management

After the basic configuration you now have to configure Exception Management, as the exceptions collected via Exception Management and stored in the central exception store are the basis for the Integration Monitoring data collection.

Configuration for SAP Cloud Platform (HCP Error logs)

To access the Exception Management setup please go to transaction SOLMAN_SETUP → Application Operations → Exception Management 

  1. In the step 'Define Scope' select the tab 'Cloud Services' and your SAP CP system. If you didn't configure the system before make sure to select 'All Cloud Services' in the view drop-down. Click on 'Configure' or click 'Next' two times. You will enter the step 'Exception Configuration'.
  2. Click 'Add / Configure Log Store'. Select 'Error Logs from SAP Cloud Platform'. Select the correct end-point for the SAP Cloud Platform if you have more than one.
  3. Select the fields for filtering for your log store. Which fields are filled and what their content is, is determined by the developer of an application (it is somewhat comparable to the Application Log in ABAP). Please check with the developer of your application which values can be expected. The following filter fields are available:
    • Application: Application Name
    • Logger: This field usually contains the area and the application name to identify the origin of the logged problem. Supports wildcards (e.g. com.sap*)
    • Message: Error text of the exception. Supports wildcards (e.g. Failed*cache)
    • PassportId: The passport of the exceptions
    • Runtime: Runtime of the application (e.g. java or html5). If nothing is entered all runtimes are considered.
    • Severity: Comma separated list of the severity of the exceptions (e.g. ERROR, FATAL)
    • Tenant: The account or sub-account ID for the exception
    • User: The user who triggered the exception
  4. Maintain the filter values for the fields in the Filter Definition panel under the log stores table. You can also add, remove or change filter fields and values later on in the area. You can use different operators for your filter value. You can add more than one filter filed combination per log store. To add an additional filter field combination click on the button 'Add Filter' in the 'Configured Log Stores' panel.
  5. Once you are done with the Log Store setup click 'Next' to go to the alert configuration. The alert configuration is done in the 'Interface and Connection Monitoring' described in the next section.

Step 3: Configure Interface and Connection Monitoring

The last step is the configuration of Interface and Connection Monitoring. The Interface and Connection Monitoring setup can be accessed via SAP Solution Manager Configuration (SOLMAN_SETUP). 

Configuration for Monitoring Template: Cloud (SAP HCP)

To access the Integration Monitoring setup please go to SAP Solution Manager Configuration (SOLMAN_SETUP) → Application Operations → Integration Monitoring → Interface and Connections.

If you didn't perform the infrastructure configuration yet, please follow the Interface and Connection Monitoring Setup.

Navigate to the step 'Define Scope'. You can create a new scenario for the SAP CP monitoring or use an existing one. Make sure the on premise system for the SAP CP scenario and the Cloud Service created for SAP CP is part of the Interface and Connection Monitoring scenario. 

Create the Interface Channel:

  1. Select the scenario and click 'Next'
  2. In step 'Preparation' perform all relevant manual activities and run all automatic activities.
  3. In step 'Configuration' click the 'Add' button.
    • Channel Name: Enter a meaning full name (max. 30 characters)
    • Type: Select 'Cloud'
    • Monitoring Template: Select 'Cloud (SAP HCP)'
    • Description: Enter a description for the channel
  4. Click Next.
  5. Source type:
    • If the source system is the on premise system, please select 'Technical System'
    • If the source system is the SAP CP system please select 'External Service'
  6. Source: Select the on premise system resp. the SAP CP Cloud Service from the drop-down list
  7. Target Type:
    • If the target system is the on premise system, please select 'Technical System'
    • If the target system is the SAP CP system please select 'External Service'
  8. Target: Select the on premise system resp. the SAP CP Cloud Service from the drop-down list
  9. The measuring point is selected automatically
  10. If more than one client are connected for the on premise system please select the correct client for the monitoring
  11. Click Next.
  12. Click Finish.

Maintain the Interface:

  1. Select the interface channel you created
  2. On the 'Interfaces' tab click the 'Add' button.
  3. Provide the following information:
    • Interface name: Enter a name for the interface

    • Application (mandatory): Application Name

    • Tenant: The account or sub-account ID for the exception

The errors in the Cloud Platform are collected by Exception Management in SAP Solution Manager. In Exception Management you could already enter restricting parameters for the messages you want to monitor, e.g. for the message status and the user. Below the metrics selection in ICMon you can restrict the messages additionally. 

Select Metrics:

  1. On the tab 'Metrics' select the metrics you want to monitor

  2. Enter Metric Parameters

    • Logger: This field usually contains the area and the application name to identify the origin of the logged problem. Supports wildcards (e.g. com.sap*)

    • Message: Error text of the exception. Supports wildcards (e.g. Failed*cache)
    • Severity: Comma separated list of the severity of the exceptions (e.g. ERROR, FATAL)
    • User: The user who triggered the exception
    • Runtime: Runtime of the application (e.g. java or html5). If nothing is entered all runtimes are considered.

  3. Save your interface channel by clicking on the 'Save' button. 

You can maintain attributes as described in the Interface and Connection Monitoring Setup on the tab 'Attributes'.

Thresholds and the collection schedule are maintained in the next step of the guided procedure. Once you have maintained all your channels, click 'Next' in the main guided procedure to move to the step 'Activation'.

Maintain Thresholds and Schedule:

  1. Select the Alert for the interface channel (the alert is the line with the red flash icon next to it)
    • On alert level you can maintain notification and incident message creation
    • Do not remove the flag for 'Do not Group Individual Occurrences' as this flag ensures that an alert is created for every single error message
  2. Select the Metrics
    • You can adjust the thresholds on the tab Thresholds.
    • Do not change the data collector type or data collector name on the tab 'Data Collection' as the monitor will not work anymore if this is changed.
    • Only change the collection interval if you know what you do or if advised to do this by SAP.
  3. Click 'Apply and Activate' → <Choose one option> to activate the monitoring

Tracing Capabilities

Currently the following SAP Cloud Platform services are enabled for Trace Analysis. 

IMPORTANT: The end-user starting a trace allows that provided user id is recorded in involved systems, as part of the trace data.

SAP Cloud Platform Service Description Since SP
J2EE Web Profile 6 Support SAP passport forwarding and performance statics 7.2 SP06
SAPUI5 Runtime Support SAP passport forwarding and performance statics 7.2 SP06
Web Tomcat 7 & 8 (with limitations*) Support SAP passport forwarding (with manual tasks) and performance statics 7.2 SP06

(*) Due some technical/feature decisions in Cloud Platform for Runtime based on Tomcat8, the application developer need to take care for the SAP-PASSPORT update/forwarding by using a specific interface - SapPassportHeaderProvider. You can find more information in the SAP Help documentation.  

Enabling the automatic trace upload

You can enable the automatic upload of the client side trace data, which starts in the background when a trace is ended. Therefore, perform the following steps in your WebIDE or development platform for the SAP UI5 applications in focus. Note: This operation has to be repeated for each relevant SAPUI5 application.

  1. Load the SAP UI5 application in your WebIDE
  2. Open the file: neo-app.json
  3. Edit the file, adding a "routes" record, of type destination, as shown here:

{

   "welcomeFile": "index.html",

   "routes": [

   { <=> },

   {

      "path": "/sap/bc/sdf/E2E_Trace_upl",

      "target": {

           "type": "destination",

           "name": "solutionmanager",

           "entryPath": "/sap/bc/sdf/E2E_Trace_upl"

   },

      "destination": "SAP SolManUpload"

},

[...]

  1. Save the file
  2. Also maintain the above mentioned destination, within SAP Cloud Platform and SAP Cloud Connector, specifying the SAP Solution Manager relevant gateway host and port.
  3. Finally, deploy the SAP UI5 application again to the SAP Cloud Platform

Tracing SAP UI5 applications

You can start Trace Analysis for any SAP UI5 application, using the Diagnostics functionality, as described in the help portal (<Alt>+<Shift>+<Ctrl>+S key combination).  Note: For mobile devices, refer to Mobile Diagnostics.

  1. In the Diagnostics window that pops-up, open the Technical Information section, and scroll to the bottom of that section to find the E2E Trace sub-section.
  2. Select the desired Trace Level (LOW|MEDIUM|HIGH)
  3. Press the Start button
  4. In the Window of the SAP UI5 application you can now perform the actions you want to trace. Note: After each interaction with the SAP UI5 application you need to wait for a until a pop-up appears, asking if you want to continue tracing or not.
  5. Press cancel, when you want to end tracing.
  6. After having ended the tracing, it is important to reload the SAP UI5 application, to be able to proceed using that application.