Answers by Crashlytics - Adding Custom Event

Answers By Crashlytics - adding custom event

Wanted to close this question since it is now answered from the comments:

I failed to call

import Crashlytics

At the top of the view controller like a complete idiot.

Also, I had added

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
Fabric.with([Crashlytics.self, Answers.self])

When it is correct as:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
Fabric.with([Crashlytics.self])

Answers is included in the Crashlytics call.

Fabric Answers Event: how to see all custom attributes?

In Fabric, we show the top 10 and there isn't a way to see the full 400. If you link your app to Firebase you can access up to 25 attributes. Check out https://docs.fabric.io/apple/answers/ios-export-firebase.html for more details.

Firebase Crashlytics reporting with custom keys

You can add custom keys whenever you want, after initializing Crashlytics. The keys would be attached to any future crash during the life of the app.

You can have up to 64 key/value pairs (after that, they aren't saved). So if you sent into Crashlytics 64 key/value pairs, then later the app crashed, those 64 key/value pairs would be added info in the crash report which is created and sent to Fabric and Firebase at next launch of the app.

There are no callbacks due to a crash in the app session... the app crashed and thus terminated, after all! :)

Using Crashlytics to send custom reports?

Fabric provides an analytics module called answers.

It let you track events inside your app.
There are some predefined events but its also possible to define
your own events with custom attributes like this:

Answers.getInstance().logCustom(
new CustomEvent("Error")
.putCustomAttribute("Error Passing Data for User", user.getId())
);

Tracked events are available nearly immediately and can be analyzed inside the webinterface of fabric.

Crashlytics - How to add Custom Keys - Eclipse

I don't believe Crashlytics has that capability yet. I asked support in late November about this and they said that is was on the roadmap. This is a quote from one of their support emails.

Custom events is definitely on our roadmap for Answers, the team is heads down on it right now.

You may have to use another provider for now until they implement this.

How to show custom logs from App to Crashlytics dashboard

- (void)recordError:(NSError *)error;
- (void)recordError:(NSError *)error withAdditionalUserInfo:(nullable CLS_GENERIC_NSDICTIONARY(NSString *, id) *)userInfo;

Just use the instance of Crashlytics and you can receive your non-fatal issue with the custom error.

Also, you can send additional logs

CLSLog(NSString *format, ...) 

And will be helpful to use Answers if you need to see some actions statistic or events.

+ (void)logCustomEventWithName:(NSString *)eventName
customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;

Firebase Analytics custom events paramethers on Dashboard

For seeing parameters in firebase dashboard first check if the event is triggered in DebugView and then you need to define some custom definitions.

Sample Image

In new custom definition choose from your previously given parameters. Normally it takes several hours to get the parameters in event parameter.

Sample Image

The parameter will be shown in Dashboard as event parameter after 24 hours and you can download it as CSV/PDF

Sample Image

No automatically tracked screens in Crashlytics logs. Only custom events are visible

Firebase here,

This is correct, the Analytics default events are no longer recorded as part of the breadcrumbs in iOS. A possible workaround for this would be to file these events as Crashlytics custom logs: https://firebase.google.com/docs/crashlytics/customize-crash-reports?platform=ios#add-logs

Along with this, you could file a feature request to include this data in the breadcrumbs.



Related Topics



Leave a reply



Submit