Function Analytics
Zoho CRM's Function Dashboard provides insights on overall usage, executions, sources, and other recurring patterns of success and failures of all the functions. However, if you want to get detailed information at individual function-level analytics, it can be challenging.
Function Analytics provides insightful information about the execution of individual functions, including execution trends, failures, logs, credit consumption, and much more. This makes it easier to monitor, debug, and troubleshoot issues with your functions effectively. It also helps to make informed decisions about your functions' execution, such as credit usage and success/failure ratios.
To view the individual function analytics, hover over the function name, and click on the three dot ellipsis icon.
The Individual function analytics provide three options: Overview, Logs, and Failures.
Overview
The overview section summarizes your function executions for the selected time frame. You can filter the statistics in this section by Last 24 hours, Today, Yesterday, Last 30 days, and Specific Date. You can also filter them by specifying a custom date range or time.
Note:
Please note that the statistics in the overview section will be updated every 15 minutes.
In the overview section, you can view and analyze the total number of executions, success and failure counts, total credits used, and billed amount for the selected period. This provides an overall view of your function executions and aids in failure analysis.
You can also compare the success and failure patterns in relation to the time of function execution. The Success vs Failure Pattern shows how many function calls succeeded and failed during the specified time period.
Function Execution Chart
This bar graph depicts the credits used for the selected function over time. Credits consumed by a function depend on various factors like the language used and the execution time. This graph gives insights into the credit consumption pattern of the particular function.
Top Integration Tasks
This pie chart illustrates the Integrations Tasks completed during the execution of the specific function. When you hover over the graph, you can see the exact number for each of the Integration tasks, which include Get records, Create records, and Update records and all other integration tasks supported by Zoho CRM. These are considered internal calls and consume credits only for the API calls and function execution.
Note:
Only the integration tasks performed on ZohoCRM are listed in this chart. The Integration Tasks performed in other Zoho apps are not included here. For example, if there are a few integration tasks performed by Zoho sheets while executing the specific function, they won't be included in the chart.
Function Calls By Source
This pie chart shows the number of functions that were executed based on the source of the call, such as CRM and REST API. When the function calls are made from associations inside CRM like workflows or buttons, the function source is CRM. When function calls are invoked from outside the CRM, i.e via REST API of the function from other third party applications, then the source is REST API. This gives you a fair overview of what percentage of function calls are made via REST APIs from an external source.
Function Calls by Module
This bar graph depicts the number of function calls made from different modules.
Logs
The function logs contain information regarding the requested data-time, parameters, execution status, response and duration. You can filter the logs using the various default time frames or by specifying a custom time frame.
Note:
- Logs are updated every 5 minutes
- Function logs and analytics data are retained for 30 days
You can view the details of a specific function call by clicking on a log entry, which includes the requested date, time, category, status, and credits used. For a better understanding, the logs level can be filtered by info or error. This contains information regarding the execution as well as any error messages.
Only the content provided inside the info statement in the script will be displayed in the Info section. The function's return statement content will not be displayed in the Logs entry. For error, the exact reason will be displayed, but no stack trace will be displayed.
To download the logs as a JSON file, click the download icon. The downloaded logs can be used for analysis even outside the CRM. Here is a sample of the downloaded JSON file.
Failures
The failures section displays the failure log for the selected function. This section helps you in identifying which of the function executions were unsuccessful. The failure logs can also be filtered by the locations with which the functions are associated. You can use the search feature to look up specific places like buttons or workflow, modules, or reasons in the failure logs.
Note:
Please note that the records in the Failures section are updated every 5 minutes. This applies to the List View and Detail View logs as well.
By clicking the Export All button, you can export the failure logs as a CSV file. By hovering over the entry and clicking rerun, you can rerun the function from the failure logs.
You can also select multiple entries and delete or schedule to rerun them.
You can view specific error log details including the requested date, time, category, status, and credits used by clicking on individual entries. Log levels can be filtered by info or error for a deeper understanding. In addition to the error, the stack trace will also be displayed in Logs.
Click the download icon to download the logs as a JSON file. This can assist you with root cause analysis for the function failures. Here is a sample of the downloaded file.
The info statement for both Logs and Failures is limited to a maximum of 5 lakh characters, both in the UI and the downloaded file. Keep the info statement short to make better use of the logs.