Skip to content

New Configurable Storage Locations For Scenario & Tag Data

Compare
Choose a tag to compare
@jongpie jongpie released this 08 Dec 21:22
· 84 commits to main since this release
4814f4e

Core Unlocked Package Changes

Fixed #388 (reported by @rmccu) by providing controls for how scenario & tag data is stored in Nebula Logger's data model. As the data model has grown over the last year or so, using multiple custom objects has made it easier for admins & developers to manage scenario & tag data - however, the data model does not scale well in orgs with large data volumes (LDV) of millions of records because of data skew that can happen for scenarios & tags that are heavily used.

  • 🟥 Red box in the below data model: A single LoggerScenario__c record can end up with millions of related Log__c and LogEntry__c records
  • 🟩 Green box in the below data model: A single LoggerTag__c record can end up with millions of related LogEntryTag__c junction records (that link LoggerTag__c to LogEntry__c)

This type of data skew can lead to row-lock errors, increased runtimes for deleting data via LogBatchPurger, and other types of headaches.

image

To help avoid these kinds of issues, orgs with large data volumes can now choose if scenario & tag data are normalized (stored in custom objects) or denormalized (stored in text fields directly on Log__c and LogEntry__c). This can be controlled with 2 new LoggerParameter__mdt records (shown in the screenshot below):

  1. New LoggerParameter__mdt record NormalizeScenarioData
    • When set to true (default), scenario data is stored in the custom object LoggerScenario__c
    • When set to false, scenario data is stored in the text fields Log__c.TransactionScenarioName__c and LogEntry__c.EntryScenarioName__c
    • To simplify things like list views & related lists, the 2 new formula fields Log__c.TransactionScenarioLink__c and LogEntry__c.EntryScenarioLink__c will handle displaying either the value of the corresponding text field or the name of the related LoggerScenario__c record
  2. New LoggerParameter__mdt record NormalizeTagData
    • When set to true (default), tag data is stored in the custom objects LoggerTag__c and LogEntryTag__c (or Topic and TopicAssignment, if the LoggerParameter__mdt record UseTopicsForTags is set to true)
    • When set to false, tag data is stored in the long text area field LogEntry__c.Tags__c, and the new field LogEntry__c.HasInlineTags__c is set to true (since long text area fields can't be filtered in SOQL/list views, this field helps with filtering)

image

Full Changelog: v4.9.8...v4.9.9