Repository navigation
v4.11.6 - New Method Logger.setAsyncContext() #559
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.
This release introduces a new method & fields to further help with monitoring & troubleshooting of async jobs, using the platform-provided async context interfaces:
Database.BatchableContextSystem.FinalizerContextSystem.QueueableContextSystem.SchedulableContextThe new features in this release can be used either in place of, or in addition to, Nebula Logger's existing method,
Logger.setParentTransactionId(), to help with identifying logs from related asynchronous transactions.Core Unlocked Package Changes
New Method Logger.setAsyncContext()
globalmethodLogger.setAsyncContext(). There are 4 overloads - 1 for each of the platform-provided interfaces:New Fields on
LogEntryEvent__eandLog__cLogEntryEvent__eandLog__cthat are set by usingLogger.setAsyncContext()LogEntryEvent__e.AsyncContextType__candLog__c.AsyncContextType__cDatabase.BatchableContext,System.FinalizerContext,System.QueueableContext, andSystem.SchedulableContext.LogEntryEvent__e.AsyncContextParentJobId__candLog__c.AsyncContextParentJobId__cSchema.AsyncApexJob) that initiated the async transaction. Used forDatabase.Batchable,System.FinalizerContext, andSystem.QueueableContext.LogEntryEvent__e.AsyncContextChildJobId__candLog__c.AsyncContextChildJobId__cSchema.AsyncApexJob) that initiated the async transaction. Used forDatabase.Batchable.LogEntryEvent__e.AsyncContextTriggerId__candLog__c.AsyncContextTriggerId__cSchema.CronTrigger) that initiated the async transaction.LogRecordPageto conditionally show a new page section, "Async Context Details", which also conditionally shows the 4 new fields, shown in the screenshot below (in the red box)LogBatchPurgerandLogBatchPurgeScheduler) to leverage the new methodLogger.setAsyncContext()Internal Code Cleanup
LoggerMockDataCreator.createBatchableContext()- the underlying mock batchable context class, as well as some new similar mocks forFinalizer,Queueable, andSchedulable`, are now public and can be instantiated directlyPipeline Changes
sfcli (again) to try to resolve some packaging issues in the pipeline (again)build.ymlto outputsf versionto help with troubleshooting any future pipeline issuesInstallation Info
Core Unlocked Package - no namespace
Full Changelog: v4.11.5...v4.11.6
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001HZfGQAWsfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001HZfGQAWThis discussion was created from the release New Method Logger.setAsyncContext().
All reactions