New Release v4.7.2 - Bugfix for setting parent log transaction IDs, new Async Failures Additions plugin #312
jongpie
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Core Package Changes
Log__c.ParentLogTransactionId__cand updated trigger handler logic to optionally setLog__c.ParentLog__cwhen the parent log is found (or skips it when the parent log is not found)Log__cflexipage and page layout now use a new formula fieldLog__c.ParentLogLink__cto display either a link toParentLog__cwhen set or the text value ofParentLogTransactionId__cLoggerLogCreatorto indicate that it's currently optional, but might be needed in the futureLogEntryEventHandler.TAG_ASSIGNMENT_RULESby adding lazy-loading (discussed in Reducing use of SOQL in synchronous context #303) and adding a check onLogEntryTagRule__mdt.getAll().isEmpty() == trueto minimize the usage of querying onLogEntryTagRule__mdtLogger_Tests, and added TODOs for several test methods that will eventually be rewritten in a future release@SuppressWarningsannotations in a couple of Apex classes-LoggerMockDataCreator.createAggregateResult(Map<String, Object>)since the current mocking approach doesn't/can't actually set any fields on the mockAggregateResultLoggerSObjectHandler__mdt.SObjectTypeOverride__cas a way to support triggers on objects that are not supported viaEntityDefinitionlookupsNew Async Failures Additions Plugin
@jamessimone created a new plugin (implemented in #309), this plugin adds support for logging asynchronous batchable and queueable exceptions.
Batchable Error Logging
All a batch class needs to do is implement the marker
Database.RaisesPlatformEventsinterface and create aLoggerParameter__mdtrecord where theValuefield matches the name of the batch class you are looking to add logging for, and the DeveloperName (the "Name" field) starts withBatchError:And the CMDT record:
Once you've correctly configured those two things (the marker interface
Database.RaisesPlatformEventson the Apex batchable class, and the Logger Parameter CMDT record), your class will now log any uncaught exceptions that cause that batch class to fail unexpectedly.Queueable Error Logging
If you have Apex classes that implement
System.Queueable, you can add error logging with some minimal code additions:If you'd like to do additional processing, you can alternatively choose to extend
LogFinalizer:Promoted All Plugin Packages
Previously, the package plugins had not been promoted, which prevented them from being installed directly into production. The most recent package versions for each plugin has now been promoted, allowing all plugins to now be installed into production. At the moment, there are 5 plugins available:
Note that several plugins are still considered to be in beta - the code has been tested and everything is expected to work in production, but as some plugins are relatively new, there may be some bigger changes between releases (depending on community feedback about new features & bugfixes).
Pipeline Changes
CODEOWNERSfilebuild.ymlso that the managed package build is a dependency for creating the unlocked package. This will add more time to the build, but it will ensure that the managed package (the more problematic package) can be created before creating the unlocked packageREADME.mdpackage.json& recreatingpackage-lock.jsonThis discussion was created from the release Bugfix for setting parent log transaction IDs, new Async Failures Additions plugin.
Beta Was this translation helpful? Give feedback.
All reactions