In this blog, you will discover how the combination of SAP Cloud Platform and Dynatrace helps you boost your development and makes monitoring your applications easier.
We start with a basic introduction of SAP Cloud Platform, followed by what Dynatrace is exactly. You will learn more about how good monitoring creates a great experience for end-users and developers. In the next first few paragraphs, you will find out what products we are working with.
If you would like to read more about the business benefits of this solution and our partnership with Dynatrace, download the brochure:
What is SAP Cloud Platform (SCP)?
In case you have not heard of SCP before, we summarize it as a cloud platform as a service offered by SAP with lots of assets and services that simplify and boost your development process. The services consist of both development and business services. For example, one of the services that is often used and helps developers is the “SAP Web IDE”. It is an online IDE that is used to build different use cases including SAPUI5 apps. Another service is one to manage transports from one environment to another. Additionally, there are services that help in terms of business logic. Some frequently used cases are Intelligent Robotic Process Automation, IoT, Workflow, etc. SAP Cloud Platform is not only used to host apps, but also to develop them quickly.
SAP Cloud Platform can be hosted on different cloud providers like SAP itself, but also AWS, Google Cloud, Microsoft Azure and Alibaba Cloud. Within SCP there are several environments, the two most prominent ones are NEO and Cloud Foundry. In the image below you can get an idea on the landscape of the platform.
In short: SAP Cloud Platform Use Cases
There are several things that you can do with the cloud platform. These are divided into 4 main groups:
It is recommended to build extensions using SCP if you want to add additional data or new functionality to your existing (SAP) systems. SCP makes it really easy to connect securely to your SAP S/4HANA or SuccessFactors systems and extend them.
User experience is very important, at Amista we usually use SAP Fiori to provide a consistent look and feel for the end-users. Extensions on SCP allow us to combine data from different systems and provide you with new and clear insights.
SAP Cloud Platform has a library of pre-built connectors that allow you to connect several SAP and non-SAP systems. If the existing connectors do not provide the functionality you need out of the box, SAP Cloud Platform Integration allows you to build your own connectors as well.
3. Intelligent Business Processes
It consists of services like Intelligent Robotic Process Automation, Workflow and Business Rules. These help you boost your projects made on SAP Cloud Platform.
4. Data-driven Insights
SAP Cloud Platform has made it easy to get data from several systems and to create insightful analytical reports. Again, you can use a combination of SAP and non-SAP systems.
The Cloud & Traditional Monitoring
When applications run in cloud environments a lot of pieces should be connected in order to make it work. Think about the following aspects: Networks, Infrastructures, Databases, Web servers… If one of these components fail, issues will start to occur in the app. Cloud usually arises high expectations from end-users. If a user has a positive working experience with your app, it will likely drive loyalty.
Since cloud applications have gotten more complex, it is increasingly more difficult for traditional monitoring tools to clearly display what is going on. Those tools usually monitor everything separately, without looking at the surrounding systems and experiences. This type of traditional legacy monitoring is a very daunting task since everything is usually set up individually.
Dynatrace, The All-in-one Platform!
Dynatrace takes a different approach to monitoring. They manage to provide high fidelity data and end-to-end mapping. The end-to-end mapping is done automatically and shows you all the connections between different components. This is displayed live in the Smartscape. Using Artificial Intelligence, the platform intends to give clear answers and actions to the problems that it finds in all the different components behind your application and within your application itself.
Dynatrace uses their OneAgent installed on the host or injected in the applications to monitor everything from CPU and memory usage to code level tracing.
Setup Dynatrace on SAP Cloud Platform
In order to setup Dynatrace on our SAP Cloud Platform Cloud Foundry (SCP CF) environment, we execute a few simple steps. In SCP CF we configure a User-Provided Service that we connect to our app. For this, we need only two elements, our Dynatrace Environment ID and an API Token. The Environment ID can be found in the URL of your Dynatrace Instance. For example, if this is your Dynatrace URL: https://mqs76652.live.dynatrace.com/, the Environment ID would be ‘mqs76652’. The API Token can be found in Dynatrace under “Deploy Dynatrace” => “Set up PaaS integration”.
We created a SAPUI5 Fiori application called “The Beer Shop” to show the capabilities of Dynatrace monitoring on an SAP landscape. The goals here were the following:
- Demo scenario for S/4HANA extension using SAP Cloud Platform (CF)
- Avoid that every user action generates traffic on S/4HANA
- Understand how users are interacting with the Application
- Ability to quickly pinpoint potential issues or changes (End-to-End)
For the setup of Dynatrace, the integration was done with SCP using a PaaS integration token as explained earlier in this blog. Secondly, the One-Agent was installed on the S/4 and Cloud Connector servers in AWS. Lastly, agentless (RUM – Real User Monitoring) was injected in the SAPUI5 Code on SCP.
Once this setup is done and all our systems and applications are running, we can see a general overview in Dynatrace using the Smartscape topology. This topology is automatically created in Dynatrace. Here we see our three data centers for our S/4HANA, NodeJS apps and SAPUI5 app. If we follow the topology down to more detail, we see the hosts, processes, services and applications. The connections are shown so that it is clearly visible what talks to what and which elements interact together.
Next to that, Dynatrace allows us to replay the exact session of a user. This way it is easier to see what chain of actions have caused bugs to arise or what has caused for example frustrating actions, like clicking repeatedly on a button. We do this by going to our application “The Beer Shop” in Dynatrace. In the application overview, we see a performance analysis and user behavior of the selected timeslot. In the right top corner, we find a button to navigate to our user sessions called “Analyze user sessions”.
Here we see a list of users that have accessed the application in the selected timeslot. Some users will be identifiable based on the login information in the application. In the list we also see an approximate location, how long did the user use the app and how many errors did they encounter. When selecting a user from the list, the session can be replayed. This means we see exactly what the user did and at what speed. This provides useful insights into the usability of the application.
Another option within the application overview is to see the service flow of the user action done in the app. Here we see the direct call to services used by the app, but also the call potentially done by services in the backend applications. For example, in the image below you see that the app calls the odata-server to get a list of beers, but therefore the odata-server first does a call to two other services. These insights help you during development to prevent unnecessary or unwanted calls.
Next, let us have a look at when we introduce an error due to a faulty deployment. As you see, we now have two errors. The first one is being generated by the BeerShopAgent. This is our frontend application. When we click on the problem we can analyze the error. We see that the synthetic monitor that is running, is facing an issue. When the monitor runs through the application steps that have been set up, it cannot find an entry it normally does. We can see the screenshots taken by the monitor and see that no data is being loaded. In this case, it is connected to the other problem we see. If we look at the root cause, we notice that it indicates there was a new deployment to the inventory application. Since the deployment we see that there is a 100% service failure rate, whereas before it was 0%.
When we have a look at the second problem, we detect that not only did the synthetic monitors have issues but also the real users. When we navigate to the inventory app from the problem view, we examine the details of the timeline. Two key requests are being made. One of them is to the S/4 HANA system. Navigating to the details of the failures of that call reveals the following: at the bottom of the screenshot we see that Dynatrace suggests that the failure likely due to an HTTP 401 (Unauthorized) response from a service call. The reason it says unmonitored hots is because there is no OneAgent installed on the SAP Cloud Connector. But we can still see some details of the unmonitored host. When looking into those details we notify that the SAP Cloud Connector gives an error saying the login has failed. Going back to the original detail screen of our problem, we detect that the password was reset and changed in the list of deployments. This explains where the error is coming from. This way, we conclude that the software really does help when developing by logging the errors.
Use Dynatrace in your development flow
Dynatrace can also be integrated into your CI/CD (continuous integration / continuous development) flow. Connecting it to your pipeline allows Dynatrace to help validate your commits and deployments. When doing manual checks after every deployment, it can turn into a lengthy process because sometimes it is unknown if for example a slowdown is due to this or a previous deployment. Dynatrace gives you an easy overview and helps you to detect these kinds of problems. Using Dynatrace will help you cut down the time for manual approval from 30 to 60 minutes, down to about 1 minute.
Start monitoring your application on SAP Cloud Platform now!
Try Dynatrace without the need for a manual configuration setup.
With your 15-day free trial, the future of digital performance starts here. Contact us for more info and get your free trial!
By Jan De Roeck, Technical Consultant