Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Custom fingerprint #1037

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

Closed
gabrielmoreira-nn opened this issue Oct 2, 2023 · 9 comments
Closed

Custom fingerprint #1037

gabrielmoreira-nn opened this issue Oct 2, 2023 · 9 comments
Labels

Comments

@gabrielmoreira-nn
Copy link

I couldn't find any way in the code to send a custom fingerprint when reporting an error that occurs in the JS.

We've integrated some native libraries that send various errors from native to JS, and these errors are handled when possible, exclusively in the JS layer. These errors will always have the same stack trace in the JS since they originate from the native bridge for the same operation. However, the actual errors that occur can be entirely different from each other.
We shouldn't group them together.

How can we address this?

@a7medev
Copy link
Contributor

a7medev commented Oct 4, 2023

Hi @gabrielmoreira-nn! Thanks for reporting this issue. We are currently discussing possible solutions to this issue and I will update you once we have something to share.

@stale
Copy link

stale bot commented Oct 12, 2023

This issue has been automatically marked as pending feedback because we need additional information to be able to investigate it further. It will be closed in 7 days if it remains inactive. Thank you for your contributions.

@gabrielmoreira-nn
Copy link
Author

@a7medev Do you see any quick or dirty workaround I could use until you find a proper approach?

@stale stale bot removed the Pending Feedback label Oct 13, 2023
@a7medev
Copy link
Contributor

a7medev commented Oct 16, 2023

@gabrielmoreira-nn If you have access to the native exception, I think you can report through the native Android/iOS SDKs in native code.

On Android:

IBGNonFatalException exception = new IBGNonFatalException.Builder(new NullPointerException("Test Exception"))
    .setUserAttributes(new HashMap<>())
    .setFingerprint("My Custom Fingerprint")
    .setLevel(IBGNonFatalException.Level.CRITICAL)
    .build();

CrashReporting.report(exception);

You can learn more about reporting crashes manually on Android in the docs.

On iOS:

NSException *exception = [NSException exceptionWithName:@"some_exception" reason:@"Exception reason" userInfo:nil];
IBGNonFatalException *nonFatalException = [IBGCrashReporting exception:exception];
nonFatalException.stackTraceMode = IBGNonFatalStackTraceModeFull;
[nonFatalException report];

You can learn more about reporting crashes manually on iOS in the docs.

@gabrielmoreira-nn
Copy link
Author

@a7medev Thanks! but in some cases, those are libraries we don't maintain the native code, and we use it through the JS side.

It would be much easier to have a way to ungroup errors for a specific stack trace location through the UI.

I understand that the default behavior makes sense, to group it based on stack trace, but for many codebases, it might be wrong. I suspect that many Instabug customers didn't notice this problem on their accounts, or worse they just stopped trusting the dashboard occurrences count. I saw both of these symptoms happening in the organization I work for.

@a7medev
Copy link
Contributor

a7medev commented Oct 16, 2023

@gabrielmoreira-nn Yes, I get what you mean. We already have support for adding a custom grouping string on the native side, so it's a matter of bringing that to React Native and we are planning to work on it in an upcoming cycle. I will update you once we have something to share 🙏🏼

@stale
Copy link

stale bot commented Oct 24, 2023

This issue has been automatically marked as pending feedback because we need additional information to be able to investigate it further. It will be closed in 7 days if it remains inactive. Thank you for your contributions.

@stale
Copy link

stale bot commented Oct 31, 2023

This issue has been automatically closed since we haven't heard back from you. Please feel free to re-open the issue if you have more information to add.

@stale stale bot closed this as completed Oct 31, 2023
@a7medev a7medev reopened this Nov 1, 2023
@stale stale bot removed the Pending Feedback label Nov 1, 2023
@a7medev a7medev added WIP Work In Progress Planned and removed WIP Work In Progress labels Nov 1, 2023
@a7medev
Copy link
Contributor

a7medev commented Jul 3, 2024

Custom grouping fingerprints support for non-fatal has been implemented in #1194 and released in version 13.1.1 of our Instabug React Native SDK, so I think we can close this issue now.

Thanks @gabrielmoreira-nn once again for reporting this, and please feel free to reopen it if that doesn't fix your issue.

@a7medev a7medev closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants