Contact Us

Setup for SAP BTP, Neo environment

This page explains how to connect SAP BTP, Neo environment to SAP Cloud ALM.

Currently the following monitoring application are supported for custom built applications SAP BTP, Neo environment:

Prerequisites

Please make sure to fulfill the following prerequisites:

  • The application you want to monitor is a custom Java application deployed on the SAP BTP, Neo subaccount. You can find this application in the SAP BTP Neo subaccount under Applications > Java Applications
  • You need a user with administrator authorizations in the sub-account in SAP BTP, Neo environment in which the custom Java application is deployed

Setup Steps in SAP BTP, Neo environment

Determine Root URL

The API Root URL for SAP Business Technology Platform depends on the data center in which your account is hosted. 

  1. Check the region of your sub-account in SAP BTP Cockpit.
    1. You find it either on the sub-account card on your global account page in the field "Region"
    2. Or in the SAP Cloud ALM "Landscape Management" application in the service property "BTP Landscape ID"
  2. Find you region 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 
  3. Note down the host for your region.
  4. Build your root URLs, e.g. If your host is us1.hana.ondemand.com
    1. The Root URL for Exception Monitoring and Real User Monitoring is https://publicapingplog.us1.hana.ondemand.com
    2. The Root URL for Health Monitoring is https://api.us1.hana.ondemand.com

Create API Client for Java Application Monitoring

To connect to SAP Business Technology Platform to collect Java application monitoring data you need to create the correct API client in the sub-account.

  1. Log on to SAP BTP Cockpit and navigate to the sub-account with the Java application that you want to collect logs for
  2. Navigate to Security > OAuth
  3. Go to the tab "Platform API"
  4. Click on "Create API Client"
  5. Add the following authorizations to the client:
    1. Under "Exception and Tracing API"
      1. Read Exception Logs
      2. Read End-to-End Traces
    2. Under "Monitoring Service"
      1. Read Monitoring Data
    3. Under "Lifecycle Management"
      1. "Read Applications"
  6. Click "Save"
  7. Save the client ID and the client secret for later use!

Turn on Performance Data Collection for SAP Cloud Portal Service

If you want to collect monitoring data for Real User Monitoring you have to activate the performance data collection for the SAP Fiori Launchpad

  1. Log on to SAP BTP Cockpit and navigate to the sub-account with the Java application that you want to collect performance data
  2. Navigate to Services
  3. Search for the "Cloud Portal Service"
  4. Click on the tile
  5. Under "Take Action" click on "Go to Service"
  6. In the new application go to "Site Directory"
  7. Click "Edit" in the Fiori Launchpad Portal (FLP) page you want to activate Real User Monitoring for (e.g. defaultsite)
  8. In the "Fiori Configuration Cockpit", select "Settings" from the side navigation menu.
  9. Click "Edit" at the bottom right side of the screen
  10. Under "System Settings" find "Collect Performance Data"
  11. Switch it to "YES"
  12. Save your changes

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 

Create Endpoint in SAP Cloud ALM

Create Endpoint for Exception Monitoring

  1. Open the Landscape Management application from the launchpad
  2. Select your SAP BTP, Neo environment service
  3. Press the > button at the end of the line
  4. On the tab "Endpoints" press the Add button to create a new end-point
  5. Enter a description
  6. Use Case: Choose "Exception Monitoring"
  7. Root URL: https://publicapingplog.<host of your region>
  8. Authentication Type: OAuth2ClientCredentials (all fields are mandatory)
    1. Client ID: Client ID of the API client
    2. Client Secret: Client secret of the API client
    3. Token Service URL: https://api.<host for your region>/oauth2/apitoken/v1
    4. Token Service User*: Client ID of the API client
    5. Token Service Password*: Client secret of the API client
  9. Save the endpoint

* Please note that the API Client ID and password must be added also to the Token Service user and password for the Exception Monitoring endpoint.

Create Endpoint for Real User Monitoring

  1. Open the Landscape Management application from the launchpad
  2. Select your SAP BTP, Neo environment service
  3. Press the > button at the end of the line
  4. On the tab "Endpoints" press the Add button to create a new end-point
  5. Enter a description
  6. Use Case: Choose "Real User Monitoring"
  7. Root URL: https://publicapingplog.<host of your region>
  8. Authentication Type: OAuth2ClientCredentials
    1. Client ID: Client ID of the API client
    2. Client Secret: Client secret of the API client
    3. Token Service URL: https://api.<host for your region>/oauth2/apitoken/v1 
  9. Save the endpoint

Create Endpoint for Health Monitoring

  1. Open the Landscape Management application from the launchpad
  2. Select your SAP BTP, Neo environment service
  3. Press the > button at the end of the line
  4. On the tab "Endpoints" press the Add button to create a new end-point
  5. Enter a description
  6. Use Case: Choose "Health Monitoring"
  7. Root URL: https://api.<host of your region>
  8. Authentication Type: OAuth2ClientCredentials
    1. Client ID: Client ID of the API client
    2. Client Secret: Client secret of the API client
    3. Token Service URL: https://api.<host for your region>/oauth2/apitoken/v1 
  9. Save the endpoint

Next Steps

After creating the endpoint in SAP Cloud ALM, you have to perform the following steps to activate the monitoring use-cases: