elastic-rum
Reactive icon

Elastic RUM

Stable version 2.0.0 (Compatible with OutSystems 11)
Uploaded
 on 12 September 2024
 by 
3.0
 (1 rating)
elastic-rum

Elastic RUM

Documentation
2.0.0

Incorporate the Elastic_Initialize Data action either into your application's theme or the OnApplicationReady client action. For reference, the demo application includes this data action in the OnApplicationReady client action.


How to configure Elastic

Firstly you need to sign up on the Elastic website. After it you should create a deployment.

Then go to Add Integrations - APM

Search for RUM (JS), and copy the serverURL.

Configure the APM integration, by pasting the serverURL in the General settings, and setting the host to 0.0.0.0:8200. 


Now, data is ready to enter Elastic. Important: APM sends a lot of data to Elastic. Make your your lifecycle policies are in order, to make sure that your deployment does not fill up with data. 


How to configure OutSystems

Use the Elastic_Initialize client action. This action requires the following parameters:

  • ServerUrl
    • This parameter uses the URL made before. In this documentation, the URL is http://7a05313...., seen above..
  • Environment
    • In order to be able to filter environments in Elastic, it is required to provide the environment name to the client action. Make sure that the names for these environments are identical throughout the application!
  • ServiceName
    • The name of your service.
  • ServiceVersion
    • Your version of the application. This is not something hardcoded, but say you have a new implementation, you might want to change your service version, in order to better understand the impact of your new implementations.
  • PageName
    • The page name you want to track. If you want to track all pages of the application, provide the page name of the homepage.
  • BreakoutMetrics
    • Enable or disable the tracking of the breakdown metrics of the transactions. Setting this Boolean to True sends a lot more information to Elastic, so use with caution.


You can implement the Elastic_Initialze client action in the OnApplicationReady client action, or call this action in the theme of your applications.

 


1.0.0

About Elastic APM

Elastic static consists of several components. For the usage of Elastic APM, there are four essential components: 

  1. APM Agents

    APM agents are open source libraries written in the same language as your service. You may only need one, or you might use all of them. They instrument your code and collect performance data and errors at runtime. This data is buffered for a short period and sent on to APM Server.

  2. APM Server
    APM Server is an open source application that receives performance data from your APM agents. It’s a separate component by design, which helps keep the agents light, prevents certain security risks, and improves compatibility across the Elastic Stack.

  3. Elasticsearch

    Elasticsearch is a highly scalable open-source full-text search and analytics engine. It allows you to store, search, and analyze large volumes of data quickly and in near real time. Elasticsearch is used to store APM performance metrics and make use of its aggregations.

  4. Kibana

    Kibana is an open source analytics and visualization platform designed to work with Elasticsearch. You use Kibana to search, view, and interact with data stored in Elasticsearch.


How to Use

There are 2 ways to use this component in your OutSystems Traditional Web application:

  1. ElasticRUM_Initialize action - add this action to the preparation of the pages to monitor, or if to monitor all pages of an application, add to the preparation of the layout. Only available to use in dotNET based applications.

  2. ElasticRUM_Initialize block - add this block to the top most part of the pages to monitor, or if to monitor all pages of an application, add to top of the layout. 

Both options require 3 parameters from Elastic: server URL, service name, and service version:

(see below how to configure and obtain these values)


How to configure

Firstly you need to sign up on elastic website. After it you should create a deployment.

Then enter in newly created deployment and launch all the services that you need.
For our purposes we need only pack of 3 minimal resources: Elasticsearch, Kibana, and APM

Your interface should look like the image below:

 I.e. : Elasticsearch, Kibana, APM. Make sure that status each of them is ‘green’ and you don’t see any errors. If this is not the case, the easiest option is to contact Elastic Support or to try to restart the services. In the limit, reinstall these components in your cloud.

Then, go to the security page and click on “Reset Password” button.

Copy your password. Get back to the main page with services. Now you can launch each of them. 

Access to Kibana, with the password that you've just reset and copied and the username "elastic".
In Kibana you will need to add support of your APM agent in the cloud, and for that just click "Add APM".

After clicking on “Add APM” and follow the instructions. Then click on RUM tab and copy your own APM serverUrl.
Click on “Launch APM”: