top of page
  • Writer's pictureStephan Zimmer

Monitoring Query Performance of Retool Applications

Having taken over a large Retool application developed by a host of web developers, we were asked to provide insight on how to optimize the overall sluggish experience of the clients' application. The app contains some 100+ queries and components, so in order to avoid having to search for the proverbial needle in the haystack, we approached the problem using data. Each query in Retool has a member called .queryRunTime, which contains both the runtime of the query consumed by the Backend as well as the Frontend.

This info is readily available in the Editor mode by exploring the individual queries, but the client needed to monitor the app in a production setting. In each app the client wished to monitor, we added the following to each query's onSuccess trigger:

recordQueryPerformance.trigger({additionalScope: { lastQuery : self, lastQueryTime : self.queryRunTime }});

The recordQueryPerformance then consists of a REST query that itself is being dispatched to a Retool Workflow (see below).

The workflow registers a Webhook within the client's retool instance of the form<instance_id>/startTrigger?workflowApiKey=<API_KEY>

The startTrigger.value object then contains all the relevant data that we wish to record.

Given the data recorded in admin_query_perf we can now either consume the performance data in a BI tool of our choosing or create a Dashboard in Retool. Let's explore the latter. The outcome is going to look like the screenshot below:

We provide clients with solutions to their data and automation challenges. For more information, check our website and contact us to discuss more.

31 views0 comments


Post: Blog2 Post
bottom of page