Skip to content

Conversation

@jongpie
Copy link
Owner

@jongpie jongpie commented Jul 1, 2025

Fixed #807 by adding the ability to declaratively configure the default batch size in LogBatchPurger. This can be used to reduce the batch size to help with mitigating Apex heap size exceptions that can sometimes happen in the LogBatchPurger job when deleting larger volumes of logging data. And making it now configurable makes it easy to quickly change it in orgs as needed.

  • Add new LoggerParameter__mdt record LogBatchPurgerDefaultBatchSize
  • ℹ️ The new default batch size for LogBatchPurger is now 500 (and now controlled via LogBatchPurgerDefaultBatchSize).
  • Previously, 2000 was used, but 500 is the new default to try to help avoid Apex heap size exceptions. If desired, you can update the record's Value__c field to 2000 to restore the previous value/behavior used prior to this release

@jongpie jongpie added Type: Bug Something isn't working Type: Enhancement New feature or request optimization Layer: Configuration Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type Layer: Log Management Items related to the custom objects & Logger Console app Feature: Log Retention Items related to LogBatchPurger or LogBatchPurgeScheduler labels Jul 1, 2025
@jongpie jongpie temporarily deployed to Base Scratch Org July 1, 2025 19:14 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Advanced Scratch Org July 1, 2025 19:14 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Event Monitoring Scratch Org July 1, 2025 19:14 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to OmniStudio Scratch Org July 1, 2025 19:25 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Platform Cache Scratch Org July 1, 2025 19:25 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org July 1, 2025 19:30 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Base Scratch Org July 1, 2025 19:45 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Base Scratch Org July 1, 2025 19:56 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Jul 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.50%. Comparing base (4fbfaa8) to head (1874f49).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #880      +/-   ##
==========================================
+ Coverage   86.19%   91.50%   +5.31%     
==========================================
  Files          17       58      +41     
  Lines        1318     6319    +5001     
  Branches      199      199              
==========================================
+ Hits         1136     5782    +4646     
- Misses        162      517     +355     
  Partials       20       20              
Flag Coverage Δ
Apex 92.90% <100.00%> (?)
LWC 86.19% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jongpie jongpie merged commit b34b2c0 into main Jul 21, 2025
1 check passed
@jongpie jongpie deleted the feature/configurable-purge-job-batch-size branch July 21, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature: Log Retention Items related to LogBatchPurger or LogBatchPurgeScheduler Layer: Configuration Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type Layer: Log Management Items related to the custom objects & Logger Console app optimization Type: Bug Something isn't working Type: Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apex heap size too large during purging after 30 days

3 participants