OutSystems collects metrics of how applications are performing, to allow you to monitor and troubleshoot runtime issues. This article describes what is collected and how.
What Happens when Using an Application?
When end-users are using an application, their actions originate requests to a server. Then the server processes those requests and sends back responses with the result. During this cycle, the Platform collects metrics to allow you to troubleshoot performance issues, for example.
The following picture shows the request-response cycle and the points where the Platform collects metrics.
- The client sends a request to the server due to an end-user action in the application;
- The request arrives to the server;
- The server starts sending the response, after executing the logic to process the request;
- The client starts receiving the response;
- The server finishes sending the response;
- The client receives the last byte of the response;
- The client finishes to render the response to the end-user.
The time spent on the client-side is measured by the Load Time (steps 4 to 7), that contains the following:
- Receiving the response;
- Rendering the screen.
This information is registered in the events called WebScreenClientExecuted.
Besides metrics, the WebScreenClientExecuted event contains further client-side details, like the user agent and the operating system. See all the information collected on the client.
The Platform computes the network time based on metrics collected on client and server sides, namely:
Network Duration = Client Duration - Client Load Time - Server Duration
When the application runs natively on a mobile device, the WebScreenClientExecuted event captures further network-related details, e. g. network type and mobile network carrier. Learn more about the network-related details collected by the Platform.
During the server-side execution (steps 2 to 5), the Platform collects metrics in a WebScreenServerExecuted event for:
- All executed queries;
- All executed consumed integration methods (SOAP, REST or SAP);
- All executed extension actions.
The rest of the server-side time is spent in acquiring the session, other application logic, and page render.
About Slow Calls
Besides the metrics listed above, the Platform also collects information about slow calls that were executed on the server.
A slow call occurs when the execution of a query exceeds a threshold (200ms by default).
In case the same call is executed multiple times in an action, e.g. happens inside a loop (For Each), the time considered is the accumulated time of all executions. For example, if the 'GetOrdersForCustomer' query is executed ten times, each call taking 30 milliseconds, then the total time spent executing that query is 300ms.
Read Metrics and Add Your Custom Metrics
OutSystems provides the PerformanceMonitoring API, that allows you to:
- Read metrics: fetch the metrics stored in the Platform database and build your own dashboard, for example;
- Add your custom metrics: add your own metrics to applications.
Learn more about the PerformanceMonitoring API.