SAP Business Technology Platform

SAP Business Technology 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 Scenario

For SAP Business Technology Platform the following integration scenarios are possible:

The different scenarios contain the following exceptions and point-to-point connections:

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

 Scenario ComponentsMonitored ContentInterface Channel TypeSince SP
Cloud Services: SAP Business Technology PlatformApplication errors and alert notifications from SAP BTPCloud: Cloud (SAP BTP)7.2 SP03
Cloud Services: SAP Cloud Integration for data servicesExceptions in tasks in SAP Cloud Integration for data servicesCloud: Cloud (SAP Cloud Integration DS) 7.2 SP03 
Cloud Services: SAP Integration Suite - Cloud IntegrationExceptions in integration flows (iFlow) in SAP Integration Suite - Cloud IntegrationCloud: Cloud (SAP Cloud Integration)7.1 SP12*
On-premise: SAP Cloud Connector Availability and Performance for SAP Cloud Connector Available monitoring content in System Monitoring 7.2 SP06 

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

Technical Prerequisites

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

  • Monitoring of Java Applications in SAP BTP (Neo): 
    • Is available starting from SAP Solution Manager 7.2 SP03
  • Receive alerts from the Alert Notification Service for SAP BTP (Neo and Cloud Foundry):
    • Is available starting from SAP Solution Manager 7.2 SP08
  • E2E Application Tracing:
    • Is supported for SAP Business Technology Platform from March 2018 onwards, and requires at least SAP Solution Manager 7.2 SP06
 

Available Monitoring Content

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

  • Monitoring of Java application errors in Java application developed on SAP Business Technology Platform in the Neo environment
  • Alerts from the Alert Notification Service provided in SAP Business Technology Platform for both the Neo as well as the Cloud Foundry environment
  • End-to-End Tracing capabilities for application running in SAP Business Technology Platform in the Neo environment

The collection of exceptions and alert notifications is performed using Exception Management. The metrics to monitor if there were any exceptions or alert notifications are available in a template in Interface and Connection Monitoring.

Monitoring Template: Cloud (SAP BTP) 

Metric NameDescriptionMAI CategorySince SP

Number of exceptions in SAP BTP Java Applications (Neo)

Number of Java application errors collected from the SAP BTP. 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 BTP into central Exception Management in Solution Manager

Exceptions

7.2 SP03

Single exceptions in SAP BTP Java Applications (Neo)

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

Exceptions

7.2 SP03
Alert Notifications received from SAP BTPAlert Notifications received from SAP BTPExceptions7.2 SP08

Number of Alert Notifications received from SAP BTP

Number of Alert Notifications since the last data collection (Delta)Exceptions7.2 SP13

Number of Alert Notifications received from SAP BTP (last 24h)

Number of Alert Notifications in the last 24 hoursExceptions7.2 SP13

Tracing Capabilities

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 Business Technology Platform, and outbound communications. 

The trace is collected from the backend system(s) as well as from the application running in SAP Business Technology Platform. The SAP passport allows SAP Solution Manager to correlate the related steps over all components and display the complete end-to-end in the End-to-End Trace Analysis application in Root Cause Analysis.

Please note that the SAP backend system and all other systems that are part of the trace must be capable to handle SAP passport. You can find information which system types are supported by E2E Trace Analysis in SAP note 2248724 - Root Cause Analysis in SAP Solution Manager 7.2

For SAP Business Technology Platform currently the following services are enabled for Trace Analysis. 

SAP BTP ServiceDescriptionSince SP
J2EE Web Profile 6Support SAP passport forwarding and performance statics7.2 SP06
SAPUI5 RuntimeSupport SAP passport forwarding and performance statics7.2 SP06
Web Tomcat 7 & 8 (with limitations*)Support SAP passport forwarding (with manual tasks) and performance statics7.2 SP06

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

Connect Cloud Service

Preparations in SAP Business Technology Platform (Neo)

The following section described the preparation steps that have to be performed if you run SAP Business Technology Platform in the Neo environment. If you run SAP Business Technology Platform in the Cloud Foundry environment please go to the next section. 

Preparations for Java Application Error Monitoring

Determine Root URL

The API Root URL for SAP Business Technology Platform depends on the host on which your account is hosted on. The host depends on the region as described here:

  • SAP Business Technology Platform (SAP BTP) → SAP BTP, Neo Environment → Regions in the Neo Environment → Regions and Hosts Available for the Neo Environment 
  • e.g. If your host is us1.hana.ondemand.com, the Root URL to configure is https://publicapingplog.us1.hana.ondemand.com

Create User for Java Log Monitoring

To connect to SAP Business Technology Platform to collect Java application exceptions you need to provide SAP Solution Manager with a user that is allowed to read the default trace.

  • The user needs at least the role 'Support User' in SAP Business Technology Platform

Write Java Errors into Default Trace

This last preparation step starts already during the development of the SAP Business Technology Platform application. To be able to collect application errors, these errors must exist in the default trace for the SAP Business Technology Platform java application. Hence developers must write meaningful errors in this trace. The quality of the monitored exceptions completely depends on the quality of the exceptions written by the developer.

  • Please see this blog for more information on logging for SAP Business Technology Platform Java applications 

Preparations for Alert Notifications

Enable SAP Business Technology Platform Alert Notifications

Receiving alert notifications is done via the Alert Notification Service which can be enabled for your SAP Business Technology Platform account. 

Important: Please be aware that the use of this service is quota based (billable)!

To enable the service please follow the documentation:

Gather Connection Information

To authenticate towards the service you have to create an OAuth client in SAP Business Technology Platform. Information how to do this you find here:

Please make sure to note down or copy the client secret, as it cannot be retrieved later on. 

You will need the following connection information to connect SAP Solution Manager.

  1. In your Subaccount navigate to Services → Alert Notification → Security
  2. Root URL: Use 'Consume Events' URL under Endpoints (up to .com)
  3. OAuth URL: Use 'OAuth Token' under Endpoints (up to .com)
  4. Client ID: Use 'Client ID' of the created OAuth client
  5. Client Secret: Use client secret noted down during client creation

Import the SSL certificate for Cloud Foundry

Even if used in the SAP Business Technology Platform (Neo) the alert notification service technically runs in SAP Business Technology Platform (Cloud Foundry). To make sure that SAP Solution Manager can receive alert notifications successfully, you have to import the SSL certificate for Cloud Foundry additionally to the SSL certificate for Neo.

  1. In your Subaccount navigate to Services → Alert Notification → Security
  2. Click on the 'Consume Events' URL under Endpoints to open it in a browser
  3. Import the SSL certificate for this website into SAP Solution Manager STRUST as described above

Preparations for E2E Application Tracing

Enable Automatic Trace Upload for SAPUI5 applications

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 SAPUI5 applications in focus.

Note: This operation has to be repeated for each relevant SAPUI5 application.

  1. Load the SAPUI5 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"
        }
      ]
    }
  4. Save the file
  5. Also maintain the above mentioned destination, within SAP Business Technology Platform and SAP Cloud Connector, specifying the SAP Solution Manager relevant gateway host and port.
  6. Finally, deploy the SAP UI5 application again to the SAP Business Technology Platform 

Preparations in SAP Business Technology Platform (Cloud Foundry)

The following section described the preparation steps that have to be performed if you run SAP Business Technology Platform in the Cloud Foundry environment.

Preparations for Alert Notifications

Enable SAP Business Technology Platform Alert Notifications

Receiving alert notifications is done via the Alert Notification Service which can be enabled for your SAP Business Technology Platform account. 

Important: Please be aware that the use of this service is quota based (billable)!

To enable the service please follow the documentation:

Gather Connection Information

To authenticate towards the service you have to create an OAuth client in SAP Business Technology Platform. Information how to do this you find here:

Please make sure to note down or copy the client secret, as it cannot be retrieved later on. 

You will need the following connection information to connect SAP Solution Manager.

  1. Select your sub-account and find the Alert Notification Service
  2. Navigate to Service Keys → Create Service Key
  3. Root URL: Use 'url' value of the service key (up to .com)
  4. OAuth URL: Use 'oauth_url' of the service key
  5. Client ID: Use 'client_id' of the service key
  6. Client Secret: Use 'client_secret' of the service key

Create Custom Alerts

SAP Cloud Foundry doesn't have any available event that come out of the box. Hence to actually receive alerts from application in SAP Cloud Foundry you have to implement the alert creation in your application.

Find more information here:

Connect Cloud Service to SAP Solution Manager

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 BTP' from the drop-down list.
  3. Define Service:
    • Environment: Choose Neo or Cloud Foundry
    • Account: The SAP Business Technology Platform account name
  4. Define Root URL: Enter the Root URL. For SAP BTP (Neo) it doesn't matter if you enter the ANS or the Java Error URL. You have to re-enter the URL in the End-Point creation.
    • 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 (Neo):

  1. Select your SAP Business Technology 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:
    • API Type:
      • Application Exceptions: for Java error monitoring
      • Alert Notification Service: to receive alert notifications
    • Root URL: Enter the Root URL either for Java error monitoring or for ANS
    • Description: A meaningful description
    • The rest of the fields depends on the API Type:
      • Application Exceptions:
        • User: User provided for Java error monitoring
        • Password: Password of the user
      • Alert Notification Service:
        • OAuth URL: OAuth URL
        • User: Client ID
        • Password: Client secret
    • If necessary add proxy information to connect to SAP Business Technology Platform

Please not that you have to create two end-points if you want to monitor Java errors as well as receive alert notifications.

Create the End-Point (Cloud Foundry):

  1. Select your SAP Business Technology 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:
    • Root URL: Make sure the Root URL is correct
    • Description: A meaningful description
    • OAuth URL: OAuth URL
    • User: Client ID
    • Password: Client secret
    • If necessary add proxy information to connect to SAP Business Technology Platform 
 

Monitoring Configuration

Step 1: 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 Business Technology Platform Java Applications

This exception store will only exist if SAP Business Technology Platform runs in the Neo environment! 

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 BTP 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 'SAP BTP Java Application Logs'. Select the end-point you created for Application Exceptions.
  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). 
    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 SAP Passport of the exceptions
    • 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. You should not set up the monitoring for the exceptions in the Exception Management. If you activate the monitoring here, you will receive an alert (and if set up this way an email) for every single exception in the application log. Instead we will use Interface and Connection Monitoring to monitor the central exceptions store for exceptions.

Java Application Errors

To find out which Java application errors are written for the Java application you want to monitor, you can either ask the developer of the application or check if errors are available in your SAP BTP subaccount under:

Applications → Java Applications → Click on the application name → Logging → Default Trace 

 

Configuration for SAP Business Technology Platform Alert Notifications

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 BTP 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 'SAP BTP Alert Notifications'. Select the end-point you created for Alert Notification Service.
  3. Select the fields for filtering for your log store.  
    The following filter fields are available:
    • category: ALERT
    • eventType: Event type of the alert (e.g. AverageResponseTime)
    • resourceName: The name of the source
    • severity: ERROR or WARNING
    • subject: <tags.monitoring:type> followed by the human readable form of the eventType property. (e.g. [PROBLEM]: OS MemoryUsage)
  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. You should not set up the monitoring for the exceptions in the Exception Management. If you activate the monitoring here, you will receive an alert (and if set up this way an email) for every single exception in the application log. Instead we will use Interface and Connection Monitoring to monitor the central exceptions store for exceptions. 
 

Catalog of Available Alerts in the Alert Notification Service

The following alerts are available in the different environments:

  • Catalog of Available Events for SAP Business Technology Platform (Cloud Foundry): SAP Alert Notification service for SAP BTP → Administration → Catalog of Available Events
  • Catalog of Available Events for SAP Business Technology Platform (Neo): SAP Alert Notification service for SAP BTP → SAP Alert Notification service for SAP BTP, Neo Environment → Administration → Catalog of Available Events

Step 2: 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 BTP)

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

Navigate to the step 'Define Scope'. You can create a new scenario for the SAP BTP monitoring or use an existing one. Make sure the on premise system for the SAP BTP scenario and the Cloud Service created for SAP BTP 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 BTP)'
    • 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 BTP service please select 'External Service'
  6. Source: Select the on premise system resp. the SAP BTP 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 BTP service please select 'External Service'
  8. Target: Select the on premise system resp. the SAP BTP 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. The interface channel type does not have any configurable parameters on the 'Interfaces' tab

Select Metrics:

  1. On the tab 'Metrics' select the metrics you want to monitor
  2. Enter Metric Parameters
    • Number of exceptions in SAP BTP Java Applications (Neo) & Single exceptions in SAP BTP Java Applications (Neo)
      • Application (mandatory for Single Exceptions) (CP): Application name
      • Logger (CP): 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 (CP): Error text of the exception. Supports wildcards (e.g. Failed*cache)
      • Severity (CP): Comma separated list of the severity of the exceptions (e.g. ERROR, FATAL)
      • User (CP): The user who triggered the exception
      • Tenant (CP):  The account or sub-account ID for the exception
    • Alert Notifications received from SAP BTP
      • Category (CP): ALERT
      • Event Type (CP): Event type of the alert (e.g. AverageResponseTime)
      • Resource Group (CP): The Neo subaccount for which you receive a notification.
      • Resource Name (CP): The name of the source
      • Severity (CP): ERROR or WARNING
      • Subject (CP): <tags.monitoring:type> followed by the human readable form of the eventType property. (e.g. [PROBLEM]: OS MemoryUsage)
      • resourceType (CP) (since SP13): The type of the resource
  3. Save your interface channel by clicking on the 'Save' button. 

Attention

If you activate a metric please make sure:

  • To create at least one Parameter Set
  • Enter a value or '*' in at least one of the filter parameter marked with (CP) above
The filter parameters marked with (CP) in the list above are used to create an extended context. This means that you can group your results using these parameters. The data collection will then count the exceptions based in these grouping criteria. 
  • For SAP BTP Java Applications (Neo) the filter parameter 'Application' is the best candidate for basic grouping, if you add a '*' to this parameter you will receive one entry for each application that created an exception.
  • For Alert Notifications received from SAP BTP the filter parameter 'Category' or 'Severity', to distinguish between errors and warnings, can be used.
You can use one or several filter parameters to group. Please keep in mind the more filter parameters you use for the grouping the more fine granular your result set gets. E.g. If you use 'Application' and 'User' you would get one entry for each Application and User combination in your result set. 
Filter Values in Interface and Connection Monitoring

Since the data collection is based on the content of the global exceptions store, you can always check the collected exceptions in Exception Management. All filter parameters are part of the collection context of the exceptions. The filters applied in Interface and Connection Monitoring allow you to filter the exceptions collected by the Exception Management further. However if the filters in Exception Management do not collect an exception, it is not available in the central exception store and you will not be able to find it in Interface and Connection Monitoring!

 

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 each time new exceptions are found during a data collection interval
  2. Select the Metrics
    • 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.
    • Do not change the threshold if it is set to 'Already Rated'.
  3. Click 'Apply and Activate' → <Choose one option> to activate the monitoring
 

E2E Application Tracing

Trace Preparation: Activate Java Statistics in SAP Business Technology Platform

To collect also the Java application part of a trace you need to activate the statistics for the Java application that you want to trace in SAP Business Technology Platform.

Note: You need the role 'Developer' to start the statistics collection 

  1. Navigate to you Subaccount in SAP Business Technology Platform
  2. Go to Applications → Java Applications → Click on the name of the application you want to trace
  3. Go to Monitoring → JMX Console
  4. Find the MBean com.sap.js
  5. Select Statistics → Statistics
  6. Select 'Operations'
  7. Set 'Enable Tracing' = true
  8. Click the 'Execute' symbol 
 

For more information on the E2E Trace functionality and further prerequisites in SAP Solution Manager please refer to Using Trace Analysis

Tracing SAP UI5 Applications

You can start Trace Analysis for any SAPUI5 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 SAPUI5 application, to be able to proceed using that application.

Important: Make the end-user starting a trace aware that his provided user-id is recorded in involved systems, as part of the trace data.