Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Hybris with AppDynamics - Customization and setup

It is possible to incorporate AppDynamics into SAP Hybris in order to create a seamless customer experience across multiple channels using Browser and Mobile Real-User Monitoring (RUM).

 

You can use the following capabilities:

 

As SAP Hybris is extremely customizable, it might be that you can't implement all of the configurations presented here.

 

AppDynamics Setup

 

Java Agent Installation

 

Execute the following steps to add the Java APM agent to your Hybris environment.

 

Step 1: Add the -javaagent parameter to your local.properties file

 

In the Hybris home directory, open the ${HYBRIS_DIR}/config/local.properties file in a text editor and add the -javaagent parameter to the tomcat general options. 

 

Example:

tomcat.generaloptions=<your existing settings> -javaagent:${HYBRIS_BIN_DIR}/appdynamics/javaagent.jar

 

You can add the agent into the Hybris bin directory - as suggested above - or at any other location on your machine serving SAP Hybris. 

 

 

Step 2: Configure the Java Agent 

 

Configuring the AppDynamics Java Agent for SAP Hybris is no different than any other Java application. Follow the instructions on how to install the java agent.

 

Note: If the Hybris layer is separated into nodes serving the back office and the storefront, add this information to your tier and node configuration. For example, you can name your tiers hybris-backoffice and hybris-frontstore.

 

 

Step 3: Build and restart the Hybris server

 

  1. Load the ant environment variables (. ./setantenv.sh)
  2. Run the server target. (ant server)
  3. Restart the Hybris server. (./hybrisserver stop ; ./hybrisserver start

Full Example:

[hybris/bin/platform]# . ./setantenv.sh
[hybris/bin/platform]# ant server
[hybris/bin/platform]# ./hybrisserver stop
[hybris/bin/platform]# ./hybrisserver start

 

The execution of these commands may depend on your setup and deployment strategy.

 

After restarting the Hybris server, AppDynamics will start to monitor the application. After a few minutes of load on the Hybris system, you will see your Hybris environment represented on the AppDynamics flow map.

 

 

flow.jpeg

 

 

Another option, for those who can't run ant server or who want quick results, is to add wrapper.java.additional.<number>=-javaagent:${HYBRIS_BIN_DIR}/appdynamics/javaagent.jar to the hybris/bin/platform/tomcat/conf/wrapper.conf, to your ${HYBRIS_DIR}/config/local.properties file, where the <number> is unused in the existing configuration.

 

Note: This is only a temporary solution and will be overwritten after a new Hybris deployment.

 

 

Database Monitoring

 

If SAP Hybris is connected to a database supported by AppDynamics (see here for a full list of supported databases), follow the instructions for Database Monitoring.

 

Server Monitoring

 

For the monitoring of the underlying infrastructure, follow the instructions for Server Monitoring.

 

Browser Real-User Monitoring

 

To instrument SAP Hybris for Browser RUM, insert the JavaScript agent file on the server side into an HTML template, that is returned to the end-user as part of the normal process it follows.

 

You can choose between two procedures:

  • If your front end layer consists of Apache or Nginx web servers, you can use the Container Assisted Injection.
  • Or you can follow the instructions for the Manual Injection. If the given SAP Hybris installation is based on the yacceleratorstorefront you can inject the adrum.js in the analytics.tag file.

Example:

<%@ tag body-content="empty" trimDirectiveWhitespaces="true" %>
<%@ taglib prefix="analytics" tagdir="/WEB-INF/tags/shared/analytics" %>
<script>window['adrum-start-time'] = new Date().getTime();</script>
<script type="text/javascript" src="${sharedResourcePath}/js/adrum.js"></script>
<script type="text/javascript" src="${sharedResourcePath}/js/analyticsmediator.js"></script>
<analytics:googleAnalytics/>
<analytics:jirafe/>

 

Note: Manual injection requires a new build and a restart of the Hybris server. 

 

Having added the adrum.js to your Hybris environment will allow you to monitor how the end-user perceives the performance of your e-commerce platform. Use Session Monitoring to see how users are navigating through your online store.

 

 

Application Analytics

 

Install the Agent-Side Components for Application Analytics to add transactions as well as log analytics for the given SAP Hybris environment.

 

 

Related Links:

Version history
Revision #:
10 of 10
Last update:
‎06-12-2017 01:05 PM
Updated by:
 
Labels (1)