In the Crashlytics dashboard, you can click into an issue and get a detailed event report. You can customize those reports to help you better understand what's happening in your app and the circumstances around events reported to Crashlytics .
ধরা না পড়া ব্যতিক্রম এবং ধরা পড়া ব্যতিক্রমগুলি Crashlytics এ রিপোর্ট করুন।
আপনার অ্যাপটিকে কাস্টম কী , কাস্টম লগ বার্তা এবং ব্যবহারকারী শনাক্তকারী লগ করার জন্য ব্যবহার করুন।
Automatically get breadcrumb logs if your app uses the Firebase SDK for Google Analytics . These logs give you visibility into user actions leading up to a Crashlytics -collected event in your app.
স্বয়ংক্রিয় ক্র্যাশ রিপোর্টিং বন্ধ করুন এবং আপনার ব্যবহারকারীদের জন্য অপ্ট-ইন রিপোর্টিং সক্ষম করুন । মনে রাখবেন, ডিফল্টরূপে, Crashlytics স্বয়ংক্রিয়ভাবে আপনার সমস্ত অ্যাপ ব্যবহারকারীদের জন্য প্ল্যাটফর্ম-নেটিভ ক্র্যাশ রিপোর্ট সংগ্রহ করে।
ধরা না পড়া ব্যতিক্রমগুলি রিপোর্ট করুন
You can automatically catch all "fatal" errors that are thrown within the Flutter framework by overriding FlutterError.onError with FirebaseCrashlytics.instance.recordFlutterFatalError . Alternatively, to also catch "non-fatal" exceptions, override FlutterError.onError with FirebaseCrashlytics.instance.recordFlutterError :
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
bool weWantFatalErrorRecording = true;
FlutterError.onError = (errorDetails) {
if(weWantFatalErrorRecording){
FirebaseCrashlytics.instance.recordFlutterFatalError(errorDetails);
} else {
FirebaseCrashlytics.instance.recordFlutterError(errorDetails);
}
};
runApp(MyApp());
}
অ্যাসিঙ্ক্রোনাস ত্রুটি
অ্যাসিঙ্ক্রোনাস ত্রুটিগুলি ফ্লাটার ফ্রেমওয়ার্ক দ্বারা ধরা পড়ে না:
ElevatedButton(
onPressed: () async {
throw Error();
}
...
)
এই ধরনের ত্রুটি ধরার জন্য, আপনি PlatformDispatcher.instance.onError হ্যান্ডলার ব্যবহার করতে পারেন:
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
FlutterError.onError = (errorDetails) {
FirebaseCrashlytics.instance.recordFlutterFatalError(errorDetails);
};
// Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics
PlatformDispatcher.instance.onError = (error, stack) {
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
return true;
};
runApp(MyApp());
}
ফ্লটারের বাইরের ত্রুটিগুলি
Flutter প্রসঙ্গের বাইরে ঘটে যাওয়া ত্রুটিগুলি ধরতে, বর্তমান Isolate এ একটি ত্রুটি শ্রোতা ইনস্টল করুন:
Isolate.current.addErrorListener(RawReceivePort((pair) async {
final List<dynamic> errorAndStacktrace = pair;
await FirebaseCrashlytics.instance.recordError(
errorAndStacktrace.first,
errorAndStacktrace.last,
fatal: true,
);
}).sendPort);
রিপোর্টে ব্যতিক্রম ধরা পড়েছে
In addition to automatically reporting your app's crashes, Crashlytics lets you record non-fatal exceptions and sends them to you the next time a fatal event is reported or when the app restarts.
আপনার অ্যাপের ক্যাচ ব্লকগুলিতে নন-ফ্যাটাল এক্সেপশন রেকর্ড করতে recordError পদ্ধতি ব্যবহার করুন। উদাহরণস্বরূপ:
await FirebaseCrashlytics.instance.recordError(
error,
stackTrace,
reason: 'a non-fatal error'
);
// Or you can use:
await FirebaseCrashlytics.instance.recordFlutterError(errorDetails);
আপনি information সম্পত্তি ব্যবহার করে ত্রুটি সম্পর্কে আরও তথ্য লগ করতে চাইতে পারেন:
await FirebaseCrashlytics.instance.recordError(
error,
stackTrace,
reason: 'a non-fatal error',
information: ['further diagnostic information about the error', 'version 2.0'],
);
এই ব্যতিক্রমগুলি Firebase কনসোলে অ-মারাত্মক সমস্যা হিসাবে প্রদর্শিত হয়। সমস্যা সারাংশে সংস্করণ এবং হার্ডওয়্যার ডিভাইস অনুসারে ব্রেকডাউন সহ, ক্র্যাশ থেকে আপনি সাধারণত যে সমস্ত অবস্থা তথ্য পান তা অন্তর্ভুক্ত থাকে।
Crashlytics processes exceptions on a dedicated background thread to minimize the performance impact to your app. To reduce your users' network traffic, Crashlytics will rate-limit the number of reports sent off device, if necessary.
কাস্টম কী যোগ করুন
Custom keys help you get the specific state of your app leading up to a crash. You can associate arbitrary key/value pairs with your crash reports, then use the custom keys to search and filter crash reports in the Firebase console.
Crashlytics ড্যাশবোর্ডে , আপনি এমন সমস্যাগুলি অনুসন্ধান করতে পারেন যা একটি কাস্টম কী-এর সাথে মেলে।
When you're reviewing a specific issue in the console, you can view the associated custom keys for each event ( Keys subtab) and even filter the events by custom keys ( Filter menu at the top of the page).
কী/মান জোড়া সেট করতে setCustomKey ইনস্ট্যান্স পদ্ধতি ব্যবহার করুন। এখানে কিছু উদাহরণ দেওয়া হল:
// Set a key to a string.
FirebaseCrashlytics.instance.setCustomKey('str_key', 'hello');
// Set a key to a boolean.
FirebaseCrashlytics.instance.setCustomKey("bool_key", true);
// Set a key to an int.
FirebaseCrashlytics.instance.setCustomKey("int_key", 1);
// Set a key to a long.
FirebaseCrashlytics.instance.setCustomKey("int_key", 1L);
// Set a key to a float.
FirebaseCrashlytics.instance.setCustomKey("float_key", 1.0f);
// Set a key to a double.
FirebaseCrashlytics.instance.setCustomKey("double_key", 1.0);
কাস্টম লগ বার্তা যোগ করুন
To give yourself more context for the events leading up to a crash, you can add custom Crashlytics logs to your app. Crashlytics associates the logs with your crash data and displays them in the Firebase console , under the Crashlytics Logs tab.
সমস্যাগুলি চিহ্নিত করতে log ব্যবহার করুন। উদাহরণস্বরূপ:
FirebaseCrashlytics.instance.log("Higgs-Boson detected! Bailing out");
ব্যবহারকারী শনাক্তকারী সেট করুন
কোনও সমস্যা নির্ণয়ের জন্য, আপনার কোন ব্যবহারকারী ক্র্যাশের সম্মুখীন হয়েছেন তা জানা প্রায়শই সহায়ক। Crashlytics আপনার ক্র্যাশ রিপোর্টে ব্যবহারকারীদের বেনামে সনাক্ত করার একটি উপায় অন্তর্ভুক্ত করে।
আপনার রিপোর্টে ব্যবহারকারীর আইডি যোগ করতে, প্রতিটি ব্যবহারকারীকে একটি আইডি নম্বর, টোকেন, অথবা হ্যাশ করা মানের আকারে একটি অনন্য শনাক্তকারী বরাদ্দ করুন:
FirebaseCrashlytics.instance.setUserIdentifier("12345");
If you ever need to clear a user identifier after you set it, reset the value to a blank string. Clearing a user identifier does not remove existing Crashlytics records. If you need to delete records associated with a user ID, contact Firebase support .
ব্রেডক্রাম্ব লগ পান
Breadcrumb logs give you a better understanding of the interactions that a user had with your app leading up to a crash, non-fatal, or ANR event. These logs can be helpful when trying to reproduce and debug an issue.
Breadcrumb logs are powered by Google Analytics, so to get breadcrumb logs, you need to enable Google Analytics for your Firebase project and add the Firebase SDK for Google Analytics to your app. Once these requirements are met, breadcrumb logs are automatically included with an event's data within the Logs tab when you view the details of an issue.
The Analytics SDK automatically logs the screen_view event which enables the breadcrumb logs to show a list of screens viewed before the crash, non-fatal, or ANR event. A screen_view breadcrumb log contains a firebase_screen_class parameter.
ব্যবহারকারীর সেশনের মধ্যে ম্যানুয়ালি লগ করা যেকোনো কাস্টম ইভেন্ট দিয়ে ব্রেডক্রাম্ব লগগুলি পূর্ণ করা হয়, যার মধ্যে ইভেন্টের প্যারামিটার ডেটাও অন্তর্ভুক্ত থাকে। এই ডেটা ব্যবহারকারীর ক্র্যাশ, নন-ফ্যাটাল বা ANR ইভেন্টের দিকে পরিচালিত করে এমন একাধিক ক্রিয়া দেখাতে সাহায্য করতে পারে।
মনে রাখবেন যে আপনি Google Analytics ডেটা সংগ্রহ এবং ব্যবহার নিয়ন্ত্রণ করতে পারেন, যার মধ্যে ব্রেডক্রাম্ব লগ পূরণ করে এমন ডেটা অন্তর্ভুক্ত রয়েছে।
অপ্ট-ইন রিপোর্টিং সক্ষম করুন
By default, Crashlytics automatically collects crash reports for all your app's users. To give users more control over the data they send, you can enable opt-in reporting by disabling automatic reporting and only sending data to Crashlytics when you choose to in your code.
স্থানীয়ভাবে স্বয়ংক্রিয় সংগ্রহ বন্ধ করুন:
অ্যাপল প্ল্যাটফর্মগুলি
আপনার
Info.plistফাইলে একটি নতুন কী যোগ করুন:- কী:
FirebaseCrashlyticsCollectionEnabled - মান:
false
অ্যান্ড্রয়েড
আপনার
AndroidManifest.xmlফাইলেরapplicationব্লকে, স্বয়ংক্রিয় সংগ্রহ বন্ধ করতে একটিmeta-dataট্যাগ যোগ করুন:<meta-data android:name="firebase_crashlytics_collection_enabled" android:value="false" />- কী:
রানটাইমে Crashlytics ডেটা সংগ্রহ ওভাররাইড কল করে নির্বাচিত ব্যবহারকারীদের জন্য সংগ্রহ সক্ষম করুন। ওভাররাইড মান আপনার অ্যাপের পরবর্তী সমস্ত লঞ্চে বজায় থাকে যাতে Crashlytics স্বয়ংক্রিয়ভাবে সেই ব্যবহারকারীর জন্য প্রতিবেদন সংগ্রহ করতে পারে।
FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);If the user later opts-out of data collection, you can pass
falseas the override value, which will apply the next time the user launches the app and will persist across all subsequent launches for that user.
ক্র্যাশ ইনসাইট ডেটা পরিচালনা করুন
ক্র্যাশ ইনসাইটস আপনার বেনামী স্ট্যাক ট্রেসগুলিকে অন্যান্য ফায়ারবেস অ্যাপের ট্রেসের সাথে তুলনা করে এবং আপনার সমস্যাটি কোনও বৃহত্তর ট্রেন্ডের অংশ কিনা তা আপনাকে জানিয়ে সমস্যা সমাধানে সহায়তা করে। অনেক সমস্যার জন্য, ক্র্যাশ ইনসাইটস এমনকি ক্র্যাশ ডিবাগ করতে সহায়তা করার জন্য সংস্থান সরবরাহ করে।
ক্র্যাশ ইনসাইটস সাধারণ স্থিতিশীলতার প্রবণতা সনাক্ত করতে সমষ্টিগত ক্র্যাশ ডেটা ব্যবহার করে। আপনি যদি আপনার অ্যাপের ডেটা শেয়ার না করতে চান, তাহলে আপনি Firebase কনসোলে আপনার Crashlytics সমস্যা তালিকার শীর্ষে থাকা Crash Insights মেনু থেকে Crash Insights থেকে অপ্ট-আউট করতে পারেন।