You are reading the documentation for an outdated Corteza release. 2023.9 is the latest stable Corteza release.

Route Profiler

The Integration gateway route profiler simplifies the development and troubleshooting process by allowing you to inspect particular requests in a detailed manner. Besides development, the profiler can be used to benchmark system performance to help determine potential bottlenecks or to get the general idea of what tye system is capable of.

The profiler was designed in a way that it can be used as a development and debugging tool or as a dashboard to glance over incoming requests.

The profiling results and aggregating stats do not get persisted to the store, so any server restart will restart the profiler itself and consequently remove the gateway requests gathered earlier.

You can use these benchmarks to determine if you will need to perform some system scaling strategy.

Enabling the Profiler

There are two ways to use the Integration gateway profiler:
  • enabled globally (APIGW_PROFILER_GLOBAL .env variable)

  • enabled specifically per-route (by using profiler prefilter)

The profiler itself is enabled by default, but the global option is disabled, so there will be no requests on the profiler page apart from those that already exist in the Integration gateway and have a profiler prefilter added and enabled.

Configuring The Route Profiler

In order for the profiler to include an integration gateway route, you must explicitly enable it by configuring the profiler prefilter. To add the profiler prefilter to an integration gateway endpoint click on the add filter and select the "profiler" from the dropdown list.

The prefilters are applied in the same order they are defined in, meaning, the profiler applies after all other prefilters defined before it execute. There is no filter sorting (via drag-drop functionality), so the only way for now it is to remove the other filters and create them in the fashionable order.

Annotated image

In the configuration modal window make sure the enabled option is checked and click on the save & close button.

Annotated image

When the profiler prefilter is added you will see a new requests list at the bottom of the page.

Annotated image

Profiling Specific Routes

To profile a specific route open up the route and scroll to the bottom of the page. The requests list shows all HTTP requests for the particular integration gateway route which ocurred after the profiler prefilter has been added.

Annotated image

To inspect the details of a particular request, click on the edit icon at the end of the request entry.

Annotated image

At the very top of the page you see the general information, such as the request ID, HTTP method, response status code, and duration.

Annotated image

Next up is the list of request headers provided with with the HTTP request.

Annotated image

Lastly the raw request payload provided with the HTTP request.

Annotated image

Profiling the System

To see general system performance we offer a system-wide profiler view. Navigate to system  integration gateway and click on the profiler button in the top right corner.

Annotated image

A new screen appears showing you all registered integration gateway routes (only routes with a profiler prefilter are displayed) along with their statistics such as average request times and payload size.

Annotated image

To inspect requests for a particular route, either click on the edit icon next to the integration gateway route or follow the instructions provided above.

Annotated image

When you inspect a particular integration gateway route, a list of all logged requests is shown.

Annotated image