Admins / Developers

17 Free Ways to Monitor Your Salesforce Org

By Nicholas Fiorendi

Companies can spend millions on Salesforce and related services, such as sales and service enablement, optimizing processes, materials and technologies, and recruiting top talent – to only name a few! Companies are open to investing in Salesforce beyond the licenses because it positively impacts the productivity of the entire organization. This is why you need to monitor your Salesforce org.

By monitoring your Salesforce org, you’ll be able to identify issues, report them to Salesforce or your own team, and get quicker resolutions. From Apex classes failing, Case create errors troubling your Service Team, to Opportunities that can’t be ‘closed’ because of unmanaged exceptions, it’s vital to set up a proper Monitoring solution. Here are 17 ways I monitor the Salesforce orgs that I work on in order to anticipate implementation breakdowns bfore they actually happen.

1. Application Logging Framework

To promote good error handling practices, reuse and provide a framework for handling common coding patterns, the Salesforce Cloud Services team shared a wonderful tool called Application Logging Framework on GitHub, which can be used as framework baseline and extended with Events.

ArtefactPurpose
Custom Setting Exception_LoggingSetting to define which types of messages to store, how long to store them for, and character cap
Custom Setting Integration_LoggingSetting to define in integration logging in enabled, how long to store them for, and payload stored cap
Custom Object Platform_LogObject to hold custom logging records
Apex Class PlatformLoggingUtil class to control exceptions and integrations logging

This framework can be customized and extended to include Events functionalities. Here is an example:

2. Tooling API

Use Tooling API to build custom development tools or apps for Lightning Platform applications. Tooling API exposes metadata used in developer tooling that you can access through REST or SOAP. You can use this API to retrieve Apex Code Coverage, Apex Test Result, Entity Limits and other metadata related information. Tooling API Object List

3. REST API – Limits

Use REST API to list information about limits in your org:

  • Max is the limit total for the org.
  • Remaining is the total number of calls or events left for the org.

This resource is available in REST API version 29.0 and later for API users with the View Setup and Configuration permission.

4. Setup Audit Trail

With Setup Audit Trail you can proactively check any metadata change performed by Users in your org.

5. Health Check

How well does your org meet Salesforce’s security standards?

Health Check will help you identify gaps in your settings and improve your org security.

6. Salesforce Optimizer

Salesforce Optimizer analyzes your implementation to determine ways that you can simplify customizations and drive adoption of features. After analyzing your org, it provides you with an extensive report.

7. System Overview

System Overview provides a summary of key usage data for your org. It’s a one-page dashboard where you can also add system overview messages to your home page. These messages appear when your organization approaches its usage limits.

8. Apex Exception Emails

Set the email addresses that receive notifications when your Apex code encounters unhandled exceptions. Emails can be sent to your Salesforce org’s users and to external email addresses.

9. API Usage Notification

Define API Usage threshold and get notified when this is exceeded.

10. Paid Solutions

Salesforce Shield’s Event Monitoring is a great product to gain access to detailed performance, security, and usage data on all your Salesforce apps. Every interaction is tracked and accessible via APIs, so you can view it in the data visualization app of your choice. See who is accessing critical business data, understand user adoption, troubleshoot and optimize performance to improve end-user experience.

Additionally, on AppExchange there are also other great tools to monitor your org, like Appneta or Catchpoint.

11. Additional Logging Frameworks

In addition to Salesforce Cloud Services framework shared in previous article, there are 2 loggers ready to be deployed and used in productive environments:

  • Nebula Logger: This is a robust logger for Apex, Flow, and Integrations. It is specially designed for Salesforce admins, developers & architects by my former colleague Jongpie. You can install it as a Managed Package.
  • CB Logger: Salesforce logging tool powered by Platform Events and Big Objects. It can also be installed as Package

12. Limits Dashboard

We have seen how to use REST API with LWC to display governor limits in an App Page. If you don’t want to code, Salesforce Labs has created a set of dashboards to display the same information: Limits Dashboard. When limits reach a certain threshold, you can also configure a scheduler to get alerts.

13. Force.com Code Scanner

To perform a static analysis scan of all unpackaged code in your organization (Security and Quality rules), you can use this free tool from Salesforce (in partnership with Checkmarx). The results will be sent to the email address on the Admin tab requesting it in the portal.

Partners are encouraged to use the Partner Security Portal, which offers advanced functionality specifically for them. Scanner support is only available for the Partner Security Portal.

14. OrgDoctor

Salesforce Org Doctor is a free, automated tool that will scan your Org against a set of metrics and provide you with a detailed report explaining your progress in those areas. It runs on Heroku and sends the report on the email address of the requesting Salesforce user.

15. OrgCheck

Although invisible, technical debt impacts your project, IT budget, Salesforce app, your end-users and your business. To tackle this problem, Salesforce employee, Vincent Finet, has developed a Salesforce application in order to quickly analyze your org and its technical debt. This app is easy to install and use.

His vision of this tool is:

  • The tool should run on a Salesforce org and must be easy to install and use.
  • Require no additional software or platform.
  • No need to have a Salesforce employee with magical access.
  • The code of the application is available. If you need, you can modify it.

Note: for the time being, Vincent recommends installing it only on Sandboxes or Dev Orgs.

16. Happy Soup

Happy Soup is a 100% free and open source Salesforce Impact and Dependency Analysis tool. It pushes the boundaries of the MetadataComponentDependency API, helping you to create Deployment Boundaries and translate them into SFDX Scratch Orgs. It also breaks up your metadata and plans your move to SFDX Unlocked Packages.

17. Measuring your Experienced Page Time

As reported in this Salesforce Help article, you have different tools to measure performance in Experienced Page Time (EPT). You can measure EPT in 3 free ways:

  • Add an EPT counter to the header of your app
    • To add an EPT counter to the header of your app, use the Lightning Component Debug Mode, or append ?eptVisible=1 to your URL.
  • Use the Lightning Usage App to view page and browser performance
    • To measure EPT with the Lightning Usage App, select a tab in the Activity or Usage section on the left side of the page. You can view EPT by the browser used, or by page. Because the Lightning Usage App aggregates performance metrics, using the EPT counter can be better for measuring specific pages.
  • Build a custom report using Lightning Usage App objects
    • To measure EPT with custom reports in the Lightning Usage App, create a report type using a Lightning Usage App object. After you create the report type, build the report using Report Builder. Available Lightning Usage App objects are:
      • LightningUsageByAppTypeMetrics
      • LightningUsageByBrowserMetrics
      • LightningUsageByPageMetrics
      • LightningUsageByFlexiPageMetrics

Summary

It’s clear how important is to monitor your org, and how many possibilities are given by out-of-the-box Salesforce features or paid solutions, if your budget permits.

Many of these functionalities can be also displayed using Lightning Web Components to create a summary dashboard:

So, be proactive instead of reactive, and start implementing these controls as soon as possible!

The Author

Nicholas Fiorendi

Nicholas is a Salesforce Application Architect at LIDL, Barcelona (ES)

Comments:

    Gurdeep S Rahi
    April 01, 2020 3:52 pm
    Great article - lots of good pointers, many of which I use as well.
    Nicholas Fiorendi
    April 03, 2020 7:51 am
    Thank you!
    Sugandharaj Loni
    April 21, 2020 11:30 am
    Hi Nicholas, how do I implement the Application Logging Framework in my project? Is it free version.
    Nicholas Fiorendi
    February 04, 2021 1:20 pm
    Hello, was coming back on the article today and saw the question, almost one year passed but I think it's better to reply later than never :D The framewok can be implemented also in Dev edition/free orgs, following the instruction in the readme file: https://github.com/CSGAMERSServices/Application-Logging-Framework/blob/master/README.md
    Jeremy
    March 23, 2021 2:23 am
    Hello, big fan of the blog...the very last screenshots in this article, where did they come from? We want exactly what those showed and just curious if it is available somewhere.
    Nicholas
    April 26, 2021 9:20 am
    Hi Jeremy, that's my Production org, but stay tuned on the blog as in May I'll provide some additional tools which will let you build something very similar in a easy way.
    Sean Fielding
    August 23, 2021 3:43 pm
    For your consideration, I'd like to throw Health Inspector (free on the appexchange) into the mix. This process monitors your test class coverage, flow coverage, and long running test classes to insure no surprises. https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkhsUAD&channel=recommended
    Roy
    August 23, 2021 4:10 pm
    Hey Nicholas, Thanks for the updated article. I know of some of these tools, but not all of them. I look forward to checking them out. 3 notes for your consideration: 1. #14 - I would not recommend OrgDoctor anymore. I ran it recently and the "users with Modify all" number came back WAY too high. I did some digging and realized it was counting inactive users. That oversight made me nervous, so I dug some more and from what I can tell, the OrgDoctor is a one-developer-show... so if you use it, make sure to verify the results... but if you have to verify the results... that kind of defeats the purpose. 2. #6 - The Salesforce Optimizer. Man, I want to love this tool, but first the Optimizer needs to be Optimized. Salesforce took away the PDF in June of 2021, which is a little sad... but not terribly sad because it was so much clutter and wasted space. A brand new dev org generated a 75 page pdf. I'm hoping they will bring it back in a new and improved version and that they will improve the Optimizer App as well. That is one of three Optimizer related ideas that I've posted to the IdeaExchange. Please check them out and upvote them if you agree. - https://trailblazer.salesforce.com/ideaView?id=0874V000000lgjyQAA - https://trailblazer.salesforce.com/ideaView?id=0874V000000lgk3QAA - https://trailblazer.salesforce.com/ideaView?id=0874V000000lgk8QAA
    Jithesh Vasudevan
    September 02, 2021 8:59 pm
    It would be great to talk about the topic, OWASP #10 Insufficient Logging and Monitoring in Salesforce. I believe there are less articles on it.
    Nicholas
    September 08, 2021 2:42 pm
    Thanks for the hint Sean!
    Nicholas
    September 08, 2021 2:50 pm
    Hi Roy, thanks for your comment! Indeed OrgDoctor is not perfect and neither an official tool, still think it's ok to run it from time to time to compare/enrich results with the other tools. Regarding Optimizer, I voted all your Ideas ;)
    Nicholas
    September 08, 2021 2:54 pm
    Hi Jithesh, I'm obviously a big Salesforce fan but I think it's non-sense that customers need to pay to access their own logs. It's absurd that I cannot check my CPU consumption and then being throttle because of it. I'd love to see more articles on the topic then, but I'd love even more to get free tools from Salesforce ;)
    samidurai
    September 28, 2021 1:02 pm
    Limits Dashboard package ---> scheduler functionality not working. its alway in Queued. this not working email alert functionality
    Vincent Finet
    May 24, 2022 8:01 am
    Hi Nicholas, Thanks for mentioning OrgCheck in your article on SalesforceBEN! I referenced this post in the repository! ;) >> https://github.com/VinceFINET/OrgCheck Also, I am working on having the app on the AppExchange soon! ;D TO ALL: The updated presentation of the tool is accessible to anyone at https://sfdc.co/OrgCheck-Presentation If you like the app don't hesitate to spread the word like Nicholas!! Thank you!

Leave a Reply