I've kept myself from using Firebase Analytics and Crash Reports because there was no way of disabling Crash Reporting.
I've seen the answers on other questions but not offered a proper way of doing it.
I've read an interesting thing on Firebase blog: https://firebase.googleblog.com/2017/03/take-control-of-your-firebase-init-on.html
I wonder, could this be used do disable analytics and crash reporting?
I mean, heaving something like:
if (user.wantsAnalytics()){
FirebaseApp.initializeApp(this, builder.build());
}else{
//do nothing and no analytics or crash reports will be sent.
}
If firebase isn't initialized, would push messaging still work?
Related
I'm using Firebase Crashlytics to report crashes. I'm using a game framework that handles logging for me and when running on Android, it logs to LogCat. I want to be able to include the LogCat logs with the crash report in Crashlytics. Is this possible?
I found this Library that could help (https://github.com/Ereza/LogcatReporter), but I'm not sure how well supported it is.
I know I can log like this:
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
crashlytics.log("my message");
crashlytics.log("E/TAG: my message");
But I would prefer for the framework I'm using to handle the logging.
Any way to include those LogCat logs? Does Firebase have a built in supported way?
I suppose there is no feature to save logs into Firebase Crashlytics, but I found an interesting solution for saving logs into Firebase Realtime Database.
I'm facing a weird crash on my app, I'd like to analyse it better using the firebase crashlytics console by analysing the analytics events that were generated on the section that has crashed. I've seen in documentations and videos that it would happen automatically and these analytics event would be shown at the "logs" tab, but for some reason my crashes don't contain these logs...
Does anyone have some clue of what I should do to make these logs be shown at my "log" tab on the console?
Obs:
- The crashes are being displayed on the console without any problem.
- Below I included an image that shows the exact tab I'm expecting to see these "analytics events". My console is in portuguese, but the "Registros" tab is the "logs" tab in the english version.
Fabric/Firebaser here - Google Analytics logs can come through to your Crashlytics sessions as long as you've enabled data sharing between GA and other Firebase products, and we call them breadcrumbs. One thing you can check to make sure nothing obvious is going wrong is your project's Analytics settings. If you head to Project Settings > Integrations > Google Analytics, you can scroll down to the data sharing portion of the integration to ensure that data is being shared between Analytics and other products.
It's also possible that Analytics itself isn't being configured correctly. You can take a look at your console logs to ensure that Analytics is reporting, and enable debug mode for more information.
Finally, it's possible that the crash happened before the breadcrumbs were captured. I'd especially expect this to be the culprit if you're noticing other crashes usually have the Analytics information you're expecting.
If you've got any specific questions or issues and the above doesn't help, feel free to reach out to support and they should be able to dig into it deeper.
I'm trying to set up my app with firebase+crashlytics for having a better error dashboard.
All the firebase stuff is already working and I'm able to access the features
I tested crashlytics with:
Crashlytics.getInstance().crash(); // Force a crash
and i'm able to see the stack trace on my dashboard (inside firebase)
but I'm trying to log non-fatal messages like:
Crashlytics.log("test");
And it doesn't appear anywhere
I followed the whole instructions at:
https://firebase.google.com/docs/crashlytics/customize-crash-reports
Still doesn't find any dashboard with the "test" messages
Where does it go? what am I missing?
Sending non-debug errors (e.g. your test message) logs to Crashlytics locally, but these exceptions are not uploaded until the app restarts.
As the documentation states:
Crashlytics batches logged exceptions together and sends them the next time the app launches.
This is presumably due to the primary Crashlytics functionality (reporting crashes) working in the same way, and non-fatal errors being a secondary concern using the same code flow.
Whilst this is unfortunate, there are many third party log-collating services that can handle the non-fatal errors.
Note: I'm aware you've received an answer in the comments from Crashlytics, I'm providing a more comprehensive answer for future visitors.
It's an old question any way i wanted to share what happens to messages logged using Crashlytics.log(msg); These logs are not immediately shown to dashboard. Crashlytics stores all the logged messages logged using log(msg) method and uploads it to server when a new Crash or Exception occurs.
You can see these messages in Firebase console under logs section as shown in below image
One more thing if you want to log exceptions there is another method for it Crashlytics.logException(exception)
Crashlytics isn't made for develop logging/debug, it is made to cluster hundreds/thousands of logs from different users at runtime, this may cause delays between the time the log message are recorded and when you will really be able to see them at the dashboard making it unusable for development debug.
If you want to use Crashlytics to follow the code workflow and debug during development, you will need to use the trick in this answer.
https://stackoverflow.com/a/69340289/5679560
As mentioned in below link
https://support.crashlytics.com/knowledgebase/articles/120066-how-do-i-use-logging
You can see this crashes on Crashlytics dashboard if you look at the specific crash itself.
The recommended way to add custom logging to your app is:
Crashlytics.log(int priority, String tag, String msg)
As firebase started supporting Crashlytics the Firebase crash reporting option is no longer available. Is there any way to see the Firebase crash reporting for the existing app which already using Firebase crash reporting
Mike from Firebase here. If you don't see the screen that Yogesh mentioned, from the Crashlytics dashboard, click on your app under Crashlytics and you should see both Crashlytics and Crash Reporting mentioned in order to switch between the dashboards.
If your project using crash reporting, then it is showing like this.
or like this
I'm connecting to firebase from a android app. My app is supposed to be writing data to my firebase, but it isn't. I'm also not seeing any errors, warnings, etc. logged to the console. So how do I crank up logging for the firebase to see what's actually going on? Does such a thing exist? I tried searching the firebase API docs, but couldn't find anything.
Errors will be logged automatically.
You can get more verbose logging from the Firebase Database by calling:
FirebaseDatabase.getInstance().setLogLevel(Logger.Level.DEBUG);