This documentation is for WSO2 Enterprise Integrator version 6.2.0 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Enabling statistics and tracing for the artifacts

Follow the steps below to enable statistics and tracing for the REST API:

  1. Go to the management console of the ESB profile.
  2. On the Main tab of the management console, go to Manage -> Service Bus and click APIs. The Deployed APIs screen appears, and you will see the HealthcareAPI listed as follows:
  3. To enable the collection of mediation statistics for the REST API, click Enable Statistics.
  4. To enable mediation tracing for the REST API, click Enable Tracing.

    Note

    Note that  that it is not recommended to enable enable tracing in  in production environments as it generates a large number of events that reduces the performance of the analytics profile. Therefore, tracing should only be enabled in development environments.

Follow the steps below to enable statistics for the endpoints:

  1. On the Main tab of the management console, go to Manage -> Service Bus, and click Endpoints. The Manage Endpoints screen appears, and you will see several endpoints listed.
  2. To enable the collection of mediation statistics for the endpoints, click Enable Statistics for each endpoint.

Sending a message

Now that you have the artifacts deployed and configured for statistics monitoring, send a request to the ESB profile.

  1. Create a JSON file called request.json with the following request payload.

    Code Block
    {
    "name": "John Doe",
    "dob": "1940-03-19",
    "ssn": "234-23-525",
    "address": "California",
    "phone": "8770586755",
    "email": "johndoe@gmail.com",
    "doctor": "thomas collins",
    "hospital": "grand oak community hospital",
    "cardNo": "7844481124110331",
    "appointment_date": "2017-04-02"
    }
  2. Open a command line terminal and execute the following command from the location where you save the request.json file:

    curl -v -X POST --data @request.json http://localhost:8280/healthcare/categories/surgery/reserve --header "Content-Type:application/json"

    If the message mediation is successful, you will see the following response:

    Code Block
    {"appointmentNo":1,
    "doctorName":"thomas collins",
    "patient":"John Doe",
    "actualFee":7000.0,
    "discount":20,
    "discounted":5600.0,
    "paymentID":"e1a72a33-31f2-46dc-ae7d-a14a486efc00",
    "status":"Settled"}

Analyze the mediation statistics

Now, let's analyze the statistics generated from the message mediation:

  1. In a new browser window or tab, open  https://localhost:9444/carbon/  and log into the Analytics management console using admin for both the username and password.
  2. On the Main tab, click Analytics Dashboard and log in using admin for both the username and password. You will then see the following:

  3. Click View to open the EI-Analytics Dashboard. The OVERVIEW page is displayed by default. 

  4. To view statistics for the REST API, click API on the left navigator and search for HealthcareAPI. For more information on analyzing statistics displayed on this page, see Analyzing Statistics for REST APIs.

  5. To view statistics for an endpoint, click ENDPOINT on the left navigator and search for the required endpoint. You can view statistics for the following endpoints on this page:
    • GrandOaksEP
    • ChannelingFeeEP
    • SettlePaymentEP
  6.  For more information on analyzing statistics displayed on this page, see Analyzing Statistics for Endpoints.

    You have now explored how to use EI-Analytics dashboard.