Understand how your team uses Scripts with out-of-the-box error reporting and usage monitoring

Insights allows you to view usage data for your team's scripts. This includes information such as how long the script took to run, if there were any errors, and who ran the script.

Viewing Insights for a Script

To view the insights for a script, go to the "Insights" tab when viewing the script. This will display a list of all the times the script has been run, along with the relevant usage data for each execution.

The insights data can be useful for understanding how a script is being used, identifying potential errors or issues, and optimizing the performance of the script. It can also be helpful for troubleshooting and debugging, as it provides detailed information about the script's execution and any errors that may have occurred.


In addition to the basic usage data, in the future, insights also will allow developers to add custom metrics to track specific aspects of the script's behavior. This can be done by calling the fig.insights.metric() function from within the script, passing in the name of the metric and its value. For example, to track the number of records processed by the script, the script could use the following code:

fig.insights.metric("records_processed", records_processed)

The custom metrics will then be included in the insights data, allowing users to track and monitor the specific behaviors and performance of their script.