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

Error type support #372

Closed
christinachimi opened this issue Mar 24, 2023 · 1 comment · Fixed by #373
Closed

Error type support #372

christinachimi opened this issue Mar 24, 2023 · 1 comment · Fixed by #373
Labels
enhancement New feature or request pending-native-sdk This issue is dependent on the release of a native SDK.

Comments

@christinachimi
Copy link

Is your feature request related to a problem? Please describe.
It's often helpful to be able to easily group errors to determine their overall impact and look for commonalities.

Describe the solution you'd like
I would like the errors in Error Tracking to have an Error Type, likely the exception.runtimeType of the error when available.

Describe alternatives you've considered
RUM does a pretty good job of tagging similar errors together, so if I find one that is in the category I'm interested in I can sometimes reverse engineer this. But it's not very friendly for dashboarding or at-a-glance views.

Additional context
The example that brought this up is the StateError. I am transitioning off of another error tracking tool that presented me with a trending StateError in my app. When I tried to find that same error in RUM, I could not (until I realized that StateError wasn't actually mentioned in the tracker, and that I had to search for the underlying "Bad state" message).

@christinachimi christinachimi added the enhancement New feature or request label Mar 24, 2023
@fuzzybinary
Copy link
Collaborator

Hi @christinachimi, thanks for the report!

Yes, this looks like an oversight in the API for RUM. I'll look into adding it soon.

As a workaround. Logging (and Error Tracking in Logs) does support sending an Error Type as a String, and there should be no issues sending errors to both Logs and RUM if that will work for you.

Modify your error reporting initialization code with the following:

      DatadogSdk.instance.logs?.error(
        e.toString(),
        message: e.toString(),
        errorKind: e.runtimeType.toStirng()
        stackTrace: s,
      );
    });

Note that runtimeType will not be usable in Obfuscated build, as it won't return the name of the actual type. If you need to track s specific type of error and you're obfuscating, I would catch it and manually report that type in the "errorKind" element.

@fuzzybinary fuzzybinary added the pending-native-sdk This issue is dependent on the release of a native SDK. label Mar 27, 2023
fuzzybinary added a commit that referenced this issue Mar 28, 2023
Not having this was an oversight.

Fixes #372
fuzzybinary added a commit that referenced this issue Mar 29, 2023
Not having this was an oversight.

Fixes #372
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pending-native-sdk This issue is dependent on the release of a native SDK.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants