Help Center > > Best Practices> Managing E-Commerce Applications with APM

Managing E-Commerce Applications with APM

Updated at: Jan 16, 2019 GMT+08:00

The best practices for HUAWEI CLOUD APM guide you through how to connect APM to an application (a mobile phone e-commerce website here for example) and manage the application on APM. Brief information about the application is as follows:

  • This Java application is not deployed using JBoss and can be deployed on the SUSE 12 SP2 VM in JRE 1.8+.
  • The application contains five microservices. Each microservice contains one instance.
    • apigw: The API gateway is responsible for service authentication, flow control, and filtering.
    • product: Product management, including product query and purchase.
    • user: User management, including user login and user identity authentication during product purchase.
    • dao: The data persistence layer is responsible for requesting database operations.
    • Database service: MySQL databases.

The following process describes how you connect APM to the e-commerce application and use APM to manage the application.

Process

  1. Deploy the application on a Huawei ECS. Currently, APM supports only Huawei ECSs.
  2. Install ICAgent. ICAgent is the collection agent of APM. It collects topology and call chain data in real time. You need to install ICAgent on the ECS where the application is deployed.
  3. Modify application startup parameters to ensure that APM can monitor the application.
  4. Manage the application on APM, for example, view the application status in the topology view and get full insights into user experience through transactions.

Procedure

  1. Deploy the application on a Huawei ECS.

    1. Register a Huawei cloud account, top up your account, and purchase a Linux ECS. For details, see Purchasing and Logging In to a Linux ECS.

      To ensure application performance, select dual-core 4 GB or higher vCPU or memory specifications for a new ECS. The application supports only the SUSE 12 SP2 operating system. Set Public Image to SUSE Enterprise 12 SP2 64bit(40GB).

    2. Log in to the ECS, create an application directory, and go to the directory. The mall directory is used as an example.
    3. Download and install the JRE 1.8 version required by the application from the Oracle official website.
    4. Upload the application to the created mall directory and install it.

  2. Install ICAgent. For details, see Initial installation in Installing ICAgent of APM User Guide.
  3. Modify application startup parameters to ensure that the application can be monitored by APM.

    To modify the startup parameters of an application, add the following parameters to the application startup script:

    Parameter

    Description

    Example Value

    -javaagent

    JAR package that the collection probe depends on. The value is always /opt/oss/servicemgr/ICAgent/pinpoint/pinpoint-bootstrap.jar.

    /opt/oss/servicemgr/ICAgent/pinpoint/pinpoint-bootstrap.jar

    -Dapm_application

    Application name, which can be customized based on your application.

    vmall

    -Dapm_tier

    Application layer name, which is the name of the microservice consisting of the application.

    In this example, the microservice name is apigw, product, user, or dao.

    The application startup script before and after the modification is as follows:

    Before the modification:

    After the modification:

  4. Restart the application. Wait for about three minutes. Application data is displayed on the APM console.

    You can monitor applications and locate application exceptions on the Dashboard and Topology pages of the APM console. For details, see APM User Guide.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel