Gearset's metadata change monitoring gives you a detailed audit trail of configuration changes in your orgs on a day-by-day basis, and can take org snapshots on demand to back up your metadata. It also runs static code analysis on your Apex code to provide feedback on the quality of the code you're writing.

It works by comparing daily snapshots of your org's metadata and highlighting any changes. You can also roll back unwanted changes, download snapshots of your org's metadata on-demand, and deploy detected changes to other environments.

Creating a metadata change monitoring job in Gearset

Before creating an automated change monitoring job, you first need to have added a connection to at least one of your Salesforce orgs.

  • Navigate to the Monitoring page, found under Automation in the nav menu on the left
  • Click Add new job
  • Choose the time you want the job to take a snapshot of your org each day
  • Give the job a descriptive name (e.g. Production change tracking)
  • Select an org to monitor from the dropdown
  • Click the Notification settings tab
  • Choose to send notifications every time the job runs, or only when changes are detected
  • Enter the email addresses to notify. Gearset also supports SMS notifications (UK and US only), Slack and Microsoft Teams integration via webhooks and Chatter integration
  • Click the Metadata filter tab
  • Specify which metadata types you want your change monitoring job to retrieve from your org. You can select from pre-defined filters or create your own (read more about custom metadata filters here)
  • Click Save to create the job

The job will now be queued to run at the time you specified. It will then take its first snapshot of your org and begin tracking changes. 

When two snapshots have been taken, you will be able to view the change history, track changes, take snapshots on demand, perform rollbacks, and deploy detected changes.

Viewing job status and inspecting changes

The change monitoring overview page displays a list of the change monitoring jobs created, with the most recent outcome of the check for changes to an org's metadata. There are two statuses for a monitoring job:

  • Identical: no changes have been found between the two most recent snapshots
  • Different: changes have been found between the two most recent snapshots

Jobs can be run on demand by clicking the Back up metadata button in the actions column. This will immediately take a snapshot of your Salesforce org's metadata.

Clicking View history will open up the full monitoring history for the job. This will list when each snapshot was taken, its status, and how many items were detected as being changed.

If you want to see what changes were detected on any day, click View comparison. You'll see the same comparison view as when comparing two orgs, but in this case the results will be from the same org at two snapshots in time, 24 hours apart.

Rolling back detected changes

You can roll back detected changes from a monitoring job. This runs a comparison between the saved snapshot and the orgs live state, and allows both full or partial rollback of any unwanted changes detected (learn more).

Downloading a snapshot of your org

Clicking the Download snapshot button will download a ZIP file of the snapshot Gearset took of the org for that day. This can be used as an offsite backup of the orgs metadata at that point in time.

Deploying changes to other environments

Changes detected by the monitoring job can be deployed to other orgs, or your version control system. For example, changes detected in Production can be quickly promoted into a testing sandbox through this process. 

Click Deploy changes and select the target environment. This will run a comparison between the snapshot of the source org, and the live state of the target, and will automatically pre-select the detected changes for deployment.

View static code analysis report

Gearset's fully configurable static code analysis automatically analyses the Apex code in your orgs as part of the change monitoring. It will then provide feedback on ways to improve your code. To view these suggestions, click View code analysis... on any job run.

For each of your Apex classes, you will see the suggestions for how to improve your code. For more information on any warning or suggestion, click the "Check name" link.

Filtering change monitoring history by date

By default, the change monitoring history will display results from the last 30 days. You can change this filter view by clicking on the date range above the results table.

Did this answer your question?