CRM and CX Blogs by SAP
Stay up-to-date on the latest developments and product news about intelligent customer experience and CRM technologies through blog posts from SAP experts.
cancel
Showing results for 
Search instead for 
Did you mean: 
YannickRobin
Product and Topic Expert
Product and Topic Expert




With SAP Commerce Cloud, Dynatrace comes embedded as part of every subscription giving you access to a powerful set of tools to analyze and optimize the performance of your site. In this article we cover the useful features of Dynatrace and how you can leverage them to troubleshoot performance issues.


Contributors: yannick.robin , daniel.norberg, jdhickey

What is Dynatrace


Dynatrace is an Application Performance Monitoring (APM) tool to seamlessly bring together infrastructure, application performance, and digital experience monitoring into an all-in-one, automated solution that's powered by artificial intelligence. Dynatrace assists in driving performance results by providing development, operations, and business teams with a shared platform. Agents are deployed across all nodes in your SAP Commerce Cloud application, giving you insight into your services, JVMOS and database.

Dynatrace should not be used for the following:

Accessing Dynatrace


Dynatrace can be accessed via the Cloud Portal (https://portal.commerce.ondemand.com/ ). In Cloud Portal, first select your subscription, then select the environment you wish to analyze. On each environment page you will see a "Monitoring" section which has an icon to open up Dynatrace. For more details and other options for accessing Dynatrace, please see this page or watch the following video:

https://enable.cx.sap.com/media/How+to+Access+Dynatrace+-+SAP+Commerce+Cloud/1_5i0xt6zz

Data Retention


Before getting started you should be familiar with the data retention periods for Dynatrace. The SAP service data retention policy allows you to preserve critical information about your system performance, ensuring accurate readings and analysis. The standard Dynatrace data retention policy is as follows (measured in calendar days):

  • Code-level data: 10 days

  • Service-level data: 14 days


The transactional data storage capacity depends on the type of environment:

  • Stage/Development environments: 10 GB

  • Production environments: 100 GB


If you exceed this upper storage limit before the time periods expire, the system truncates older data by reducing its granularity to make space until the retention time periods expire. If needed, you can purchase extra storage capacity. Contact Support for more information.


For each time series, the data granularity decreases as the retention period expires: the periods of time for each data chunk get longer, reducing their precision. For example, if your data was originally sampled every 30 seconds, the archived data would start with the data sampled every minute, then every five minutes, then every hour, then every day.
Therefore, the system archives the data as follows:




  • 0–14 days: Data recorded every minute

  • 15–28 days: Data recorded every five minutes

  • 29–400 days: Data recorded every hour

  • 401 days–five years: Data recorded every 24 hours


Getting Started


Before proceeding it is recommended to review the features and capabilities in Dynatrace by consulting the Dynatrace section of the product documentation. You should ensure you're comfortable with:

  1. Setting up alerts (link). If you require alerts via email please contact SAP Support.

  2. Understanding service flows (link).

  3. Viewing existing dashboards and creating your own (link).




Troubleshooting Scenarios


In this section we'll walk you through some common problems and how you might go about using Dynatrace to find a resolution.

Website feels slow








Option #1

  1. Click on the "Problems" in the sidebar.

  2. Look for problems that have "response time degradation".

  3. Click on the problem and analyze findings.









Option #2

  1. Once you have resolved all the problems, click on the "Hosts" option in the sidebar.

  2. Select one of the hosts.

  3. Review any problems and repeat with remaining hosts.










Heavy Load on the Database








Option #1

  1. Click on the "Diagnostics Tools" option in the sidebar.

  2. Select "Top database statements".

  3. Select the time period with the high database load.

  4. Find the statement causing high execution and click on the "..." icon.

  5. In the popup select "service backtrace" to identify which service executed the query.








Option #2

  1. Click on the "Databases" option in the sidebar.

  2. Select your database.

  3. Adjust your timeframe to when the issue occurred and select the item from "Hotspots" section.

  4. Find the statement causing high execution and click on the "..." icon.

  5. In the popup select "service backtrace" to identify which service executed the query.









Specific Page is Failing



  1. Click on the "Transactions and services" option in the sidebar.

  2. Select your storefront service.

  3. Under the "Requests" section, select either "Response Time" or "Failure Rate" options.

  4. In the "Filtered by" box, add a new option for "web request URL" and set the value to your page (e.g. /sale) and look for high response and/or failures.

  5. Find the statement causing high execution and click on the "..." icon.

  6. In the popup select "service backtrace" to identify which service executed the query.

  7. Alternatively in the popup you can select "Method Hotspots" and filter on particular method calls (e.g. "Populator").









Random Users are Facing Failures with a Feature



  1. Click on the "Diagnostics tools" option in the left sidebar.

  2. Click "Exception Analysis".

  3. Filter on the request that is failing (e.g. /cart/add).

  4. Select the most interesting exceptions from the list.

  5. Click "go to exception details" button to get more details. Alternatively you can select the "..." item and view the PurePath or Service Backtrace options to identify the root cause.













Analyzing CPU



  1. Click on Diagnostic tools.

  2. Click on CPU Analysis.

  3. Under the "Process Groups" search by the Service you want to analyze (e.g. tomcat accstorefront-* ) and select from the list.

  4. Select yacceleratorstorefront.

  5. Click on Service request CPU > Show code level.

  6. Filtered by thread state: code execution.












Display Top Pages



  1. Click on Transactions & services.

  2. In the "Filtered By" box select "Process Group" and then choose the Service you want to analyze (e.g tomcat accstorefront-* ).

  3. In this example we're looking at the storefront, so we would select the name of the storefront extension (e.g. yacceleratorstorefront).

  4. Under the "Dynamic web requests" section of the page select any of the following:

    1. Click on Response time tab to get the top pages per contribution of time.

    2. Click on CPU tab to get the top pages per contribution of CPU.

    3. Click on Throughput tab to get the top pages per execution.




How to Identify Hotspots



  1. Perform the same steps as in the "Display top pages" section above.

  2. Update the duration of the analysis (from 5 to 15 min).

  3. Click on View method hotspots.


How to Download Logs


Although using Kibana is the recommended option for viewing centralized logs, the following is an option.

Currently only standard analytics of logs is available. This allows on-demand views of single log files for the past 7 days (limited to 500MB). This service is free and available to all customers.



  1. Click on Logs option in the sidebar.

  2. Select Kubernetes node containing the service.

  3. Select process (ex: tomcat accstorefont-*).

  4. Click on Download log files.








How to Analyze Threads


Thread dumps aren't required as Dynatrace supports continual thread analysis. To view the analysis, do the following:

  1. Click the Diagnostic Tools option from the sidebar.

  2. Select CPU Analysis.

  3. Search and find the process group (e.g. tomcat backgroundprocessing-*) you're looking for.

  4. Click on the "..." under the Actions column and select Threads.

  5. Select the timeline you want to analyze.

  6. Select the thread group to dig deeper into.

  7. Find the thread to analyze, click on the "..." under the Actions column and select Method Hotspots.













Exporting Data from Dynatrace


If you're looking to export data from Dynatrace via Application Programming Interface (APIs), unfortunately this is not a feature that is available. You are free to download data where the option presents itself in dynatrace (e.g. logs), otherwise you need to use Dynatrace for analyzing the performance of your SAP Commerce Cloud solution.







Conclusion


You should now have a high level overview of how to use Dynatrace. If you're looking to improve the performance of your site feel free contact SAP Expert Services.



1 Comment