-
-
Notifications
You must be signed in to change notification settings - Fork 240
Some system messages fail when scenario-usage is required in an org #882
Copy link
Copy link
Open
Labels
Feature: Scenario-Based LoggingItems related to Logger.setScenario(), LoggerScenarioRule__mdt, etc.Items related to Logger.setScenario(), LoggerScenarioRule__mdt, etc.Layer: ConfigurationItems related to the custom hierarchy setting LoggerSettings__c or any included custom metadata typeItems related to the custom hierarchy setting LoggerSettings__c or any included custom metadata typeType: BugSomething isn't workingSomething isn't workingtestsRelates to Apex or LWC jest testsRelates to Apex or LWC jest tests
Milestone
Description
Metadata
Metadata
Assignees
Labels
Feature: Scenario-Based LoggingItems related to Logger.setScenario(), LoggerScenarioRule__mdt, etc.Items related to Logger.setScenario(), LoggerScenarioRule__mdt, etc.Layer: ConfigurationItems related to the custom hierarchy setting LoggerSettings__c or any included custom metadata typeItems related to the custom hierarchy setting LoggerSettings__c or any included custom metadata typeType: BugSomething isn't workingSomething isn't workingtestsRelates to Apex or LWC jest testsRelates to Apex or LWC jest tests
Using the
LoggerParameter__mdtrecordRequireScenarioUsage, admins/devs can choose to enforce the usage of logger scenarios in their orgs. This feature was added in releasev4.13.3, but it looks like (the whole time??) there are issues with some of the system-generated log entries that are generated async.In particular, the method
Logger.callStatusApi()seems to be the most problematic area right now:LogEntryEventHandler.StatusApiCalloutQueueable.LogEntryEventHandler.StatusApiCalloutQueueableruns async, any in-memory scenario is lost (from the originating transaction). So if no default scenario is configured, aLoggerExceptionis thrown.