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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃挕 Add ability to report crash events #2514

Open
blchelle opened this issue Nov 29, 2023 · 2 comments
Open

馃挕 Add ability to report crash events #2514

blchelle opened this issue Nov 29, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@blchelle
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The datadog RUM sessions explorer has a "Crashes" filter that I'd like to be able to use. Unfortunately it currently seems impossible to emit an error event with the is_crash flag, despite that field being present on the RumErrorEvent type.

My guess is that the is_crash flag was was only intended to be used by the mobile sdk's but please let me know if I'm wrong.

Describe the solution you'd like
I'd like to be able to call datadogRum.addError(), and there is some way to specify whether the error was a crash or not.

For example, in our teams React application we have an component that wraps the rest of our application, if the fallback for the ErrorBoundary component renders, that means our application has "crashed" so I'd like to emit a crash event from there.

Describe alternatives you've considered
In my calls to addError(), I've attempted to manually set the is_crash property to true on the error, however this flag never seems to be propagated back to RUM.

@blchelle blchelle added the enhancement New feature or request label Nov 29, 2023
@amortemousque
Copy link
Contributor

amortemousque commented Nov 30, 2023

Hello @blchelle, yes is_crash is currently only used for mobile SDK.
Your suggestion is interesting, however browser do have crash reporting and in the future, we might want to leverage this field to convey this information.
For now, I recommend using the error context to flag your errors addError(error, { is_crash: true })

@blchelle
Copy link
Contributor Author

Thank you for the proposed solution @amortemousque! This will work as a temporary fix for now.
However, the team really wants the ability to simply select the "Crashes" filter in Sessions Explorer to filter by crashes.

Selecting that filter adds a @error.is_crash:true to the sessions explorer which won't match any of our reported crashes, since they'll have to be queried by the filter @context.is_crash:true

Either of the following would work for us, though I'm not sure how

  1. Allow us to configure the "Crashes" filter to set the query to @context.is_crash:true instead of @error.is_crash:true.
  2. Allow for some way to set the is_crash attribute on the error, instead of on the context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants