Retool Observability Improvements
We use sentry and see errors from our backend services. Sometimes it's tough to fully understand a stack trace without more context. We often want to know who encountered the error and where they were when it happened. In the context of retool these are {{current_user.email}}
and the app name + the query that triggered the error.
One quick way to improve this observability in retool is by modifying your resource to include a X-Retool-User header:
Then in Sentry you can see the X-Retool-User
header:
This answers the question of who
encountered the error across all existing queries and you can now reach out and ask for more information to help resolve their issue.
For the retool team, I think you can improve observability to answer the where
if you expose the following additional variables: {{current_app.name}}
and {{current_query.name}}
(similar to knowing a line number you can quickly get to).
In addition some other useful headers you can attach at the resource level are whether the resource is a staging one or a production one X-Retool-Resource-Env
or the domain of the retool instance X-Retool-Host
:
An even more powerful setup would be to connect LogRocket to the sentry errors so you could see the what
, how
as well as the who
and where
however there is no good existing setup in retool today to do embed LogRocket today.