-
Request for existing cases, user IDs, Portal navigation support and more
Request for existing cases, user IDs, Portal navigation support and more
The below image summarizes the observability with OpenTelemetry@SAP through SAP Cloud ALM for operations.
SAP built SAP SaaS applications as well as customer built SAP PaaS applications are instrumented with the same Data Collection Instrumentation Libraries, which produce monitoring data based on standard OpenTelemetry. Furthermore, SAP has defined certain OpenTelemtry extensions.
The data from SAP built applications is transferred by the Data Collector Runtime service (which is completely managed by SAP) to SAP Cloud ALM. The data from customer built applications is transferred directly to SAP Cloud ALM, where the Queueing is taking care to store the data in the SAP Cloud ALM database. In SAP Cloud ALM you have to switch-on the monitoring for the respective service per use case.
As OpenTelemetry follows an open standard inbound API's can be used to integrate non-SAP data providers with SAP Cloud ALM. OpenTelemetry enabled Outbound API's can be used to integrate non-SAP data consumers. Please check the following link to find more information about these SAP Cloud ALM Raw data APIs.
Additionally, it is possible to also transfer the data to a SAP Focused Run system, in case the customer himself or its service provider has a SAP Focused Run system in use.
The following applications are able to consume data provided by OpenTelemetry@SAP.
In this documentation we focus on, how you can instrument your custom-built application in SAP BTP, Cloud Foundry environment and SAP BTP, Kyma runtime with our Data Collection Instrumentation Libraries to monitor this in SAP Cloud ALM.
The graphic below depicts the high-level architecture of the OpenTelemetry data collection. In this simple scenario, we assume, that we want to monitor a full-stack application built on SAP BTP, Cloud Foundry environment or in SAP BTP, Kyma runtime. The front end consists of SAP UI5. The UI requests will be routed to the application backend via the Application Router. Here in our example, the application backend consists of three different microservices.
The numbers in the picture correspond to the sections described below.
Not all steps are required for all use cases.
The cloud application to be monitored may consist of several microservices and run on SAP BTP, Cloud Foundry environment and SAP BTP Kyma runtime. In order to execute the steps described below you need some development knowledge and deployment authorization in SAP BTP, Cloud Foundry environment and SAP BTP Kyma runtime.
The OTEL ALM Libraries are shipped by SAP Repository Based Shipment Channel (RSBC). Request the technical user name and password in the RBSC UI. Please also check the corresponding documentation for User Authentication, for a full documentation of the RBSC please see the RBSC documentation.
Required Java version:
Required library versions:
* only relevant for Integration Monitoring
For complete version history, please check the following Version Update for Data Collection Instrumentation Libraries (SAP Help).
For the Java OTEL ALM Libraries, an integration in the SAP CF Java build pack is available. In that case, no integration into the Maven build is required as the libraries are already included in the build pack itself. If you do not use the Java build pack, you have to include the library as a Maven dependency:
<repositories>
<repository>
<id>***your-artifactory-id***</id>
<url>https://73555000100200018064.mavensrv.base.repositories.cloud.sap</url>
</repository>
</repositories>
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>**your-artifactory-id**</id>
<username>***technical-user-name read from vault***</username>
<password>***password read from vault***</password>
</server>
</servers>
</settings>
Required library versions:
Additionally for Exception Monitoring:
For complete version history, please check the following Version Update for Data Collection Instrumentation Libraries (SAP Help).
In your .npmrc file, specify the credentials for the repository containing the OTEL ALM Libraries:
//73555000100200018064.npmsrv.cdn.repositories.cloud.sap/:_auth=<base64 encoded version of username:password>
The value for the _auth property is Base64 encoding of the combination of 'username:password' where the user name is the user name of the technical user. Respectively, the same holds for password.
Note - It is recommended to store the password in a vault and reference it in the settings, so that it can be read during build and pipeline deployment!
You can find a node.js implementation sample based on our guides as part of implementing Observability in a Full-Stack CAP Application following this SAP BTP Developer's Guide in Github.
You only need to perform the steps described in this section if you want to get the end-user response times to be displayed in Real User Monitoring.
As of now, the only offered frontend measurements come from SAP UI5. For this, we leverage the Front End Subrecords measurement provided by the UI5 framework. Currently, we only support "standalone" UI5 applications for front-end measurements.
To instrument your own application with Frontend measuring there are three steps:
The first point can be achieved with a simple meta tag in your root index.html of your UI5 application. We will send the beacon to the /fesr endpoint (Note: depending on your project and routing setup this may contain an application specific prefix like in this example):
<meta name="sap-ui-fesr" content="/<optional app-specific-prefix>/fesr">
Here, the prefix is /<optional app-specific-prefix> is an application specific prefix example. It may or may not be necessary in your case. The endpoint /fesr is mandatory.
Since your UI application will likely use a reverse proxy to communicate with your backend you need to configure the /fesr route to be routed to the specific endpoint which will be configured in the next step. Usually, this is done by a central approuter. You must configure your central approuter to route the /fesr routes:
{
"routes": [
{
"source": "^/fesr$",
"target": "/fesr",
"destination": "<destination pointing to your fesr receiver backend>",
"csrfProtection": false,
"authenticationType": "xsuaa"
}
]
}
Note that csrfProtection must be set to false.
Now, that UI5 is sending the FESR beacons to /fesr they need to be received and transmitted to SAP Cloud ALM. For this, you need to include both the FESR receiver library as well as the OpenTelemetry data collection instrumentation:
FESR Receiver
At least one Java (Spring Boot) application or one Node.js (express) application must exist acting as a handler for Front-end Statistical Records (FESR).
To configure the data collection instrumentation for backend services you only need the respective autoinstrumentation:
In order to export towards SAP Cloud ALM you have to setup the destination via OAuth based authentication.
modules:
- name: <your application srv module>
requires:
- name: <destination-service-name>
resources:
- name: <destination-service-name>
parameters:
service-plan: lite
service: destination
type: org.cloudfoundry.managed-service
apiVersion: services.cloud.sap.com/v1alpha1
kind: ServiceInstance
metadata:
name: <destination-name>
spec:
serviceOfferingName: destination
servicePlanName: lite
apiVersion: services.cloud.sap.com/v1alpha1
kind: ServiceBinding
metadata:
name: <destination-name>
spec:
serviceInstanceName: <destination-name>
apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
containers:
- env:
- name: KYMA_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SERVICE_BINDING_ROOT
value: /bindings
volumeMounts:
- mountPath: /bindings/destination
name: <destination-name>
readOnly: true
ports:
- containerPort: <port>
resources: {}
restartPolicy: Always
volumes:
- name: <destination-name>
secret:
defaultMode: 420
secretName: <destination-name>
The destination should look like this:
When clicking on button Check Connection you might receive http status code 404.
This concludes the configuration in your SAP BTP, afterwards you need to activate the respective use cases (see also next section).
In case you encounter problems using or setting up the Next Generation – Data Collection Infrastructure in SAP Cloud ALM, please report a case for a scenario using the following components:
Please select your SAP Cloud ALM tenant when reporting the case.