Repository navigation
feat!: trim the v1 event and log API - #139
Merged
Merged
Conversation
exitStamp already states where the log ends. The value differed only when the log ends in a leaf after the last frame, and nothing reads it. BREAKING CHANGE: ApexLog.executionEndTime is removed. Read the exitStamp of the last frame in children for the end of the last frame at the top.
suffix was display text, such as " (code unit)", chosen by event type. A caller that wants a label builds it from type and text. BREAKING CHANGE: ApexEvent.suffix is removed. For what started a flow, read details.codeUnitType of the code unit above it.
category was a timeline group (Apex, System, SOQL and so on): a display choice, not a fact of the log. A caller that wants a group can use kind or debugCategory, or group by type. BREAKING CHANGE: ApexEvent.category, EventTypeInfo.category, the CATEGORY const and the Category type are removed.
cpuType grouped an event's CPU time into six values, and one of them, "free", was the only Salesforce fact. It was set per event, but it holds for every event of a type. State it on the type, from the docs: the database time of DML, SOQL and SOSL, and the wait for a callout, use no application server CPU, so the platform does not count them toward the Apex CPU limit. BREAKING CHANGE: ApexEvent.cpuType, the CPU_TYPE const and the CpuType type are removed. EventTypeInfo.consumesCpuTime is false for the database frames and CALLOUT_REQUEST; use it in place of cpuType === 'free'.
The flag is true for a call into Apex code: a method entry, a constructor entry, and a Visualforce call that opens a frame. "Valid symbols" described a symbol lookup, which is a display concern. BREAKING CHANGE: ApexEvent.hasValidSymbols is now isApexCall. The rule is unchanged.
A leaf ends where it starts, so endTimestamp is a number on every event and in columns. Before, a leaf had exitStamp null and columns held NaN. BREAKING CHANGE: timestamp is now startTimestamp and exitStamp is now endTimestamp, on events, ApexLog and columns. A leaf's endTimestamp is its startTimestamp.
The v1 changeset listed every changed property. A migrator needs the design differences, so it states those, and the speed and memory figures.
lcottercertinia
approved these changes
Oct 15, 2026
4 of 11 tasks
lcottercertinia
pushed a commit
that referenced
this pull request
Oct 16, 2026
) ## 📝 Overview `suffix` was removed from v1. It told Flow and Process Builder apart for `FLOW_START_INTERVIEWS_BEGIN`, and a caller now has to climb to the code unit to get that. This adds the answer back, on the event. ## 🛠️ Changes - Add `details.flowType` to `FLOW_START_INTERVIEWS_BEGIN`: `'flow' | 'processBuilder' | null`. - The log line states none of it, so it is read from the code unit above the interviews: - `Flow` unit, or interviews inside other interviews: `'flow'`. - `Workflow` unit: `'processBuilder'`. - Any other unit, or none: `null`. The old `suffix` said Process Builder for any unit that was not `Flow`. - Add tests for each case. ## 🧩 Type of change - [ ] 🐛 Bug fix — fixes an issue - [x] ✨ Feature — adds new functionality - [ ] ♻️ Refactor — no behaviour change - [ ] ⚡ Performance - [ ] 📝 Docs - [ ] 🔧 Chore — tooling, CI, deps - [ ] 💥 Breaking change ## 🔗 Related issues Follows #139, which removed `suffix`. ## ✅ Checklist - [x] Tests added/updated - [x] `pnpm run ci` passes locally - [ ] Changeset added (`pnpm changeset`) if this affects the published package: not needed, `.changeset/v1.md` already lists `suffix` as removed, and `flowType` is new - [x] Docs updated if behaviour or the public API changed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Overview
Trims the v1 event and log API before the v1 release. Each cut removes a value that adds nothing for a parser, or moves a UI choice out of it.
.changeset/v1.mdstates each change for a v0.x migration.🛠️ Changes
ApexLog.executionEndTime.endTimestampis where the log ends.suffix. It was display text.category, and theCATEGORYconst. UsekindordebugCategory.cpuTypewitheventType(type).consumesCpuTime. It isfalsefor the database frames andCALLOUT_REQUEST, whose own time the platform does not count toward the Apex CPU limit.hasValidSymbolstoisApexCall. The rule is unchanged.timestamptostartTimestampandexitStamptoendTimestamp, on events,ApexLogandcolumns. A leaf ends where it starts, soendTimestampis a number on every event and incolumns. Before, a leaf hadnullandcolumnsheldNaN.One concern per commit: 6 code commits, then 1 that shortens
.changeset/v1.mdto the headline and the main differences.🧩 Type of change
🔗 Related issues
None.
✅ Checklist
pnpm run cipasses locallypnpm changeset) if this affects the published package