Skip to content

✨ [RUM-14259] Add RUM error collection#23

Merged
bcaudan merged 11 commits into
mainfrom
bcaudan/error-collection
Mar 10, 2026
Merged

✨ [RUM-14259] Add RUM error collection#23
bcaudan merged 11 commits into
mainfrom
bcaudan/error-collection

Conversation

@bcaudan

@bcaudan bcaudan commented Feb 23, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Collect errors from node main process

Changes

  • Add RUM Error Collection class
  • Collect uncaught exceptions
  • Collect unhandled rejections
  • Add scenario on view error counter

Test instructions

Generate errors from the playground:

Screenshot 2026-02-23 at 10 06 21

Checklist

  • Tested locally (playground)
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.

@bcaudan bcaudan force-pushed the bcaudan/main-view-part2 branch from 5d2abd6 to 0dd3e7c Compare March 2, 2026 09:01
Base automatically changed from bcaudan/main-view-part2 to main March 2, 2026 09:03
@bcaudan bcaudan force-pushed the bcaudan/error-collection branch from 8c999ff to 2b01cab Compare March 2, 2026 09:08
@bcaudan bcaudan marked this pull request as ready for review March 2, 2026 09:09
@bcaudan bcaudan requested a review from cdn34dd as a code owner March 2, 2026 09:09
Comment thread src/domain/rum/ErrorCollection.ts Outdated
Comment thread src/domain/rum/ErrorCollection.ts Outdated
Comment thread src/domain/rum/rawRumData.types.ts Outdated
error: {
id: string;
message: string;
source: 'source';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this a bit too restrictive ?, The original type has a lot more, but maybe for now if we want to limit it, support some of the more immediate types we'll need ?

    source: 'source' | 'console' | 'custom';

@bcaudan bcaudan Mar 10, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add custom for the addError api and introduce other when we add support for them.

Comment thread src/domain/rum/ErrorCollection.ts
Comment thread src/domain/rum/ErrorCollection.ts
@bcaudan bcaudan force-pushed the bcaudan/error-collection branch from ac61bb2 to 2b01cab Compare March 9, 2026 09:57
bcaudan added 4 commits March 10, 2026 09:53
- expose addError via getApi() pattern on ErrorCollection and RumCollection
- widen RawRumError source/handling types to support manual errors
- wrap stopSession and _generateActivity with callMonitored
- add unit tests for getApi().addError
@bcaudan bcaudan requested a review from cdn34dd March 10, 2026 10:25
@bcaudan bcaudan merged commit 88a9ee8 into main Mar 10, 2026
10 checks passed
@bcaudan bcaudan deleted the bcaudan/error-collection branch March 10, 2026 17:06
@bcaudan bcaudan mentioned this pull request Mar 26, 2026
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.

2 participants