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
-
This release introduces a new method & fields to further help with monitoring & troubleshooting of async jobs, using the platform-provided async context interfaces:
Database.BatchableContext
System.FinalizerContext
System.QueueableContext
System.SchedulableContext
The 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()
global
methodLogger.setAsyncContext()
. There are 4 overloads - 1 for each of the platform-provided interfaces:New Fields on
LogEntryEvent__e
andLog__c
LogEntryEvent__e
andLog__c
that are set by usingLogger.setAsyncContext()
LogEntryEvent__e.AsyncContextType__c
andLog__c.AsyncContextType__c
Database.BatchableContext
,System.FinalizerContext
,System.QueueableContext
, andSystem.SchedulableContext
.LogEntryEvent__e.AsyncContextParentJobId__c
andLog__c.AsyncContextParentJobId__c
Schema.AsyncApexJob
) that initiated the async transaction. Used forDatabase.Batchable
,System.FinalizerContext
, andSystem.QueueableContext
.LogEntryEvent__e.AsyncContextChildJobId__c
andLog__c.AsyncContextChildJobId__c
Schema.AsyncApexJob
) that initiated the async transaction. Used forDatabase.Batchable
.LogEntryEvent__e.AsyncContextTriggerId__c
andLog__c.AsyncContextTriggerId__c
Schema.CronTrigger
) that initiated the async transaction.LogRecordPage
to 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)LogBatchPurger
andLogBatchPurgeScheduler
) 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, and
Schedulable`, are now public and can be instantiated directlyPipeline Changes
sf
cli (again) to try to resolve some packaging issues in the pipeline (again)build.yml
to outputsf version
to 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 04t5Y000001HZfGQAW
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001HZfGQAW
This discussion was created from the release New Method Logger.setAsyncContext().
Beta Was this translation helpful? Give feedback.
All reactions