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

BugsnagBreadcrumbs.arrayValue returns NSArray<NSDictionary*> * not NSArray<NSString*> * as documented #747

Closed
bolsinga opened this issue Jul 8, 2020 · 7 comments · Fixed by #748
Labels
feature request Request for a new feature released This feature/bug fix has been released

Comments

@bolsinga
Copy link

bolsinga commented Jul 8, 2020

[contents addObject:objectValue];

We are going to pull the breadcrumbs into our internal bug reports. I found the types are incorrectly documented. I'm not sure how, but pre-6.0 the JSON data was decoded, but the dictionary was added to the array. In 6.0 the JSON is not decoded, but the dictionary is still in the array. it's still checked for JSON compatibility.

It should be documented correctly. I also think it would be good to have strings in the array, but that is an open question.

@bolsinga bolsinga changed the title BugsnagBreadcrumbs.arrayValue returns NSArray<NSDictionary*) * not NSArray<NSString*> * as documented BugsnagBreadcrumbs.arrayValue returns NSArray<NSDictionary*> * not NSArray<NSString*> * as documented Jul 8, 2020
@abigailbramble
Copy link

Hi @bolsinga - yes this has changed in v6, as you have suggested. Thanks for bringing this to our attention, we will look to fix the header docs in the next release.

This is not actually on a public method. The current recommended way of exposing breadcrumbs is by using an OnBreadcrumbCallback method: https://docs.bugsnag.com/platforms/android/configuration-options/#addonbreadcrumb

@bolsinga
Copy link
Author

bolsinga commented Jul 8, 2020

@phillipsam Thanks. Since our app is what is leaving the breadcrumbs, having a callback to know what breadcrumb was just sent seems redundant. If there is not a way to query the current breadcrumbs, then it would be best for us to cache the breadcrumbs being sent to Bugsnag and not implement a callback to get the same data.

If possible, please re-consider having a way to request the current breadcrumbs. We're working on making our internal bug reports and the data found by Bugsnag "line-up". Thanks.

@abigailbramble
Copy link

Hi @bolsinga - thanks for the clarification. One option available is to use an OnSendError callback to get the breadcrumbs list in an event:
https://github.com/bugsnag/bugsnag-cocoa/blob/master/Bugsnag/include/Bugsnag/BugsnagEvent.h#L60

@bolsinga
Copy link
Author

Hi @phillipsam I haven't been able to update to 6.0 yet because when I last checked, it isn't integrated into BugsnagReactNative / iOS yet. But when I search for "BugsnagEvent alloc" it seems it is created once a crash is detected.

I'd like to get the data Bugsnag is storing before a crash is reported. We have an internal bug reporter and it would be nice to be able to see the same data there as is found in our crash reports. I'd also not like to have to duplicate all of Bugsnag's data store.

I'll state my problem in a less specific way than bread crumbs. How may I query the data Bugsnag is tracking for this app launch to gather it before a crash is detected?

@abigailbramble
Copy link

Hi @bolsinga thanks for the clarification. We will look into providing a getter for breadcrumbs so you can access this information prior to a crash.

@abigailbramble abigailbramble added backlog We hope to fix this feature/bug in the future feature request Request for a new feature labels Jul 15, 2020
@bolsinga
Copy link
Author

Hi @bolsinga thanks for the clarification. We will look into providing a getter for breadcrumbs so you can access this information prior to a crash.

Thanks! If the other meta data was available too, it would be terrific.

@mattdyoung
Copy link

@bolsinga This has now been added in #813 and released. There was a separate issue with v6.1.5 which we've now resolved so we'd recommend using v6.1.6.

@mattdyoung mattdyoung added released This feature/bug fix has been released and removed backlog We hope to fix this feature/bug in the future labels Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature released This feature/bug fix has been released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants