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: 2, 3
  3. Integrating SAP Business Technology Platform via SAP Cloud Connector Integration: 3, 4 
 

 Scenario ComponentMonitored ContentMonitoring Category
Cloud Services: SAP Integration Suite - Cloud Integration Integration flows (IFlow) in SAP Integration Suite - Cloud IntegrationSAP Integration Suite 
Cloud Services: SAP Cloud Integration for data servicesExceptions in SAP Cloud Integration for data servicesSAP Integration Suite for data services
Cloud Services: SAP Business Technology PlatformJava logs in applications running in SAP Business Technology PlatformSAP BTP Java Neo Application
Alerts and exceptions sent from the Alert Notification Service SAP BTP Alert Notification 
On-premise: SAP Cloud Connector Availability and Performance for SAP Cloud Connector Available monitoring content in Advanced System Monitoring 

Configure Cloud Service

Preparations in SAP Business Technology Platform (Neo)

The following section describes 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 Business Technology Platform, 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 Focused Run 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:

  • SAP Cloud Alert Notification → SAP Business Technology Platform AlertNotification, Neo Environment → Administration → Credential Management

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 Focused Run.

  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 (full URL)
  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 Focused Run 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 Focused Run 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": "focusedrun",
                "entryPath": "/sap/bc/sdf/E2E_Trace_upl"
            },
            "destination": "SAP FRunUpload"
        }
      ]
    }
  4. Save the file
  5. Also maintain the above mentioned destination, within SAP Business Technology Platform and SAP Cloud Connector, specifying the gateway host and port used by your app.
    • Essentially you can copy the path for the odata services just replacing the path value.
  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 Focused Run.

  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:

 
 

Input Values for SAP Business Technology Platform

  • Environment: Neo or Cloud Foundry
  • Account: Your account ID
  • Root Account URL:
    • Cloud Foundry: "url" value of the service key (up to .com)
    • Neo: Use the "Consume Events" field from the Endpoints (up to .com)

If you want to use ANS and Java Logs in Neo, you can use one the root URLs for Neo. The actual distinction happens in the end-point configuration. 

 

Input Values for SAP Business Technology Platform

For SAP Business Technology Platform the input values for the end-point depend on the environment and the data you want to collect. For SAP Business Technology Platform on Cloud Foundry, only Alert Notification Service events can be collected. For Neo, you can collect ANS events as well as java logs. Since the root URL between ANS and java log differs, you have to create two endpoints if you want to collect both types of data in Neo.

End-point for Cloud Foundry

  • Global:
    • API Type: Alert Notifications
    • API Root URL: "url" value of the service key (up to .com)
  • Authentication:
    • Type: OAUTH
    • OAuth URL: "oauth_url" of the service key
    • Client ID: "client_id" of the service key
    • Client Secret: "client_secret" of the service key

End-points for Neo

If you want to collect alert notifications: 

  • Global:
    • API Type: Alert Notifications
    • API Root URL: Use the "Consume Events" field from the Endpoints (up to .com)
  • Authentication:
    • Type: OAUTH
    • OAuth URL: OAuth Token from Endpoints
    • Client ID: Client ID of the OAuth client
    • Client Secret: copy the value is the process of creating the OAuth client

If you want to collect java logs:

  • Global: 
    • API Type: Application Exceptions and Performance / Java Monitoring
    • API Root URL: Root URL by location
  • Authentication:
    • Type: BASICAUTH
    • User: User
    • Password: Password 
 

You need the following end-points for the monitoring categories:

  • SAP Business Technology Platform Alert Notifications: 'Alert Notifications' end-point
  • SAP Business Technology Platform Java Neo Application: 'Application Exceptions and Performance' end-point 

Advanced Integration Monitoring Setup

Available Monitoring Categories

For SAP Business Technology Platform different monitoring categories are available.

  • SAP BTP Alert Notifications: Collects events sent from the Alert Notification Service. Available for Neo and Cloud Foundry
  • SAP BTP Java Neo Application (f.k.a. SAP Cloud Platform): Collect exceptions in Java Logs for applications running in SAP Business Technology Platform. Only available for Neo 
 

Available Filter Options

You can collect all exceptions and events for SAP Business Technology Platform or you can filter them using the following parameters:

SAP BTP Alert Notification

  • Event Type: Type of the event (Find more information below)
  • Category: Alert, Exception or Notification
  • Subject: Alert notification short text
  • Severity: Error or Warning
  • Resource Name: Name of the resource causing the event

SAP BTP Java Neo Application

  • 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)
  • 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 
 

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 Cloud Platform Alert Notification → Administration → Catalog of Available Events
  • Catalog of Available Events for SAP Business Technology Platform (Neo): SAP Cloud Platform Alert Notification → SAP Business Technology Platform AlertNotification, Neo Environment → Administration → Catalog of Available Events

Available Metrics

For SAP Business Technology Platform the following metrics are collected:

SAP BTP Alert Notification

  • SAP BTP Alert Notifications: Indicates that new exceptions have been received via the Alert Notification Service
  • ANS Alerts (Stateful events): Indicates a new alert has been received via the Alert Notification Service

SAP Business Technology Platform Java Neo Application

  • SAP Cloud Platform exceptions: Indicates that new exceptions were collected during the last data collection interval 
 

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 
 

To prepare SAP Focused Run for the use of trace analysis, please follow this documentation. For more information on the E2E Trace functionality in SAP Focused Run please refer to 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.