Skip to main content

Creating your first monitoring job

How to use the setup process in Gearset for creating a job to monitor for Salesforce org limits and unhandled exception errors for Apex and Flows.

Stephen Chambers avatar
Written by Stephen Chambers
Updated over a week ago

Gearset's setup process configures Salesforce org limit monitoring and error monitoring for Apex and Flow in parallel under a single setup process as they use different mechanisms to monitor for limits or errors.
​
To create your job:

  1. Click Begin setup if you've not created a monitoring job previously, or go to the Actions menu dropdown and click on Set up error and limits monitoring if a member of your team has already created a monitoring job.

  2. Choose the Salesforce org that you wish to monitor for errors. (Note: whilst Sandbox orgs can be selected, once they are refreshed the change in Salesforce org id will stop the job from working.).

  3. Add a name for your monitoring job.

  4. If no notification address exists for Apex error emails we recommend entering an email address recipient. You can enter an address at another time if you wish.

  5. Click Next.

Step 2: Choose org limits and alert thresholds

  1. Choose the category and specific org limits you wish to display on your dashboard. We recommend only choosing org limits that you care about displaying on the dashboard to reduce noise. (Note: all org limit information is returned in a single API request so your selection doesn't impact the number of API calls used.)

  2. Choose the Warning and Critical alert thresholds that you want for Slack and Teams notifications. For example, a warning threshold of 75% will trigger an alert to your configured notification channel once an API request org limit has used 75% of its daily allowance. See our notification configuration documentation for instructions on how to add Slack and Teams channels for notifications.

  3. Click Finish setup

To set up error monitoring specifically, Gearset will perform a deployment to adjust the notification settings required in the org for monitoring the inbox address which is automatically generated by Gearset. (Note: the length of time a deployment can take is dependent on when Salesforce begins the deployment so times can vary).

The deployment will update two settings in your org:

  1. Under the Apex exception email it will add a Gearset generated email inbox to the External Email Addresses field.

  2. Change the existing User Who Last Modified the Process or Flow default value to the Apex Exception Email Recipients option under Process Automation Settings.

The monitoring for Salesforce org limit monitoring requires no additional setup processes as it uses the REST API to retrieve information about current org limits.

Note: if you have a change monitoring job set up for your org or compare your org with the Apex email notifications or Settings metadata types included you will see the specific items for these types indicated as changed items.

Did this answer your question?