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:
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