Created on 04 August 2020
icon_unfollowing
Login to follow
elastic-apm-for-server

Elastic APM for Server

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded on 04 August 2020 by 
elastic-apm-for-server

Elastic APM for Server

Documentation
1.0.0

Getting started

To use this component, please start by creating a new Elastic account if no account yet. To do this, go to https://www.elastic.co/ and create a new account. After that, follow the on-screen instructions to create a new deployment. Finishing this step you can now click on "Open Kibana" and enter the credentials that are shown on the screen.

Kibana

Kibana is the UI/Dashboard where we can see all information that is collected.

In the Kibana Home page, there are multiple options. Start by clicking on the "Add APM" button. Ignore the "Install the APM agent" and go to section 2 "Configure the agent". Copy the secretToken and serverUrl for later use and click "Launch APM".

Elastic APM for Server component

Now that we have elastic configured we can use the credentials to setup our component. 

Start by referencing the component into the target application, by using the InitializeServer client action in the OnApplicationReady with the following parameters:

  • ServerUrl: The server URL that was provided by Elastic in the previous step 
  • ServiceName: Any name you want to identify the data. e.g "client" or "server"
  • ServiceVersion: Any version you want. e.g. "1.0"
  • SecretToken: The secret token that was provided by Elastic in the previous step
  • MetricsIntervalMS: Interval in milliseconds that should be used to send server metrics, such as CPU and memory usage. These metrics are sent automatically by the extension to Elastic


Publish the application and navigate throughout the application to generate traffic. 

Go to the Elastic Kibana and find APM. 

You should now see a page similar to this one, where "server" is the name added as ServiceName when initializing APM.


Clicking in the "server" we can now see data that was already collected:


And we can also see some metrics with CPU and System Memory usage:


Extra functionality

In addition, to automatically collect data, as we saw above, we can also trace specific requests. To do so, we have available the following actions:

- StartTransition: Starts tracking a request

- EndTransition: End tracking a request

The information collected using these actions can be also seen in Kibana dashboard and it's identified by the name passed in the StartTransaction action. In the image below we can see this working, under the name of "testapi"


Any questions please use the forum. 

As always, if you like it, rate it! :D



Support options
This asset is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from  who created this asset.
Dependencies
Elastic APM for Server has no dependencies.