SAP BTP, Neo environment - up to SAP Focused Run 3.0 FP01

This page describes the monitoring setup for SAP BTP, Neo environment with SAP Focused Run up to 3.0 FP01.

Setup Steps in SAP BTP, Neo environment

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

As a prerequisite you need to setup SAP BTP Alert Notifications, specifying which BTP technical events you want to subscribe (and therefore collect in Exception Monitoring). In case you already have subscriptions in place, you have to make sure that for all relevant technical event subscriptions in SAP BTP Alert Notifications, you add the Store Action (see also SAP Help of SAP Alert Notification for SAP BTP).

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

Setup Steps SAP Focused Run

Input Values for SAP BTP, Neo environment

  • Environment: Neo
  • Account: Your account ID
  • Root Account URL:
    • 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 BTP, Neo environment

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