rflib
TypeScript icon, indicating that this package has built-in type declarations

5.0.1 • Public • Published

Reliability Force

Build Status GitHub NPM package version codecov

The goal of this library is to help developers to create clean, production-ready code with a high level of operational supportability.

This library is inspired by Dan Appleman's (see Advanced Apex Programming) logging design pattern to collect better diagnostic information when dealing with errors in your Apex classes. This library expands his concepts to provide detailed log information from Lightning Components and Lightning Web Components, giving developers more visibility into the execution path on the client side, especially when dealing with production issues. The library can be configured to automatically report any unexpected errors through Salesforce's latest technologies such as Platform Events.

Key Features

The following lists describe some of the key features of rflib.

Logging Framework (package RFLIB):

  • Logger for LWC and Aura, which publishes logs the same way as Apex
  • Configuration through Custom Settings allowing for different log configurations between users
  • Aggregation of log statements when reporting
  • Using Platform Events for reporting of log statements
  • Support Batched Logging for when DML statements are not supported
  • Log Archive using Big Objects
  • Dashboard for all Object and Field permissions for Profiles and Permission Sets
  • Supports logging in Flow and Process Builder
  • Supports Salesforce Functions (NodeJS only)
  • Display of platform details (Governor Limits, browser & NodeJS process details) for every Log Event

Feature Switches (package RFLIB-FS):

  • Fully configured using Custom Metadata
  • Supports hierarchical structure (similar to Custom Settings) to override settings at the profile or user level
  • Fully supported in Flow Builder through Get Records or Apex Action

Trigger Framework (package RFLIB-TF):

  • Fully decoupled framework, trigger handlers work in isolation
  • Recursion tracking to allow for easy prevention of multiple executions
  • Fully configurable trigger management (activation, order, error handling, etc) using Custom Metadata Types
  • Framework for Retryable Actions using Platform Events for asynchronous actions

Deploy

The best way to add RFLIB to your environment is by installing the unlocked package.

Alternatively, you can either clone the repository and use 'sfdx force:source:deploy' to deploy this library to your Sandbox or use the Deploy to Salesforce button below to deploy it directly into your org.

Please check the CHANGELOG file for versions, install links and package aliases.

To install package via browser:

https://login.salesforce.com/packaging/installPackage.apexp?p0=<PACKAGE_VERSION_ID>

To install package via SFDX CLI Plugin:

sfdx force:package:install -p <Package ID> -w 10 -s AdminsOnly -u <your org alias>

To deploy code:

Deploy to Salesforce

To install the logger in a Salesforce Function using NodeJS:

npm install --save rflib

See the NPM Package Registry record for more details.

Documentation

Documentation such as "How To's" and more can be found in the Wiki of this repository.

Log Event Dashboard

Review any log events sent within the last 72 hours or receive new log events in real-time. The dashboard shows all the events and lets you filter them by searching text within the messages. This will make it easy to detect error codes or other log messages of value.

To enabled the Ops Center application, simply assign the Ops Center Access Permission Set to the users of your choice.

alt text

Permissions Explorer

Review object and field permissions for profiles and permission Sets easily within the same user interface. Many problems encountered in an org trace back to access issues. Using the Setup interface to review access for users is pretty inefficient. This dashboard provides access to all profiles and permissions and allows for quick filtering of the results.

To enabled the Ops Center application, simply assign the Ops Center Access Permission Set to the users of your choice.

alt text

Management Console

A critical aspect of operating a Salesforce Org is managing Governor Limits. There are transactional and org-wide limits, some of which RFLIB is consuming in order to report and display Log Events. While there are several different tools available to monitor org-wide Governor Limits, RFLIB provides a simple way to stay on top of those as well through the Management Console tab.

There, users with access to the Ops Center can view the current consumption of the org-wide Governor Limits relevant to RFLIB. In addition, RFLIB will display what users have not been provided with Permission Set to enable client logging and what users are assigned access to the Ops Center.

alt text

Application Event Dashboard

Whether a product owner wants to understand feature adoption or user behaviour, Application Events provide visibility into the an application's usage patterns and can help teams to make better decisions and learn more about their apps.

For operational teams, Application Events can be used to track integration requests and their outcomes, which can lead to a call to action to review RFLIB log messages for more details.

alt text

Updates

See CHANGELOG file for versions, install links and package IDs.

Credits

Attribution

Package Sidebar

Install

npm i rflib

Weekly Downloads

1

Version

5.0.1

License

BSD-3-Clause

Unpacked Size

49.9 kB

Total Files

7

Last publish

Collaborators

  • jfischer