Skip to content

feat: add 49 new Salesforce debug log event types and fix event metadata#750

Open
lukecotter wants to merge 2 commits intocertinia:mainfrom
lukecotter:feat-apex-log-parser-new-events
Open

feat: add 49 new Salesforce debug log event types and fix event metadata#750
lukecotter wants to merge 2 commits intocertinia:mainfrom
lukecotter:feat-apex-log-parser-new-events

Conversation

@lukecotter
Copy link
Copy Markdown
Contributor

@lukecotter lukecotter commented Mar 30, 2026

Summary

Adds support for 50 previously unrecognised Salesforce debug log event types, sets debugLevel and debugCategory on all 171 existing event classes (previously unset on most), and corrects values verified against official Salesforce documentation.

All event metadata was verified against:

  • S1: Salesforce Developer Docs (Debug Log Console)
  • S2: Salesforce Help (Debug Log Levels)
  • S3: Live org debug level editor (Spring '26, API v66.0)
  • Empirical testing: VF_APEX_CALL_START/END verified against 141 real debug logs

New Events (50)

Database (Cursor operations):
CURSOR_CREATE_BEGIN, CURSOR_CREATE_END, CURSOR_FETCH, CURSOR_FETCH_PAGE

Apex Code:
APP_ANALYTICS_ERROR, APP_ANALYTICS_FINE, APP_ANALYTICS_WARN, FORMULA_BUILD, FORMULA_EVALUATE_BEGIN, FORMULA_EVALUATE_END, ORG_CACHE_CONTAINS, ORG_CACHE_GET, ORG_CACHE_GET_CAPACITY, ORG_CACHE_GET_PARTITION, ORG_CACHE_PUT, ORG_CACHE_REMOVE, PUSH_NOTIFICATION_INVALID_CONFIGURATION, PUSH_NOTIFICATION_INVALID_PAYLOAD, QUERY_SQL_LOG, SESSION_CACHE_CONTAINS, SESSION_CACHE_GET, SESSION_CACHE_GET_CAPACITY, SESSION_CACHE_GET_PARTITION, SESSION_CACHE_PUT, SESSION_CACHE_REMOVE

Database:
FOR_UPDATE_LOCKS_RELEASE, SAVEPOINT_RELEASE, SAVEPOINT_RESET, USER_MODE_PERMSET_APPLIED

System:
RLM_CONFIGURATOR_BEGIN, RLM_CONFIGURATOR_DEPLOY, RLM_CONFIGURATOR_END, RLM_CONFIGURATOR_STATS, RLM_PRICING_BEGIN, RLM_PRICING_END, DUPLICATE_RULE_FILTER_INVOCATION

Workflow:
END_CALL, FLOW_SCREEN_DETAIL, PLAY_PROMPT, SCHEDULED_FLOW_DETAIL, SLA_CASE_MILESTONE, WF_CHATTER_POST, WF_FLOW_ACTION_BEGIN

Data Access:
DATA_ACCESS_EVALUATION, POLICY_RULE_DEFINITION_CONDITION_EVALUATION_RESPONSE, POLICY_RULE_EVALUATION_REQUEST, POLICY_RULE_EVALUATION_RESPONSE, POLICY_RULE_EVALUATION_SKIPPED, POLICY_RULE_EVALUATION_START

Callout:
EXTERNAL_SERVICE_CALLBACK

debugLevel and debugCategory Set on All 171 Existing Event Classes

Previously most event classes had no debugLevel or debugCategory set. All 171 classes now have both properties populated per official documentation. Key groupings:

Category/Level Count Examples
Workflow / INFO 52 WF_ACTION, WF_CRITERIA_BEGIN, WF_FORMULA, SLA_END, EVENT_SERVICE_PUB_BEGIN, FLOW_START_INTERVIEW_BEGIN
(level only) INFO 30 FLOW_BULK_ELEMENT_NOT_SUPPORTED, VALIDATION_RULE, VF_PAGE_MESSAGE, NAMED_CREDENTIAL_REQUEST
(level only) FINER 17 FLOW_ACTIONCALL_DETAIL, FLOW_ASSIGNMENT_DETAIL, FLOW_LOOP_DETAIL, VF_EVALUATE_FORMULA_END
Database / INFO 12 DML_BEGIN, SOQL_EXECUTE_BEGIN, SAVEPOINT_SET, QUERY_MORE_BEGIN
Apex Code / Error 8 CODE_UNIT_STARTED, FATAL_ERROR, EXECUTION_STARTED
System / INFO 8 SYSTEM_MODE_ENTER, POP_TRACE_FLAGS, DUPLICATE_DETECTION_BEGIN, MATCH_ENGINE_BEGIN
Apex Code / INFO 8 EMAIL_QUEUE, EXCEPTION_THROWN, ORG_CACHE_GET_BEGIN
NBA / FINE 6 NBA_STRATEGY_BEGIN, NBA_NODE_BEGIN
Apex Code / FINE 5 METHOD_ENTRY, CONSTRUCTOR_ENTRY, ENTERING_MANAGED_PKG
Apex Profiling / FINE 5 CUMULATIVE_PROFILING, STACK_FRAME_VARIABLE_LIST
(level only) ERROR 5 FLOW_ELEMENT_ERROR, WF_FLOW_ACTION_ERROR
System / FINE 4 SYSTEM_METHOD_ENTRY, SYSTEM_CONSTRUCTOR_ENTRY
Visualforce / INFO 4 VF_SERIALIZE_VIEWSTATE_BEGIN, VF_DESERIALIZE_VIEWSTATE_BEGIN
Callout / INFO 3 CALLOUT_REQUEST, CALLOUT_RESPONSE, XDS_RESPONSE
Apex Code / DEBUG 3 USER_DEBUG, PUSH_NOTIFICATION_SENT
Apex Code / FINER 3 HEAP_ALLOCATE, STATEMENT_EXECUTE
Apex Code / FINEST 3 VARIABLE_ASSIGNMENT, BULK_HEAP_ALLOCATE
Other 15 Various remaining events

Notable Corrections

Event What changed Reason
VF_APEX_CALL_START/END Category: ApexCode → Visualforce Empirically verified: logs with VF=INFO and active VF controllers show 0 occurrences; VF=FINE shows thousands
XDS_RESPONSE_ERROR Category: System → Callout, Level: Fine → Error Per S1/S2 official docs
LIMIT_USAGE_FOR_NS Category: NBA → ApexProfiling, Level: Error → Finest Per S1/S2 official docs

Other Changes

  • Add LOG_LEVEL constant and LogLevel type to types.ts
  • Add DataAccess and Wave to DEBUG_CATEGORY
  • Create 4 new DurationLogEvent classes for begin/end pairs: CursorCreateBegin, FormulaEvaluateBegin, RlmConfiguratorBegin, RlmPricingBegin
  • Remove duplicate entries from _logEventNames
  • Sort all event arrays alphabetically

Test plan

  • New EventMetadata.test.ts validates all events are recognised and debugLevel is set
  • All 775 existing tests pass
  • Lint clean (eslint, prettier, tsc)
  • Parser and authoritative salesforce-debug-log-events.json match exactly (299 events, 0 property mismatches)

Resolves #618

Add support for 49 previously unrecognised debug log events sourced from
the Salesforce Debug Level page, including cursor operations, formula
evaluation, RLM configurator/pricing, org/session cache, policy rules,
data access evaluation, and additional flow/workflow events.

- Add LOG_LEVEL constant and LogLevel type to types.ts
- Add DataAccess and Wave to DEBUG_CATEGORY
- Populate debugLevel and debugCategory on all event classes per
  official Salesforce documentation
- Fix category mismatches (e.g. VF_SERIALIZE_VIEWSTATE_BEGIN was
  ApexCode, should be Visualforce; USER_DEBUG was ApexProfiling,
  should be ApexCode)
- Create DurationLogEvent classes for begin/end pairs:
  CursorCreateBegin, FormulaEvaluateBegin, RlmConfiguratorBegin,
  RlmPricingBegin
- Remove duplicate entries from _logEventNames
- Sort all event arrays alphabetically
- Add EventMetadata test suite
…sses

Verified all event metadata against official Salesforce documentation
 (S1: developer docs, S2: help.salesforce.com) and live org data (S3).

Level corrections (53 events):

- 25 WF\_\* events: Fine → Info
- 8 FLOW detail events: Fine → Finer
- 5 FLOW/EVENT_SERVICE info events: Fine → Info
- 4 System events (MODE_ENTER/EXIT, TRACE_FLAGS): Debug → Info
- 4 Duplicate Detection/Match Engine events: Debug → Info
- 2 SLA events: Fine → Info
- 2 PUSH_NOTIFICATION events: Fine → Debug
- WF_FLOW_ACTION_DETAIL: Finer → Fine
- LIMIT_USAGE_FOR_NS: Error → Finest
- XDS_RESPONSE_ERROR: Info → Error

Category corrections (3 events):

- VF_APEX_CALL_START: ApexCode → Visualforce (empirically verified)
- LIMIT_USAGE_FOR_NS: NBA → ApexProfiling
- XDS_RESPONSE_ERROR: System → Callout
- VF_SERIALIZE/DESERIALIZE_CONTINUATION_STATE: ApexCode → Visualforce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ feat: apex log parser - update event support

1 participant