Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [RUMF-1573] Allow to provide custom fingerprint to RUM errors #2189

Merged
merged 5 commits into from
May 2, 2023

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented Apr 25, 2023

Motivation

Support Error Tracking custom grouping for RUM errors.

cf #2076

Changes

In order to use my-custom-grouping-material to group RUM errors into a single issue in Error Tracking, from the APIs:

const error = new Error('oh snap')
error.dd_fingerprint = 'my-custom-grouping-material'

DD_RUM.addError(error)
// or
console.error(error) 

Or from beforeSend callback:

DD_RUM.init({
  ...
  beforeSend: () => {
    if (event.type === 'error') {
      event.error.fingerprint = 'my-custom-grouping-material'
    }
  },
})

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@bcaudan bcaudan force-pushed the bcaudan/custom-fingerprint branch 2 times, most recently from 0f0b35b to 9b34836 Compare April 25, 2023 13:21
Copy link
Contributor Author

bcaudan commented Apr 25, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@codecov-commenter
Copy link

codecov-commenter commented Apr 25, 2023

Codecov Report

Merging #2189 (30980eb) into main (ba2d435) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2189      +/-   ##
==========================================
- Coverage   93.89%   93.88%   -0.01%     
==========================================
  Files         201      201              
  Lines        6073     6081       +8     
  Branches     1343     1346       +3     
==========================================
+ Hits         5702     5709       +7     
- Misses        371      372       +1     
Impacted Files Coverage Δ
packages/core/src/domain/error/error.types.ts 100.00% <ø> (ø)
...domain/logsCollection/console/consoleCollection.ts 100.00% <ø> (ø)
packages/rum-core/src/domain/assembly.ts 100.00% <ø> (ø)
...omain/rumEventsCollection/error/errorCollection.ts 100.00% <ø> (ø)
...ain/rumEventsCollection/error/trackConsoleError.ts 66.66% <ø> (ø)
...kages/core/src/domain/console/consoleObservable.ts 100.00% <100.00%> (ø)
packages/core/src/domain/error/error.ts 95.52% <100.00%> (+0.36%) ⬆️

... and 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@bcaudan bcaudan force-pushed the bcaudan/custom-fingerprint branch from 9b34836 to 51c4202 Compare April 25, 2023 16:00
@bcaudan bcaudan changed the title ✨ [RUMF-1573] Allow to provide custom fingerprint to error ✨ [RUMF-1573] Allow to provide custom fingerprint to RUM errors Apr 26, 2023
Base automatically changed from bcaudan/beforeSend-extension to main April 26, 2023 11:16
@bcaudan bcaudan force-pushed the bcaudan/custom-fingerprint branch from 51c4202 to 66c3c87 Compare April 26, 2023 11:19
@bcaudan
Copy link
Contributor Author

bcaudan commented Apr 26, 2023

/to-staging

@dd-devflow
Copy link

dd-devflow bot commented Apr 26, 2023

🚂 Branch Integration

commit 66c3c87 will soon be integrated into staging-17.

This build is going to start soon! (estimated merge in less than 34m)

you can cancel this operation by commenting your pull request with /to-staging -c!

@DataDog DataDog deleted a comment from dd-devflow bot Apr 26, 2023
@DataDog DataDog deleted a comment from dd-devflow bot Apr 26, 2023
@bcaudan bcaudan marked this pull request as ready for review April 26, 2023 11:39
@bcaudan bcaudan requested a review from a team as a code owner April 26, 2023 11:39
@dd-devflow
Copy link

dd-devflow bot commented Apr 26, 2023

🚨 Branch Integration

we couldn't automatically merge the commit 66c3c87 into staging-17!

Build pipeline failed for 804b538

You should have a look at the pipeline link and see if the build failed because of your changes or not.
When you are ready, re-add your pull request to the queue!

You can use this resolution PR: #2191 to fix the errors if they are specific to the current state of the target branch.

Details

gitlab pipeline failed link

If you need support, contact us on slack #ci-interfaces with those details!

packages/core/src/domain/error/error.ts Outdated Show resolved Hide resolved
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.

4 participants