⚗️ [RUM-17561] prototype process events for main and renderer processes#178
Draft
bcaudan wants to merge 13 commits into
Draft
⚗️ [RUM-17561] prototype process events for main and renderer processes#178bcaudan wants to merge 13 commits into
bcaudan wants to merge 13 commits into
Conversation
- Add `RawRumProcess` to `rawRumData.types.ts` and extend `RawRumData` union - Remove `action/error/resource` counter fields from `RawRumView` and `createRawRumView` - Remove counter tracking from `ViewCollection` and update spec accordingly - Guard `MainAssembly` against non-RUM event types (`process`) being passed to `triggerRum`
…tType - ViewCollection: update stale comment to say 'increment document_version and schedule a throttled view update' - MainAssembly: derive RUM_EVENT_TYPES from a Record<RumEventType, 1> satisfies constraint so TypeScript enforces exhaustiveness and rejects values outside the union
…ke, is_fake) - ViewContext: url → electron://fake, add is_fake: true, drop name - ViewCollection: accept SessionManager, use session.id as view id, remove throttle and server-event counter logic - RumCollection + index.ts: thread sessionManager through to ViewCollection.start
The SESSION_EXPIRED handler was emitting a final process event but leaving the periodic timer running, causing resource leaks and spurious events after session end. Add clearInterval() call before the final event, and add a test verifying no further updates fire after expiry.
- Add ProcessCollection.start() at the end of init(), after RumCollection and MainAssembly are set up - Register the process enrichment hook before returning from init() - Export registerProcessContext from src/assembly/index.ts to comply with internal module rules
|
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.
Motivation
Electron apps run across multiple processes — main, renderer(s), utility — but the SDK currently flattens everything into a single main-process view, losing process identity. This makes it impossible for customers to understand where events were generated, and forces the main process to reuse view events for activity that has nothing to do with a view.
This prototype introduces a dedicated
processevent type so each process has its own lifecycle story, and enriches all RUM events withprocess.id/process.roleso customers can filter and correlate by origin process without ambiguity.Aligned with rum-events-format#415 (process schema draft). The submodule is switched to that branch;
RumProcessEventis not yet in the generated union so the type is defined locally asRawRumProcess.Changes
process.id,process.role) that is attached to all RUM events it generates, making it possible to filter and correlate events by origin process.view.is_fake: true) so it is clearly distinguishable from real renderer views. It no longer pretends to be a user-facing page.Test instructions
yarn workspace electron-sdk-playground devprocess.idandprocess.role, and that the main-process view hasview.url = electron://fake.Checklist