♻️ Route fetch, XHR, and console through bufferedDataObservable#4470
Draft
thomas-lebeau wants to merge 1 commit intov7from
Draft
♻️ Route fetch, XHR, and console through bufferedDataObservable#4470thomas-lebeau wants to merge 1 commit intov7from
thomas-lebeau wants to merge 1 commit intov7from
Conversation
e98e9d5 to
629186b
Compare
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
|
✨ Fix all issues with BitsAI or with Cursor
|
629186b to
496df82
Compare
- Add FETCH, XHR, and CONSOLE types to BufferedData discriminated union
- Subscribe to fetch/xhr/console observables in startBufferingData()
- Update Logs and RUM consumers to receive network and console events
via bufferedDataObservable instead of subscribing directly
- Remove early instrumentation (subscribe(noop)) from preStart phases
- Remove trackConsoleError (replaced by console handling in errorCollection)
- Convert fetchObservable/xhrObservable/consoleObservable from
BufferedObservable to plain Observable (buffering now centralized)
- Normalize BufferedData shape to use { type, data } consistently
496df82 to
27309cc
Compare
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
Centralize the buffering of fetch, XHR, and console observables into
bufferedDataObservableinstead of each observable managing its own buffer. This simplifies the pre-start data flow and removes the need for early instrumentation (subscribe(noop)) and product-specific wrappers liketrackConsoleError.Changes
FETCH,XHR, andCONSOLEtypes to theBufferedDatadiscriminated union with a consistent{ type, data }shapestartBufferingData()so buffering is centralizedbufferedDataObservableinstead of subscribing directly to each observablefetchObservable/xhrObservable/consoleObservablefromBufferedObservableto plainObservable(buffering now centralized)subscribe(noop)) from pre-start phasestrackConsoleError(replaced by console handling inerrorCollection)Test instructions
yarn test:unitto verify all unit tests passChecklist