عیب یابی نظارت بر عملکرد و سوالات متداول


این صفحه نکات عیب یابی را برای شروع کار با Performance Monitoring یا استفاده از ویژگی ها و ابزار Performance Monitoring ارائه می دهد.

اولین بررسی برای عیب یابی

دو بررسی زیر بهترین روش‌های عمومی هستند که قبل از عیب‌یابی بیشتر به همه توصیه می‌شوند.

1. پیام های گزارش را برای رویدادهای عملکرد بررسی کنید

پیام‌های گزارش خود را بررسی کنید تا مطمئن شوید که SDK Performance Monitoring ، رویدادهای عملکرد را ضبط می‌کند.

  1. با افزودن یک عنصر <meta-data> به فایل AndroidManifest.xml برنامه خود، گزارش اشکال زدایی را برای Performance Monitoring در زمان ساخت فعال کنید، مانند:

    <application>
        <meta-data
          android:name="firebase_performance_logcat_enabled"
          android:value="true" />
    </application>
  2. پیام های گزارش خود را برای هرگونه پیام خطا بررسی کنید.

  3. Performance Monitoring پیام‌های گزارش خود را با FirebasePerformance برچسب‌گذاری می‌کند. با استفاده از فیلتر logcat، می توانید به طور خاص با اجرای دستور زیر، ردیابی مدت زمان و ثبت درخواست شبکه HTTP/S را مشاهده کنید:

    adb logcat -s FirebasePerformance
  4. انواع گزارش‌های زیر را بررسی کنید که نشان می‌دهد Performance Monitoring رویدادهای عملکرد را ثبت می‌کند:

    • Logging trace metric: TRACE_NAME , FIREBASE_PERFORMANCE_CONSOLE_URL
    • Logging network request trace: URL
  5. برای مشاهده داده های خود در کنسول Firebase روی URL کلیک کنید. ممکن است چند لحظه طول بکشد تا داده ها در داشبورد به روز شوند.

اگر برنامه شما رویدادهای عملکرد را ثبت نمی‌کند، نکات عیب‌یابی را مرور کنید.

2. داشبورد وضعیت Firebase را بررسی کنید

در صورت وجود قطعی شناخته شده برای Firebase یا برای Performance Monitoring داشبورد وضعیت Firebase را بررسی کنید.

شروع کار با Performance Monitoring

اگر با Performance Monitoring ( iOS+ | Android | وب ) شروع کرده اید، نکات عیب یابی زیر می تواند به مشکلاتی کمک کند که Firebase SDK را شناسایی کند یا اولین داده عملکرد شما را در کنسول Firebase نمایش دهد.

هنگامی که Firebase اطلاعات رویداد (مانند تعاملات برنامه) را از برنامه شما دریافت می کند، تشخیص دهد که آیا SDK Performance Monitoring با موفقیت به برنامه خود اضافه کرده اید یا خیر. معمولاً ظرف 10 دقیقه پس از شروع برنامه شما، داشبورد عملکرد کنسول Firebase پیام «SDK شناسایی شد» را نمایش می‌دهد. سپس ظرف 30 دقیقه، داشبورد داده های اولیه پردازش شده را نمایش می دهد.

اگر بیش از 10 دقیقه از افزودن آخرین نسخه SDK به برنامه خود می گذرد و هنوز هیچ تغییری نمی بینید، پیام های گزارش خود را بررسی کنید تا مطمئن شوید که Performance Monitoring رویدادها را ثبت می کند. برای عیب‌یابی پیام تشخیص تأخیر SDK، مراحل عیب‌یابی مناسب را همانطور که در زیر توضیح داده شده است، امتحان کنید.

  1. مطمئن شوید که از Performance Monitoring Android SDK 19.1.0 یا بالاتر (یا Firebase BoM 26.3.0 یا جدیدتر) استفاده می‌کنید، به Release Note مراجعه کنید.

  2. اگر هنوز به صورت محلی در حال توسعه هستید، سعی کنید رویدادهای بیشتری برای جمع آوری داده ها ایجاد کنید:

    1. رویدادها را با جابجایی برنامه خود بین پس‌زمینه و پیش‌زمینه چندین بار، تعامل با برنامه خود با پیمایش در صفحه‌ها و/یا راه‌اندازی درخواست‌های شبکه ایجاد کنید.
  3. مطمئن شوید که فایل پیکربندی Firebase شما ( google-services.json ) به درستی به برنامه شما اضافه شده است و فایل را تغییر نداده اید. به طور خاص موارد زیر را بررسی کنید:

    • نام فایل پیکربندی با کاراکترهای اضافی مانند (2) اضافه نشده است.

    • فایل پیکربندی در دایرکتوری ماژول (سطح برنامه) برنامه شما قرار دارد.

    • شناسه برنامه Android Firebase ( mobilesdk_app_id ) فهرست شده در فایل پیکربندی برای برنامه شما صحیح است. شناسه برنامه Firebase خود را در کارت برنامه‌های شما تنظیمات پروژه تنظیمات پیدا کنید.

    اگر مشکلی در فایل پیکربندی برنامه شما به نظر می رسد، موارد زیر را امتحان کنید:

    1. فایل پیکربندی را که در حال حاضر در برنامه خود دارید حذف کنید.

    2. برای دانلود فایل پیکربندی جدید و اضافه کردن آن به برنامه اندروید خود، این دستورالعمل ها را دنبال کنید.

  4. اگر SDK رویدادها را ثبت می کند و به نظر می رسد همه چیز به درستی تنظیم شده است، اما همچنان پیام تشخیص SDK یا داده های پردازش شده را نمی بینید (پس از 10 دقیقه)، با پشتیبانی Firebase تماس بگیرید .

  1. تنظیمات پلاگین Performance Monitoring Gradle را به شرح زیر بررسی کنید:

    1. مطمئن شوید که افزونه را به درستی اضافه کرده اید. به طور خاص موارد زیر را بررسی کنید:

      • شما این افزونه را اضافه کردید ( apply plugin: 'com.google.firebase.firebase-perf' ) در فایل build.gradle ماژول (سطح برنامه) خود.
      • شما وابستگی classpath را برای افزونه ( classpath 'com.google.firebase:perf-plugin:1.4.2' ) در فایل build.gradle در سطح پروژه خود قرار دادید.

    2. اطمینان حاصل کنید که افزونه از طریق هیچ یک از پرچم های زیر غیرفعال نیست :

      • instrumentationEnabled در فایل build.gradle ماژول شما (سطح برنامه).
      • firebasePerformanceInstrumentationEnabled در فایل gradle.properties شما

  2. بررسی کنید که SDK نظارت بر عملکرد از طریق هیچ یک از پرچم‌های زیر در فایل AndroidManifest.xml شما Performance Monitoring نباشد :

    • firebase_performance_collection_enabled
    • firebase_performance_collection_deactivated
  3. مطمئن شوید که Performance Monitoring در زمان اجرا غیرفعال نیست .

  4. اگر نمی توانید چیزی را که در برنامه خود غیرفعال است پیدا کنید، با پشتیبانی Firebase تماس بگیرید .

Performance Monitoring ، داده‌های رویداد عملکرد را قبل از نمایش در داشبورد عملکرد پردازش می‌کند.

اگر بیش از 24 ساعت از ظاهر شدن پیام "SDK شناسایی شد" می گذرد و هنوز داده ها را نمی بینید، در صورت وجود قطعی شناخته شده، داشبورد وضعیت Firebase را بررسی کنید. اگر قطعی وجود ندارد، با پشتیبانی Firebase تماس بگیرید .

عیب یابی عمومی

اگر با موفقیت SDK را اضافه کرده‌اید و Performance Monitoring در برنامه خود استفاده می‌کنید، نکات عیب‌یابی زیر می‌تواند به مشکلات کلی مربوط به ویژگی‌های Performance Monitoring و ابزار کمک کند.

اگر پیام‌های گزارش رویدادهای عملکرد را نمی‌بینید، مراحل عیب‌یابی زیر را امتحان کنید:

  1. تنظیمات پلاگین Performance Monitoring Gradle را به شرح زیر بررسی کنید:

    1. مطمئن شوید که افزونه را به درستی اضافه کرده اید. به طور خاص موارد زیر را بررسی کنید:

      • شما این افزونه را اضافه کردید ( apply plugin: 'com.google.firebase.firebase-perf' ) در فایل build.gradle ماژول (سطح برنامه) خود.
      • شما وابستگی classpath را برای افزونه ( classpath 'com.google.firebase:perf-plugin:1.4.2' ) در فایل build.gradle در سطح پروژه خود قرار دادید.

    2. اطمینان حاصل کنید که افزونه از طریق هیچ یک از پرچم های زیر غیرفعال نیست :

      • instrumentationEnabled در فایل build.gradle ماژول شما (سطح برنامه).
      • firebasePerformanceInstrumentationEnabled در فایل gradle.properties شما

  2. بررسی کنید که SDK نظارت بر عملکرد از طریق هیچ یک از پرچم‌های زیر در فایل AndroidManifest.xml شما Performance Monitoring نباشد :

    • firebase_performance_collection_enabled
    • firebase_performance_collection_deactivated
  3. مطمئن شوید که Performance Monitoring در زمان اجرا غیرفعال نیست .

  4. اگر نمی توانید چیزی را که در برنامه خود غیرفعال است پیدا کنید، با پشتیبانی Firebase تماس بگیرید .

اگر داده‌ای را برای ردیابی نمایش صفحه از دست داده‌اید، مراحل عیب‌یابی زیر را امتحان کنید:

  1. مطمئن شوید که از آخرین نسخه Android SDK (نسخه 21.0.4) استفاده می کنید. ردیابی نمایش صفحه فقط با نسخه 15.2.0 یا جدیدتر در دسترس است.

  2. مطمئن شوید که شتاب سخت‌افزاری را برای یک صفحه غیرفعال نکرده‌اید.

  3. مطمئن شوید که از DexGuard یا Jack استفاده نمی کنید. Performance Monitoring با این زنجیره‌های ابزار ناسازگار است.

    • DexGuard جمع آوری خودکار شروع برنامه، برنامه در پیش زمینه و ردیابی برنامه در پس زمینه را غیرفعال می کند. با این حال، اگر برنامه شما از DexGuard استفاده می کند، هر ردیابی کد سفارشی باید به طور معمول رفتار کند.

    • جک منسوخ شده است و معمولاً نباید در برنامه شما استفاده شود.

آیا داده‌های عملکردی را برای ردیابی‌های جمع‌آوری‌شده خودکار می‌بینید اما برای ردیابی کد سفارشی نه ؟ مراحل عیب یابی زیر را امتحان کنید:

  1. اگر ردیابی های کد سفارشی را از طریق Trace API تنظیم کرده اید، تنظیمات ردیابی ها را بررسی کنید، به خصوص موارد زیر:

    • نام‌های ردیابی کد سفارشی و معیارهای سفارشی باید شرایط زیر را داشته باشند: بدون فضای سفید اصلی یا انتهایی، بدون نویسه زیرخط اصلی ( _ ) و حداکثر طول 32 نویسه.
    • همه ردپاها باید شروع شود و متوقف شود. هر اثری که شروع نشده، متوقف نشده یا قبل از شروع متوقف نشده باشد، ثبت نخواهد شد.

  2. اگر ردیابی کد سفارشی را از طریق نشان‌گذاری @AddTrace تنظیم کرده‌اید، تنظیمات افزونه Gradle Performance Monitoring را بررسی کنید:

    1. مطمئن شوید که افزونه را به درستی اضافه کرده اید. به طور خاص موارد زیر را بررسی کنید:

      • شما این افزونه را اضافه کردید ( apply plugin: 'com.google.firebase.firebase-perf' ) در فایل build.gradle ماژول (سطح برنامه) خود.
      • شما وابستگی classpath را برای افزونه ( classpath 'com.google.firebase:perf-plugin:1.4.2' ) در فایل build.gradle در سطح پروژه خود قرار دادید.

    2. اطمینان حاصل کنید که افزونه از طریق هیچ یک از پرچم های زیر غیرفعال نیست :

      • instrumentationEnabled در فایل build.gradle ماژول شما (سطح برنامه).
      • firebasePerformanceInstrumentationEnabled در فایل gradle.properties شما

  3. پیام‌های گزارش خود را بررسی کنید تا مطمئن شوید که Performance Monitoring ردپای کد سفارشی مورد انتظار را ثبت می‌کند.

  4. اگر Performance Monitoring رویدادها را ثبت می کند، اما پس از 24 ساعت هیچ داده ای نمایش داده نمی شود، با پشتیبانی Firebase تماس بگیرید .

اگر داده‌های درخواست شبکه را ندارید، مراحل عیب‌یابی زیر را امتحان کنید:

  1. برای برنامه‌های اندروید، افزونه Performance Monitoring Gradle ابزار دقیقی را فعال می‌کند که نظارت خودکار درخواست‌های شبکه HTTP/S را فراهم می‌کند. موارد زیر را بررسی کنید:

    1. مطمئن شوید که افزونه را به درستی اضافه کرده اید. به طور خاص موارد زیر را بررسی کنید:

      • شما این افزونه را اضافه کردید ( apply plugin: 'com.google.firebase.firebase-perf' ) در فایل build.gradle ماژول (سطح برنامه) خود.
      • شما وابستگی classpath را برای افزونه ( classpath 'com.google.firebase:perf-plugin:1.4.2' ) در فایل build.gradle در سطح پروژه خود قرار دادید.

    2. اطمینان حاصل کنید که افزونه از طریق هیچ یک از پرچم های زیر غیرفعال نیست :

      • instrumentationEnabled در فایل build.gradle ماژول شما (سطح برنامه).
      • firebasePerformanceInstrumentationEnabled در فایل gradle.properties شما

  2. ناسازگاری کتابخانه شبکه را بررسی کنید. Performance Monitoring به‌طور خودکار معیارهایی را برای درخواست‌های شبکه جمع‌آوری می‌کند که از کتابخانه‌های شبکه زیر استفاده می‌کنند: OkHttp 3.xx، URLConnection جاوا، و Apache HttpClient.

    توجه داشته باشید که می‌توانید نظارت سفارشی برای درخواست‌های شبکه اضافه کنید .

  3. از موارد زیر آگاه باشید:

    • بسته به رفتار کد و کتابخانه‌های شبکه‌ای که توسط کد شما استفاده می‌شود، Performance Monitoring ممکن است فقط درخواست‌های شبکه را گزارش کند که تکمیل شده‌اند. این بدان معنی است که اتصالات HTTP/S که باز مانده اند ممکن است گزارش نشوند.

    • Performance Monitoring با DexGuard و Jack سازگار نیست.

      • DexGuard نظارت بر درخواست های شبکه HTTP/S را غیرفعال می کند.
      • جک منسوخ شده است و معمولاً نباید در برنامه شما استفاده شود.
    • Performance Monitoring درخواست‌های شبکه با هدرهای Content-Type نامعتبر را گزارش نمی‌دهد. با این حال، درخواست‌های شبکه بدون سرصفحه‌های Content-Type همچنان پذیرفته می‌شوند.

درباره نحوه جمع‌آوری داده‌های درخواست شبکه تحت الگوهای URL Performance Monitoring بیشتر بدانید.

شما همچنین می توانید الگوهای URL سفارشی را امتحان کنید!

سوالات متداول

ما به عنوان دنباله‌ای از هشدارهای اخیر خود، که به‌طور خودکار هنگام عبور از آستانه‌هایی که تعیین کرده‌اید، به شما اطلاع می‌دهند، «مشکلات برتر» را با «هشدارهای اخیر» جایگزین کردیم. مشکلات اکنون منسوخ شده و با هشدار جایگزین شده اند .

انتخابگر برنامه‌ها در بالای کارت عملکرد، ورودی‌های هشدار را در زیر هشدارهای اخیر فیلتر می‌کند. فقط سه هشدار اخیر برای برنامه(های) انتخاب شده نمایش داده می شود.

برای کسب اطلاعات بیشتر درباره هشدارها، به تنظیم هشدارها برای مشکلات عملکرد مراجعه کنید.

Performance Monitoring از هشدارهایی برای معیارهایی که از آستانه های تعریف شده فراتر می روند، پشتیبانی می کند. برای جلوگیری از سردرگمی با این آستانه‌های قابل تنظیم برای معیارهای عملکرد، ما توانایی پیکربندی آستانه‌ها را برای مشکلات حذف کردیم.

ما صفحات جزئیات و معیارها را با یک رابط کاربری (UI) متمرکز و تازه طراحی شده جایگزین کردیم تا نحوه عیب یابی شما را بهبود ببخشیم. این رابط کاربری جدید عیب‌یابی همان عملکرد اصلی را ارائه می‌دهد که Details و Metrics ارائه می‌کردند. برای کسب اطلاعات بیشتر درباره عیب‌یابی، به مشاهده اطلاعات بیشتر برای یک ردیابی خاص مراجعه کنید.

Performance Monitoring داده‌های عملکرد را از دستگاه‌های کاربر برنامه شما جمع‌آوری می‌کند. اگر برنامه شما کاربران زیادی دارد یا اگر برنامه مقدار زیادی فعالیت عملکردی ایجاد می کند، Performance Monitoring ممکن است جمع آوری داده ها را به زیر مجموعه ای از دستگاه ها محدود کند تا تعداد رویدادهای پردازش شده را کاهش دهد. این محدودیت‌ها به اندازه‌ای زیاد هستند که حتی با رویدادهای کمتر، مقادیر متریک همچنان نماینده تجربه برنامه کاربر شما هستند.

برای مدیریت حجم داده‌هایی که جمع‌آوری می‌کنیم، Performance Monitoring از گزینه‌های نمونه‌گیری زیر استفاده می‌کند:

  • محدود کردن نرخ روی دستگاه : برای جلوگیری از ارسال ناگهانی ردیابی توسط دستگاه، تعداد ردیابی کد و درخواست شبکه ارسال شده از دستگاه را به 300 رویداد در هر 10 دقیقه محدود می کنیم. این رویکرد از دستگاه در برابر ابزارهای حلقه ای محافظت می کند که می توانند مقادیر زیادی داده عملکرد را ارسال کنند و از تغییر اندازه گیری عملکرد توسط یک دستگاه جلوگیری می کند.

  • نمونه‌گیری پویا : Performance Monitoring روزانه تعداد محدودی ردیابی کد و ردیابی درخواست شبکه را در هر برنامه در همه کاربران برنامه جمع‌آوری می‌کند. نرخ نمونه برداری پویا بر روی دستگاه ها (با استفاده از Firebase Remote Config ) واکشی می شود تا مشخص شود که آیا یک دستگاه تصادفی باید ردیابی کند و ارسال کند. دستگاهی که برای نمونه برداری انتخاب نشده باشد هیچ رویدادی را ارسال نمی کند. نرخ نمونه برداری پویا برای برنامه خاص است و تنظیم می شود تا اطمینان حاصل شود که حجم کلی داده های جمع آوری شده کمتر از حد مجاز باقی می ماند.

    پروژه‌هایی که ادغام BigQuery را فعال کرده‌اند، محدودیت بیشتری برای تعداد ردیابی‌های درخواست شبکه دریافت می‌کنند.

    جلسات کاربر داده های اضافی و دقیق را از دستگاه کاربر ارسال می کند و به منابع بیشتری برای ضبط و ارسال داده ها نیاز دارد. برای به حداقل رساندن تأثیر جلسات کاربر، Performance Monitoring ممکن است تعداد جلسات را نیز محدود کند.

  • محدود کردن نرخ سمت سرور : برای اطمینان از اینکه برنامه‌ها از حد نمونه‌گیری تجاوز نمی‌کنند، Performance Monitoring ممکن است از نمونه‌گیری سمت سرور برای حذف برخی رویدادهای دریافتی از دستگاه‌ها استفاده کند. اگرچه این نوع محدود کردن اثربخشی معیارهای ما را تغییر نمی‌دهد، ممکن است باعث تغییرات جزئی الگو شود، از جمله موارد زیر:

    • تعداد ردیابی ها می تواند با تعداد دفعاتی که یک قطعه کد اجرا شده است متفاوت باشد.
    • ردیابی هایی که در کد به صورت نزدیک همراه هستند ممکن است هر کدام تعداد نمونه های متفاوتی داشته باشند.

ما تب Issues را با معرفی Alerts جایگزین کردیم، که به طور خودکار در صورت تجاوز از آستانه‌هایی که تعیین کرده‌اید به شما اطلاع می‌دهد. دیگر نیازی به بررسی دستی کنسول Firebase برای تعیین وضعیت آستانه ندارید. برای آشنایی با هشدارها، به تنظیم هشدارها برای مشکلات عملکرد مراجعه کنید.

ما بخش Performance Monitoring کنسول Firebase را مجدداً طراحی کرده‌ایم تا برگه داشبورد معیارهای کلیدی و همه ردیابی‌های شما را در یک فضا نمایش دهد. به عنوان بخشی از طراحی مجدد، صفحات On دستگاه و Network را حذف کردیم.

جدول ردیابی در پایین برگه داشبورد همه همان اطلاعاتی را دارد که برگه‌های On دستگاه و Network نمایش داده می‌شوند، اما با برخی ویژگی‌های اضافه شده، از جمله امکان مرتب‌سازی ردیابی‌ها بر اساس درصد تغییر برای یک معیار خاص. برای مشاهده تمام معیارها و داده‌های یک ردیابی خاص، روی نام ردیابی در جدول ردیابی کلیک کنید.

ردپای خود را در زیر زبانه های جدول ردیابی مشاهده کنید:

  • ردیابی درخواست شبکه (هم خارج از جعبه و هم سفارشی) - زیربرگه درخواست های شبکه
  • ردیابی کد سفارشی - زیربرگه ردیابی سفارشی
  • شروع برنامه، برنامه در پیش‌زمینه، ردیابی برنامه در پس‌زمینه - زیربرگه ردیابی سفارشی
  • ردیابی رندر صفحه - زیربرگه رندر صفحه
  • ردپای بارگذاری صفحه - زیربرگه بارگذاری صفحه

برای جزئیات بیشتر در مورد جدول ردیابی ها و مشاهده معیارها و داده ها، از صفحه نمای کلی کنسول ( iOS+ | Android | Web ) دیدن کنید.

فریم‌های رندر آهسته و فریم‌های ثابت با نرخ تازه‌سازی فرضی دستگاه 60 هرتز محاسبه می‌شوند. اگر نرخ تازه‌سازی دستگاه کمتر از 60 هرتز باشد، هر فریم زمان رندر کندتری خواهد داشت زیرا فریم‌های کمتری در ثانیه رندر می‌شوند. زمان‌های رندر کندتر می‌تواند باعث شود که فریم‌های کندتر یا ثابت‌تر گزارش شوند، زیرا فریم‌های بیشتری کندتر رندر می‌شوند یا ثابت می‌شوند. با این حال، اگر نرخ به‌روزرسانی دستگاه بالاتر از 60 هرتز باشد، هر فریم زمان رندر سریع‌تری خواهد داشت. این می تواند باعث شود که فریم های کند یا ثابت کمتری گزارش شوند. این یک محدودیت فعلی در SDK Performance Monitoring است.

برای مشاهده عملکرد قطعات علاوه بر فعالیت برنامه، مطمئن شوید که برنامه شما از Performance Monitoring Android SDK نسخه 20.1.0 یا بالاتر استفاده می کند. برای کسب اطلاعات بیشتر، به افزودن نظارت بر عملکرد به برنامه خود مراجعه کنید.

هر قطعه و ردیابی فعالیت بر اساس نام کلاس خود همانطور که در برنامه شما تعریف شده است. هر یک از ردیابی های صفحه شامل پیشوند st و به دنبال آن نام کلاس است. در کنسول Firebase، پیشوند حذف می شود. برای کسب اطلاعات بیشتر، به اطلاعاتی درباره داده‌های عملکرد نمایش صفحه (برنامه‌های اپل و Android) مراجعه کنید.

Performance Monitoring نمونه‌گیری رویداد را در تمام رویدادهای جمع‌آوری‌شده روی یک دستگاه انجام می‌دهد. این رویکرد به ما امکان می‌دهد حداقل رویدادهای مورد نیاز از دستگاه‌های کاربر را برای ارائه معیارهای عملکرد جمع‌آوری کنیم.

Performance Monitoring به شما امکان می دهد برای معیارهایی که به آنها اهمیت می دهید هشدارهایی را تنظیم کنید. برای ردیابی های رندر صفحه نمایش ایجاد شده، می توانید هشدارهایی را تنظیم کنید تا زمانی که درصد فریم های کند و ثابت از آستانه ای که تنظیم کرده اید فراتر رفت، به شما اطلاع دهند.

Performance Monitoring برای Android از ابزار دقیق بایت کد برای ارائه برخی از ویژگی‌های خارج از جعبه مانند نظارت بر درخواست‌های شبکه HTTP/S استفاده می‌کند. به عنوان بخشی از کامپایل، این فرآیند نیاز به تکرار در تمام کلاس‌های برنامه شما (از جمله وابستگی‌ها) دارد تا کدی را که در اندازه‌گیری عملکرد درخواست شبکه برنامه شما بسیار مهم است، ابزار کند.

در اینجا برخی از عوامل کلیدی در افزایش زمان ساخت آورده شده است:

  • تعداد کلاس ها یا فایل ها
  • اندازه هر یک از آن کلاس ها (خطوط کد)
  • پیکربندی دستگاه شما
  • ساخت اولیه در مقابل ساخت بعدی (بیلدهای بعدی معمولا سریعتر از ساخت اولیه هستند)

برای بهینه سازی زمان ساخت، کد خود را مدولار کنید.

با شروع نسخه 1.3.3 پلاگین Performance Monitoring ، ما بر روی ایجاد بهبودهای قابل توجهی در پردازش ساخت و ذخیره سازی ورودی های کتابخانه به صورت افزایشی تمرکز کرده ایم. برای دریافت جدیدترین بهبودهای زمان ساخت، مطمئن شوید که از آخرین نسخه افزونه (نسخه 1.4.2) استفاده کنید .

توجه داشته باشید که اگر می‌خواهید از زمان ساخت طولانی جلوگیری کنید، می‌توانید افزونه Performance Monitoring برای بیلدهای اشکال زدایی به صورت محلی غیرفعال کنید . با این حال، این رویکرد برای ساخت‌های تولیدی توصیه نمی‌شود، زیرا می‌تواند منجر به از دست رفتن اندازه‌گیری عملکرد برای درخواست‌های شبکه در برنامه شما شود.

Performance Monitoring برای Android از ابزار دقیق بایت کد برای ارائه برخی از ویژگی‌های خارج از جعبه مانند نظارت بر درخواست‌های شبکه HTTP/S استفاده می‌کند. به عنوان بخشی از کامپایل، این فرآیند نیاز به تکرار در تمام کلاس‌های برنامه شما (از جمله وابستگی‌ها) دارد تا کدی را که در اندازه‌گیری عملکرد درخواست شبکه برنامه شما بسیار مهم است، ابزار کند.

اگر پس از ادغام با افزونه Performance Monitoring خطاهای ساختی مانند JSR/RET are not supported with computeFrames option ، ممکن است به این دلیل باشد که به کتابخانه‌ای وابستگی دارید که با افزونه Performance Monitoring Gradle ناسازگار است.

برای دور زدن این موضوع، می‌توانید کلاس‌ها/کتابخانه‌های ناسازگار را با دنبال کردن این مراحل از ابزارسازی حذف کنید:

  1. به آخرین نسخه پلاگین Performance Monitoring Gradle (حداقل نسخه 1.4.0 ) به روز رسانی کنید.
  2. نسخه پلاگین Android Gradle خود را به نسخه 7.2.0 یا جدیدتر به روز کنید.
  3. پرچم زیر را به فایل build.gradle ماژول (سطح برنامه) خود اضافه کنید تا کلاس ها/کتابخانه های ناسازگار را از ابزارسازی حذف کنید:
    android {
      // ...
      androidComponents {
        onVariants(selector().all(), {
            instrumentation.excludes.add("example.incompatible.library")
        })
      }
    }
    برای کسب اطلاعات بیشتر در مورد ویژگی exclude Instrumentation API افزونه Android Gradle، به Instrumentation مراجعه کنید.

لطفاً در صورت مواجهه با خطاهای ساخت به دلیل کتابخانه های ناسازگار، یک مشکل Github را ثبت کنید تا بتوان آنها را نیز از ابزارسازی در افزونه Performance Monitoring حذف کرد.

اگر ادغام BigQuery را برای Firebase Performance Monitoring فعال کرده باشید، داده های شما 12 تا 24 ساعت پس از پایان روز (زمان اقیانوس آرام) به BigQuery صادر می شود.

برای مثال، داده‌های 19 آوریل در BigQuery در 20 آوریل بین ساعت 12:00 بعد از ظهر تا نیمه شب در دسترس خواهد بود (همه تاریخ‌ها و زمان‌ها به وقت اقیانوس آرام هستند).

پردازش و نمایش داده های نزدیک به زمان واقعی

فرآیندهای Firebase Performance Monitoring داده های عملکرد را در هنگام ارائه جمع آوری می کنند ، که منجر به نمایش داده های نزدیک به زمان واقعی در کنسول Firebase می شود. نمایش داده های پردازش شده در کنسول در طی چند دقیقه از جمع آوری آن ، از این رو اصطلاح "نزدیک زمان واقعی".

برای استفاده از پردازش داده های نزدیک در زمان واقعی ، اطمینان حاصل کنید که برنامه شما از نسخه SDK سازگار با زمان واقعی استفاده می کند.

برای استفاده از پردازش داده های نزدیک در زمان واقعی ، فقط باید اطمینان حاصل کنید که برنامه شما از یک نسخه SDK Performance Monitoring استفاده می کند که با پردازش داده های زمان واقعی سازگار است.

این نسخه های SDK سازگار با زمان واقعی هستند:

  • iOS - v7.3.0 یا بعد از آن
  • TVOS - V8.9.0 یا بعد از آن
  • Android - V19.0.10 یا بالاتر (یا Firebase Android BoM V26.1.0 یا بعد از آن)
  • وب - v7.14.0 یا بعد از آن

توجه داشته باشید که ما همیشه توصیه می کنیم از آخرین نسخه SDK استفاده کنید ، اما هر نسخه ذکر شده در بالا ، Performance Monitoring قادر می سازد تا داده های شما را در زمان واقعی نزدیک پردازش کند.

این نسخه های SDK سازگار با پردازش داده های زمان واقعی هستند:

  • iOS - v7.3.0 یا بعد از آن
  • TVOS - V8.9.0 یا بعد از آن
  • Android - V19.0.10 یا بالاتر (یا Firebase Android BoM V26.1.0 یا بعد از آن)
  • وب - v7.14.0 یا بعد از آن

توجه داشته باشید که ما همیشه توصیه می کنیم از آخرین نسخه SDK استفاده کنید ، اما هر نسخه ذکر شده در بالا ، Performance Monitoring قادر می سازد تا داده های شما را در زمان واقعی نزدیک پردازش کند.

اگر برنامه شما از نسخه SDK سازگار با زمان واقعی استفاده نمی کند ، باز هم تمام داده های عملکرد برنامه خود را در کنسول Firebase مشاهده خواهید کرد. با این حال ، نمایش داده های عملکرد تقریباً 36 ساعت از زمان جمع آوری آن به تأخیر می افتد.

بله! صرف نظر از اینکه نسخه SDK یک نمونه برنامه از آن استفاده می کند ، داده های عملکرد را از همه کاربران خود مشاهده خواهید کرد.

با این حال ، اگر به داده های اخیر (کمتر از تقریباً 36 ساعت عمر) نگاه می کنید ، داده های نمایش داده شده از کاربران نمونه های برنامه با استفاده از نسخه SDK سازگار با زمان واقعی است. با این حال ، داده های غیر دریافتی شامل داده های عملکردی از تمام نسخه های برنامه شما است.

تماس با پشتیبانی Firebase

اگر به پشتیبانی Firebase دسترسی پیدا کردید ، همیشه شناسه برنامه Firebase خود را وارد کنید. شناسه برنامه Firebase خود را در کارت برنامه های پروژه تنظیمات خود پیدا کنید.

،


در این صفحه نکات عیب یابی برای شروع کار با Performance Monitoring یا استفاده از ویژگی های Performance Monitoring و ابزار ارائه شده است.

اولین بررسی برای عیب یابی

دو چک زیر بهترین روشهای کلی است که قبل از عیب یابی بیشتر برای هر کسی توصیه می شود.

1. پیام های ورود به سیستم را برای رویدادهای عملکرد بررسی کنید

پیام های ورود به سیستم خود را بررسی کنید تا مطمئن شوید که Performance Monitoring SDK در حال ضبط رویدادهای عملکرد است.

  1. با افزودن یک عنصر <meta-data> به پرونده برنامه خود در پرونده AndroidManifest.xml برنامه خود Performance Monitoring فعال کنید ، مانند این:

    <application>
        <meta-data
          android:name="firebase_performance_logcat_enabled"
          android:value="true" />
    </application>
  2. پیام های ورود به سیستم خود را برای هر پیام خطا بررسی کنید.

  3. Performance Monitoring پیام های ورود به سیستم خود را با FirebasePerformance نشان می دهد. با استفاده از فیلتر LogCat ، می توانید با اجرای دستور زیر به طور خاص Trace و HTTP/S درخواست ورود به سیستم را مشاهده کنید:

    adb logcat -s FirebasePerformance
  4. انواع سیاهههای مربوط را که نشان می دهد Performance Monitoring در حال ورود به سیستم است ، بررسی کنید:

    • Logging trace metric: TRACE_NAME , FIREBASE_PERFORMANCE_CONSOLE_URL
    • Logging network request trace: URL
  5. برای مشاهده داده های خود در کنسول Firebase ، روی URL کلیک کنید. ممکن است چند لحظه طول بکشد تا داده ها در داشبورد به روز شوند.

اگر برنامه شما در حال ورود به سیستم های عملکرد نیست ، نکات عیب یابی را مرور کنید.

2. داشبورد وضعیت Firebase را بررسی کنید

داشبورد وضعیت Firebase را در صورت وجود قطع شناخته شده برای Firebase یا Performance Monitoring بررسی کنید.

شروع با Performance Monitoring

اگر با Performance Monitoring شروع می کنید ( iOS+ | Android | وب ) ، نکات عیب یابی زیر می تواند به مواردی که شامل Firebase تشخیص SDK یا نمایش اولین داده های عملکرد شما در کنسول Firebase است ، کمک کند.

Firebase می تواند تشخیص دهد که آیا با موفقیت در هنگام دریافت اطلاعات رویداد (مانند تعامل برنامه) از برنامه خود ، SDK Performance Monitoring SDK را به برنامه خود اضافه کرده اید. معمولاً ظرف 10 دقیقه از شروع برنامه خود ، داشبورد عملکرد کنسول Firebase یک پیام "SDK شناسایی شده" را نشان می دهد. سپس در مدت 30 دقیقه ، داشبورد داده های پردازش شده اولیه را نشان می دهد.

اگر بیش از 10 دقیقه از زمان اضافه کردن آخرین نسخه SDK به برنامه خود گذشته است ، و هنوز هیچ تغییری را مشاهده نمی کنید ، پیام های ورود به سیستم خود را بررسی کنید تا مطمئن شوید که Performance Monitoring در حال ورود به سیستم است. مراحل عیب یابی مناسب را که در زیر توضیح داده شده است ، برای عیب یابی یک پیام تشخیص SDK با تأخیر امتحان کنید.

  1. اطمینان حاصل کنید که از Performance Monitoring Android SDK 19.1.0 یا بعد از آن استفاده می کنید (یا Firebase BoM 26.3.0 یا بعد از آن) ، به Note Release مراجعه کنید.

  2. اگر هنوز به صورت محلی در حال توسعه هستید ، سعی کنید رویدادهای بیشتری را برای جمع آوری داده ها ایجاد کنید:

    1. چندین بار برنامه خود را بین پس زمینه و پیش زمینه ایجاد کنید ، با پیمایش در صفحه ها و/یا ایجاد درخواست های شبکه ، با برنامه خود در تعامل باشید.
  3. اطمینان حاصل کنید که پرونده پیکربندی Firebase شما ( google-services.json ) به درستی به برنامه شما اضافه شده است و پرونده را اصلاح نکرده اید. به طور خاص ، موارد زیر را بررسی کنید:

    • نام پرونده پیکربندی با شخصیت های اضافی مانند (2) ضمیمه نمی شود.

    • پرونده پیکربندی در فهرست ماژول (سطح برنامه) برنامه شما است.

    • شناسه برنامه Android Firebase ( mobilesdk_app_id ) که در پرونده پیکربندی ذکر شده برای برنامه شما صحیح است. شناسه برنامه Firebase خود را در کارت برنامه های پروژه تنظیمات خود پیدا کنید.

    اگر به نظر می رسد با فایل پیکربندی در برنامه خود اشتباه است ، موارد زیر را امتحان کنید:

    1. پرونده پیکربندی را که در حال حاضر در برنامه خود دارید حذف کنید.

    2. برای بارگیری یک فایل پیکربندی جدید و اضافه کردن آن به برنامه Android خود ، این دستورالعمل ها را دنبال کنید.

  4. اگر SDK در حال ورود به وقایع است و به نظر می رسد همه چیز به درستی تنظیم شده است ، اما شما هنوز پیام تشخیص SDK یا داده های پردازش شده (بعد از 10 دقیقه) را نمی بینید ، با پشتیبانی Firebase تماس بگیرید .

  1. تنظیم افزونه Gradle Performance Monitoring به شرح زیر بررسی کنید:

    1. اطمینان حاصل کنید که افزونه را به درستی اضافه کرده اید. به طور خاص ، موارد زیر را بررسی کنید:

      • افزونه ( apply plugin: 'com.google.firebase.firebase-perf' ) را در پرونده خود (سطح برنامه) build.gradle خود اضافه کنید.
      • شما وابستگی ClassPath را برای افزونه ( classpath 'com.google.firebase:perf-plugin:1.4.2' ) در پرونده build.gradle در سطح پروژه خود گنجانده اید.

    2. اطمینان حاصل کنید که این افزونه از طریق هیچ یک از پرچم های زیر غیرفعال نشده است :

      • instrumentationEnabled در ماژول خود (سطح برنامه) build.gradle
      • firebasePerformanceInstrumentationEnabled در پرونده gradle.properties شما

  2. بررسی کنید که نظارت بر عملکرد SDK از طریق هیچ یک از پرچم های زیر در پرونده AndroidManifest.xml شما Performance Monitoring نشده است :

    • firebase_performance_collection_enabled
    • firebase_performance_collection_deactivated
  3. اطمینان حاصل کنید که Performance Monitoring در زمان اجرا غیرفعال نیست .

  4. اگر نمی توانید چیزی را که در برنامه خود غیرفعال است پیدا کنید ، با پشتیبانی Firebase تماس بگیرید .

Performance Monitoring قبل از نمایش در داشبورد عملکرد ، داده های رویداد عملکرد را پردازش می کند.

اگر بیش از 24 ساعت از زمان ظاهر شدن پیام "SDK شناسایی شده" گذشته است ، و شما هنوز داده را نمی بینید ، در صورت بروز قطع شناخته شده ، داشبورد وضعیت Firebase را بررسی کنید. در صورت عدم وجود قطع ، با پشتیبانی Firebase تماس بگیرید .

عیب یابی عمومی

اگر SDK را با موفقیت اضافه کرده اید و Performance Monitoring در برنامه خود استفاده می کنید ، نکات عیب یابی زیر می تواند به موضوعات کلی کمک کند که شامل ویژگی های Performance Monitoring و ابزار سازی است.

اگر برای رویدادهای عملکردی پیام های ورود به سیستم مشاهده نمی کنید ، مراحل عیب یابی زیر را امتحان کنید:

  1. تنظیم افزونه Gradle Performance Monitoring به شرح زیر بررسی کنید:

    1. اطمینان حاصل کنید که افزونه را به درستی اضافه کرده اید. به طور خاص ، موارد زیر را بررسی کنید:

      • افزونه ( apply plugin: 'com.google.firebase.firebase-perf' ) را در پرونده خود (سطح برنامه) build.gradle خود اضافه کنید.
      • شما وابستگی ClassPath را برای افزونه ( classpath 'com.google.firebase:perf-plugin:1.4.2' ) در پرونده build.gradle در سطح پروژه خود گنجانده اید.

    2. اطمینان حاصل کنید که این افزونه از طریق هیچ یک از پرچم های زیر غیرفعال نشده است :

      • instrumentationEnabled در ماژول خود (سطح برنامه) build.gradle
      • firebasePerformanceInstrumentationEnabled در پرونده gradle.properties شما

  2. بررسی کنید که نظارت بر عملکرد SDK از طریق هیچ یک از پرچم های زیر در پرونده AndroidManifest.xml شما Performance Monitoring نشده است :

    • firebase_performance_collection_enabled
    • firebase_performance_collection_deactivated
  3. اطمینان حاصل کنید که Performance Monitoring در زمان اجرا غیرفعال نیست .

  4. اگر نمی توانید چیزی را که در برنامه خود غیرفعال است پیدا کنید ، با پشتیبانی Firebase تماس بگیرید .

اگر داده هایی را برای ردیابی صفحه نمایش از دست داده اید ، مراحل عیب یابی زیر را امتحان کنید:

  1. اطمینان حاصل کنید که از آخرین نسخه Android SDK (v21.0.4) استفاده می کنید. ردیابی صفحه نمایش فقط با V15.2.0 یا بالاتر در دسترس است.

  2. اطمینان حاصل کنید که شتاب سخت افزاری را به صورت دستی برای صفحه نمایش غیرفعال نکرده اید.

  3. اطمینان حاصل کنید که از DexGuard یا Jack استفاده نمی کنید. Performance Monitoring با این برنامه های ابزار ناسازگار است.

    • DexGuard مجموعه اتوماتیک شروع برنامه ، برنامه در زمینه برنامه و برنامه های پشتی را غیرفعال می کند. با این حال ، اگر برنامه شما از DexGuard استفاده کند ، هر یک از آثار کد سفارشی باید به طور عادی رفتار کنند.

    • جک مستهلک می شود و به طور کلی نباید در برنامه شما استفاده شود.

آیا داده های عملکرد را برای آثار جمع آوری شده خودکار اما برای آثار کد سفارشی مشاهده نمی کنید؟ مراحل عیب یابی زیر را امتحان کنید:

  1. اگر آثار کد سفارشی را از طریق API ردیابی انجام داده اید ، تنظیمات آثار را به خصوص موارد زیر بررسی کنید:

    • نام برای آثار کد سفارشی و معیارهای سفارشی باید شرایط زیر را برآورده کند: هیچ فضای سفیدی پیشرو یا دنباله دار ، بدون کاراکتر برجسته ( _ ) پیشرو و حداکثر طول 32 کاراکتر است.
    • همه آثار باید شروع و متوقف شوند. هیچ اثری که شروع نشده ، متوقف نشده است ، یا قبل از شروع کار متوقف نمی شود.

  2. اگر از طریق علامت گذاری @AddTrace آثار کد های سفارشی را به کار بردید ، تنظیم افزونه Gradle Performance Monitoring بررسی کنید:

    1. اطمینان حاصل کنید که افزونه را به درستی اضافه کرده اید. به طور خاص ، موارد زیر را بررسی کنید:

      • افزونه ( apply plugin: 'com.google.firebase.firebase-perf' ) را در پرونده خود (سطح برنامه) build.gradle خود اضافه کنید.
      • شما وابستگی ClassPath را برای افزونه ( classpath 'com.google.firebase:perf-plugin:1.4.2' ) در پرونده build.gradle در سطح پروژه خود گنجانده اید.

    2. اطمینان حاصل کنید که این افزونه از طریق هیچ یک از پرچم های زیر غیرفعال نشده است :

      • instrumentationEnabled در ماژول خود (سطح برنامه) build.gradle
      • firebasePerformanceInstrumentationEnabled در پرونده gradle.properties شما

  3. پیام های ورود به سیستم خود را بررسی کنید تا مطمئن شوید که Performance Monitoring در حال ورود به سیستم کد سفارشی مورد انتظار است.

  4. اگر Performance Monitoring در حال ورود به سیستم است ، اما هیچ داده ای پس از 24 ساعت نمایش داده نمی شود ، با پشتیبانی Firebase تماس بگیرید .

اگر داده های درخواست شبکه را از دست داده اید ، مراحل عیب یابی زیر را امتحان کنید:

  1. برای برنامه های Android ، افزونه Gradle Performance Monitoring ، ابزار دقیق را فراهم می کند که نظارت خودکار درخواست های شبکه HTTP/S را فراهم می کند. موارد زیر را بررسی کنید:

    1. اطمینان حاصل کنید که افزونه را به درستی اضافه کرده اید. به طور خاص ، موارد زیر را بررسی کنید:

      • افزونه ( apply plugin: 'com.google.firebase.firebase-perf' ) را در پرونده خود (سطح برنامه) build.gradle خود اضافه کنید.
      • شما وابستگی ClassPath را برای افزونه ( classpath 'com.google.firebase:perf-plugin:1.4.2' ) در پرونده build.gradle در سطح پروژه خود گنجانده اید.

    2. اطمینان حاصل کنید که این افزونه از طریق هیچ یک از پرچم های زیر غیرفعال نشده است :

      • instrumentationEnabled در ماژول خود (سطح برنامه) build.gradle
      • firebasePerformanceInstrumentationEnabled در پرونده gradle.properties شما

  2. ناسازگاری کتابخانه شبکه را بررسی کنید. Performance Monitoring به طور خودکار معیارهایی را برای درخواست های شبکه که از کتابخانه های شبکه زیر استفاده می کنند ، جمع آوری می کند: OKHTTP 3.XX ، URLConnection Java و Apache HttpClient.

    توجه داشته باشید که می توانید مانیتورینگ سفارشی را برای درخواست های شبکه اضافه کنید .

  3. از موارد زیر آگاه باشید:

    • بسته به رفتار کد و کتابخانه های شبکه ای که توسط کد شما استفاده شده است ، Performance Monitoring فقط ممکن است در مورد درخواست های شبکه که تکمیل شده است گزارش دهد. این بدان معنی است که اتصالات HTTP/S که باز مانده اند ممکن است گزارش نشود.

    • Performance Monitoring با DexGuard و Jack سازگار نیست.

      • DexGuard نظارت بر درخواست های شبکه HTTP/S را غیرفعال می کند.
      • جک مستهلک می شود و به طور کلی نباید در برنامه شما استفاده شود.
    • Performance Monitoring در مورد درخواست های شبکه با هدرهای Content-Type نامعتبر گزارش نمی کند. با این حال ، درخواست های شبکه بدون هدرهای Content-Type هنوز پذیرفته می شوند.

در مورد چگونگی Performance Monitoring داده های درخواست شبکه تحت الگوهای URL بیشتر بدانید.

همچنین می توانید الگوهای URL سفارشی را امتحان کنید!

سوالات متداول

ما با هشدارهای اخیر به عنوان پیگیری در مورد معرفی اخیر هشدارها ، که به طور خودکار به شما اطلاع می دهد که هنگام عبور از آستانه های تنظیم شده ، به طور خودکار به شما اطلاع می دهد. اکنون مسائل کاهش یافته و با هشدارها جایگزین می شوند.

انتخاب برنامه در بالای کارت عملکرد ، ورودی های هشدار را تحت هشدارهای اخیر فیلتر می کند. فقط سه هشدارهای اخیر برای برنامه (های) انتخاب شده نمایش داده می شوند.

برای کسب اطلاعات بیشتر در مورد هشدارها ، به هشدارهای مربوط به مشکلات عملکرد مراجعه کنید.

Performance Monitoring از هشدارها برای معیارهایی که فراتر از آستانه های تعریف شده هستند پشتیبانی می کند. برای جلوگیری از سردرگمی با این آستانه های قابل تنظیم برای معیارهای عملکرد ، ما توانایی پیکربندی آستانه ها را برای مشکلات حذف کردیم.

ما جزئیات و صفحات معیارها را با یک رابط کاربری متمرکز تازه طراحی شده (UI) جایگزین کردیم تا نحوه عیب یابی شما را بهبود بخشیم. این UI عیب یابی جدید همان عملکرد اصلی را ارائه می دهد که جزئیات و معیارهای ارائه شده را ارائه می دهد. برای کسب اطلاعات بیشتر در مورد عیب یابی ، به مشاهده داده های بیشتر برای یک اثری خاص مراجعه کنید.

Performance Monitoring داده های عملکرد را از دستگاه های کاربر برنامه شما جمع می کند. اگر برنامه شما کاربران زیادی داشته باشد یا اگر برنامه مقدار زیادی از فعالیت عملکرد را ایجاد کند ، Performance Monitoring ممکن است جمع آوری داده ها را به زیر مجموعه ای از دستگاه ها محدود کند تا تعداد رویدادهای فرآوری شده را کاهش دهد. این محدودیت ها به اندازه کافی بالا هستند به طوری که حتی با وقایع کمتری ، مقادیر متریک هنوز هم نماینده تجربه برنامه کاربر شما هستند.

برای مدیریت حجم داده هایی که جمع می کنیم ، Performance Monitoring از گزینه های نمونه گیری زیر استفاده می کند:

  • محدودیت نرخ روی دستگاه : برای جلوگیری از ارسال دستگاههای ناگهانی اثری از دستگاه ، تعداد آثار کد و درخواست شبکه ارسال شده از یک دستگاه را به 300 رویداد در هر 10 دقیقه محدود می کنیم. این روش از دستگاه در برابر ابزارهای حلقه ای که می توانند مقادیر زیادی از داده های عملکرد را ارسال کنند ، محافظت می کند و مانع از ایجاد یک دستگاه واحد از اندازه گیری عملکرد می شود.

  • نمونه گیری پویا : Performance Monitoring تعداد محدودی از آثار کد و آثار درخواست شبکه را روزانه در هر برنامه در همه کاربران برنامه جمع می کند. میزان نمونه برداری پویا روی دستگاه ها (با استفاده از Firebase Remote Config ) برای تعیین اینکه آیا یک دستگاه تصادفی باید اثری را ضبط و ارسال کند ، انجام می شود. دستگاهی که برای نمونه برداری انتخاب نشده باشد ، هیچ رویدادی را ارسال نمی کند. نرخ نمونه گیری پویا خاص برنامه است و تنظیم می شود تا از حجم کلی داده های جمع آوری شده در زیر حد باقی بماند.

    پروژه هایی که ادغام BigQuery را فعال می کنند ، برای تعداد ردیابی درخواست شبکه حد بالاتری دریافت می کنند.

    جلسات کاربر داده های اضافی و مفصلی را از دستگاه کاربر ارسال می کند و به منابع بیشتری برای ضبط و ارسال داده ها نیاز دارد. برای به حداقل رساندن تأثیر جلسات کاربر ، Performance Monitoring همچنین ممکن است تعداد جلسات را محدود کند.

  • محدودیت نرخ سمت سرور : برای اطمینان از اینکه برنامه ها از حد نمونه برداری تجاوز نمی کنند ، Performance Monitoring ممکن است از نمونه گیری سمت سرور برای رها کردن برخی از رویدادهای دریافت شده از دستگاه ها استفاده کند. اگرچه این نوع محدودیت اثربخشی معیارهای ما را تغییر نمی دهد ، اما ممکن است باعث تغییر الگوی جزئی از جمله موارد زیر شود:

    • تعداد آثار می تواند با تعداد دفعاتی که یک قطعه کد اجرا شده است متفاوت باشد.
    • اثری که از نزدیک با کد همراه هستند ، ممکن است هر یک از نمونه های متفاوتی داشته باشند.

ما با معرفی هشدارها ، برگه Issure را جایگزین کردیم ، که به طور خودکار به شما اطلاع می دهد که از آستانه هایی که تنظیم می کنید فراتر رفته است. برای تعیین وضعیت آستانه دیگر نیازی به بررسی دستی کنسول Firebase ندارید. برای کسب اطلاعات در مورد هشدارها ، برای مسائل مربوط به عملکرد هشدارهایی را مشاهده کنید.

ما بخش Performance Monitoring کنسول Firebase را مجدداً طراحی کرده ایم تا برگه داشبورد معیارهای اصلی و تمام آثار شما را در یک فضا نشان دهد. به عنوان بخشی از طراحی مجدد ، صفحات دستگاه و شبکه را حذف کردیم.

جدول TRACE در پایین برگه داشبورد دارای تمام اطلاعاتی است که زبانه های دستگاه و شبکه در آن نمایش داده شده است ، اما با برخی از ویژگی های اضافه شده ، از جمله امکان مرتب سازی آثار خود با درصد تغییر برای یک معیار خاص. برای مشاهده تمام معیارها و داده ها برای یک ردیابی خاص ، روی نام ردیابی در جدول Traces کلیک کنید.

آثار خود را در زیرگروه های زیر از جدول TRACE مشاهده کنید:

  • ردیابی درخواست شبکه (هم خارج از جعبه و هم سفارشی)-Subtab درخواست شبکه
  • آثار کد سفارشی - زیرنویس آثار سفارشی
  • شروع برنامه ، برنامه در زمین ، برنامه های پشتیبان برنامه- زیرنویس های سفارشی
  • ردیابی صفحه نمایش - زیرنویس ارائه صفحه نمایش
  • ردپای بار صفحه - زیرنویس بار صفحه

برای جزئیات بیشتر در مورد جدول TRACE و مشاهده معیارها و داده ها ، به صفحه نمای کلی کنسول ( iOS+ | Android | وب ) مراجعه کنید.

فریم های رندر آهسته و فریم های منجمد با نرخ تازه سازی دستگاه فرض شده 60 هرتز محاسبه می شوند. اگر نرخ تازه سازی دستگاه از 60 هرتز پایین تر باشد ، هر فریم زمان رندر کندتر خواهد داشت زیرا کمتر قاب در ثانیه ارائه می شود. زمان رندر کندتر می تواند باعث کندتر یا فریم های یخ زده تر شود زیرا فریم های بیشتری کندتر می شوند یا یخ می زنند. با این حال ، اگر نرخ تازه سازی دستگاه از 60 هرتز بالاتر باشد ، هر فریم زمان رندر سریعتر خواهد داشت. این می تواند باعث شود که فریم های آهسته یا یخ زده کمتری گزارش شود. This is a current limitation in the Performance Monitoring SDK.

To see the performance of fragments in addition to app activity, make sure that your app is using Performance Monitoring Android SDK version 20.1.0 or above. To learn more, see Add Performance Monitoring to your app .

Each of the fragment and activity traces is based on its class name as defined in your application. Each of the screen traces contains the st prefix followed by the name of the class. On the Firebase console, the prefix is removed. To learn more, see Learn about screen rendering performance data (Apple & Android apps) .

Performance Monitoring conducts event sampling across all events collected on a device. This approach lets us collect the minimum events needed from user devices to provide performance metrics.

Performance Monitoring lets you set up alerts for the metrics you care about. For generated screen rendering traces, you can set up alerts to notify you when the slow and frozen frames percentage exceeds a threshold that you set.

Performance Monitoring for Android uses bytecode instrumentation to provide some out-of-the-box features like monitoring HTTP/S network requests . As a part of compilation, the process requires iteration through all the classes of your app (including dependencies) to instrument the code that is crucial in measuring the network request performance of your application.

Here are some key contributors to an increase in build time:

  • Number of classes or files
  • Size of each of those classes (lines of code)
  • Your machine configuration
  • Initial build versus a subsequent build (subsequent builds are usually faster than the initial build)

To optimize your build time, consider modularizing your code .

Starting with v1.3.3 of the Performance Monitoring plugin, we've concentrated on making considerable improvements in the incremental build processing and caching of library inputs. To receive the most recent build time improvements, make sure to use the latest version of the plugin (v1.4.2) .

Note that you can disable the Performance Monitoring plugin for your debug builds locally if you want to avoid long build times. However, this approach is not recommended for production builds, as it could result in missed performance measurements for the network requests in your app.

Performance Monitoring for Android uses bytecode instrumentation to provide some out-of-the-box features like monitoring HTTP/S network requests . As a part of compilation, the process requires iteration through all the classes of your app (including dependencies) to instrument the code that is crucial in measuring the network request performance of your application.

If you get build errors like JSR/RET are not supported with computeFrames option or similar errors after integrating with the Performance Monitoring plugin, this might be because you also have a dependency on a library that's incompatible with the Performance Monitoring Gradle plugin.

To get around this, you can exclude incompatible classes/libraries from being instrumented by following these steps:

  1. Update to the latest version of Performance Monitoring Gradle plugin (minimum v1.4.0 ).
  2. Update your Android Gradle plugin version to v7.2.0 or newer.
  3. Add the following flag to your module (app-level) build.gradle file to exclude the incompatible classes/libraries from being instrumented:
    android {
      // ...
      androidComponents {
        onVariants(selector().all(), {
            instrumentation.excludes.add("example.incompatible.library")
        })
      }
    }
    To learn more about the exclude property of Android Gradle plugin's Instrumentation API, see Instrumentation .

Please file a Github issue when you encounter build errors due to incompatible libraries so that they can also be excluded from being instrumented in the Performance Monitoring plugin.

If you have enabled the BigQuery integration for Firebase Performance Monitoring , your data will be exported to BigQuery 12 to 24 hours after the end of the day (Pacific Time).

For example, the data for April 19th will be available in BigQuery on April 20th between 12:00pm and midnight (all dates and times are Pacific Time).

Near real-time data processing and display

Firebase Performance Monitoring processes collected performance data as it comes in, which results in near real-time data display in the Firebase console. Processed data displays in the console within a few minutes of its collection, hence the term "near real-time".

To take advantage of near real-time data processing, make sure your app uses a real-time compatible SDK version .

To take advantage of near real-time data processing, you only need to make sure that your app uses a Performance Monitoring SDK version that's compatible with real-time data processing.

These are the real-time compatible SDK versions:

  • iOS — v7.3.0 or later
  • tvOS — v8.9.0 or later
  • Android — v19.0.10 or later (or Firebase Android BoM v26.1.0 or later)
  • Web — v7.14.0 or later

Note that we always recommend using the latest version of SDK, but any version listed above will enable Performance Monitoring to process your data in near real time.

These are the SDK versions compatible with real-time data processing:

  • iOS — v7.3.0 or later
  • tvOS — v8.9.0 or later
  • Android — v19.0.10 or later (or Firebase Android BoM v26.1.0 or later)
  • Web — v7.14.0 or later

Note that we always recommend using the latest version of SDK, but any version listed above will enable Performance Monitoring to process your data in near real time.

If your app doesn't use a real-time compatible SDK version, you will still see all your app's performance data in the Firebase console. However, the display of performance data will be delayed by roughly 36 hours from the time of its collection.

بله! Regardless of which SDK version an app instance uses, you'll see performance data from all your users.

However, if you're looking at recent data (less than roughly 36 hours old), then the displayed data is from users of app instances using a real-time compatible SDK version. The non-recent data, though, includes performance data from all versions of your app.

Contacting Firebase Support

If you reach out to Firebase Support , always include your Firebase App ID. Find your Firebase App ID in the Your apps card of your Project settings .

،


This page provides troubleshooting tips for getting started with Performance Monitoring or using Performance Monitoring features and tooling.

First checks for troubleshooting

The following two checks are general best practices recommended for anyone before further troubleshooting.

1. Check log messages for performance events

Check your log messages to be sure that the Performance Monitoring SDK is capturing performance events.

  1. Enable debug logging for Performance Monitoring at build time by adding a <meta-data> element to your app's AndroidManifest.xml file, like so:

    <application>
        <meta-data
          android:name="firebase_performance_logcat_enabled"
          android:value="true" />
    </application>
  2. Check your log messages for any error messages.

  3. Performance Monitoring tags its log messages with FirebasePerformance . Using logcat filtering, you can specifically view duration trace and HTTP/S network request logging by running the following command:

    adb logcat -s FirebasePerformance
  4. Check for the following types of logs which indicate that Performance Monitoring is logging performance events:

    • Logging trace metric: TRACE_NAME , FIREBASE_PERFORMANCE_CONSOLE_URL
    • Logging network request trace: URL
  5. Click on the URL to view your data in the Firebase console. It may take a few moments for the data to update in the dashboard.

If your app isn't logging performance events, review the troubleshooting tips .

2. Check the Firebase Status Dashboard

Check the Firebase Status Dashboard in case there is a known outage for Firebase or for Performance Monitoring .

Getting started with Performance Monitoring

If you're getting started with Performance Monitoring ( iOS+ | Android | Web ), the following troubleshooting tips can help with issues that involve Firebase detecting the SDK or displaying your first performance data in the Firebase console.

Firebase can detect if you've successfully added the Performance Monitoring SDK to your app when it receives event information (like app interactions) from your app. Usually within 10 minutes of starting your app, the Performance dashboard of the Firebase console displays an "SDK detected" message. Then, within 30 minutes, the dashboard displays the initial processed data.

If it's been more than 10 minutes since you added the latest version of SDK to your app, and you're still not seeing any change, check your log messages to make sure that Performance Monitoring is logging events. Try the appropriate troubleshooting steps as described below to troubleshoot a delayed SDK detection message.

  1. Make sure that you're using the Performance Monitoring Android SDK 19.1.0 or later (or Firebase BoM 26.3.0 or later), see Release Note .

  2. If you're still developing locally, try generating more events for data collection:

    1. Generate events by switching your app between background and foreground several times, interacting with your app by navigating across screens, and/or triggering network requests.
  3. Make sure that your Firebase configuration file ( google-services.json ) is correctly added to your app and that you haven't modified the file. Specifically, check the following:

    • The config file name isn't appended with additional characters, like (2) .

    • The config file is in the module (app-level) directory of your app.

    • The Firebase Android App ID ( mobilesdk_app_id ) listed in the config file is correct for your app. Find your Firebase App ID in the Your apps card of your Project settings .

    If anything seems wrong with the config file in your app, try the following:

    1. Delete the config file that you currently have in your app.

    2. Follow these instructions to download a new config file and add it to your Android app.

  4. If the SDK is logging events and everything seems to be set up correctly, but you're still not seeing the SDK detection message or processed data (after 10 minutes), contact Firebase Support .

  1. Check the setup of the Performance Monitoring Gradle plugin, as follows:

    1. Make sure that you added the plugin correctly. Specifically, check the following:

      • You added the plugin ( apply plugin: 'com.google.firebase.firebase-perf' ) in your module (app-level) build.gradle file.
      • You included the classpath dependency for the plugin ( classpath 'com.google.firebase:perf-plugin:1.4.2' ) in your project-level build.gradle file.

    2. Make sure that the plugin is not disabled through either of the following flags:

      • instrumentationEnabled in your module (app-level) build.gradle file
      • firebasePerformanceInstrumentationEnabled in your gradle.properties file

  2. Check that the Performance Monitoring SDK is not disabled through either of the following flags in your AndroidManifest.xml file:

    • firebase_performance_collection_enabled
    • firebase_performance_collection_deactivated
  3. Make sure that Performance Monitoring is not disabled at runtime .

  4. If you can't find anything that's disabled in your app, contact Firebase Support .

Performance Monitoring processes performance event data before displaying it in the Performance dashboard .

If it's been more than 24 hours since the "SDK detected" message appeared , and you're still not seeing data, then check the Firebase Status Dashboard in case there is a known outage. If there is no outage, contact Firebase Support .

General troubleshooting

If you've successfully added the SDK and are using Performance Monitoring in your app, the following troubleshooting tips can help with general issues that involve Performance Monitoring features and tooling.

If you're not seeing log messages for performance events , try the following troubleshooting steps:

  1. Check the setup of the Performance Monitoring Gradle plugin, as follows:

    1. Make sure that you added the plugin correctly. Specifically, check the following:

      • You added the plugin ( apply plugin: 'com.google.firebase.firebase-perf' ) in your module (app-level) build.gradle file.
      • You included the classpath dependency for the plugin ( classpath 'com.google.firebase:perf-plugin:1.4.2' ) in your project-level build.gradle file.

    2. Make sure that the plugin is not disabled through either of the following flags:

      • instrumentationEnabled in your module (app-level) build.gradle file
      • firebasePerformanceInstrumentationEnabled in your gradle.properties file

  2. Check that the Performance Monitoring SDK is not disabled through either of the following flags in your AndroidManifest.xml file:

    • firebase_performance_collection_enabled
    • firebase_performance_collection_deactivated
  3. Make sure that Performance Monitoring is not disabled at runtime .

  4. If you can't find anything that's disabled in your app, contact Firebase Support .

If you're missing data for screen rendering traces, try the following troubleshooting steps:

  1. Make sure that you're using the latest version of the Android SDK (v21.0.4). Screen rendering traces are only available with v15.2.0 or later.

  2. Make sure that you haven't manually disabled Hardware Acceleration for a screen.

  3. Make sure that you're not using DexGuard or Jack. Performance Monitoring is incompatible with these toolchains.

    • DexGuard disables automatic collection of app start, app-in-foreground, and app-in-background traces. However, any custom code traces should behave normally if your app uses DexGuard.

    • Jack is deprecated and generally should not be used in your app.

Are you seeing performance data for automatically collected traces but not for custom code traces ? Try the following troubleshooting steps:

  1. If you instrumented custom code traces via the Trace API , check the setup of the traces, especially the following:

    • Names for custom code traces and custom metrics must meet the following requirements: no leading or trailing whitespace, no leading underscore ( _ ) character, and max length is 32 characters.
    • All traces must be started and stopped. Any trace that is not started, not stopped, or stopped before started will not be logged.

  2. If you instrumented custom code traces via @AddTrace notation , check the setup of the Performance Monitoring Gradle plugin:

    1. Make sure that you added the plugin correctly. Specifically, check the following:

      • You added the plugin ( apply plugin: 'com.google.firebase.firebase-perf' ) in your module (app-level) build.gradle file.
      • You included the classpath dependency for the plugin ( classpath 'com.google.firebase:perf-plugin:1.4.2' ) in your project-level build.gradle file.

    2. Make sure that the plugin is not disabled through either of the following flags:

      • instrumentationEnabled in your module (app-level) build.gradle file
      • firebasePerformanceInstrumentationEnabled in your gradle.properties file

  3. Check your log messages to make sure that Performance Monitoring is logging expected custom code traces.

  4. If Performance Monitoring is logging events, but no data displays after 24 hours, contact Firebase Support .

If you're missing network request data, try the following troubleshooting steps:

  1. For Android apps, the Performance Monitoring Gradle plugin enables instrumentation that provides automatic monitoring of HTTP/S network requests . موارد زیر را بررسی کنید:

    1. Make sure that you added the plugin correctly. Specifically, check the following:

      • You added the plugin ( apply plugin: 'com.google.firebase.firebase-perf' ) in your module (app-level) build.gradle file.
      • You included the classpath dependency for the plugin ( classpath 'com.google.firebase:perf-plugin:1.4.2' ) in your project-level build.gradle file.

    2. Make sure that the plugin is not disabled through either of the following flags:

      • instrumentationEnabled in your module (app-level) build.gradle file
      • firebasePerformanceInstrumentationEnabled in your gradle.properties file

  2. Check for network library incompatibility. Performance Monitoring automatically collects metrics for network requests that use the following networking libraries: OkHttp 3.xx, Java's URLConnection, and Apache HttpClient.

    Note that you can add custom monitoring for network requests .

  3. از موارد زیر آگاه باشید:

    • Depending on the behavior of your code and networking libraries used by your code, Performance Monitoring might only report on network requests that are completed. This means that HTTP/S connections that are left open might not be reported.

    • Performance Monitoring is not compatible with DexGuard and Jack.

      • DexGuard disables monitoring of HTTP/S network requests.
      • Jack is deprecated and generally should not be used in your app.
    • Performance Monitoring does not report on network requests with invalid Content-Type headers. However, network requests without the Content-Type headers will still be accepted.

Learn more about how Performance Monitoring aggregates network request data under URL patterns.

You can also try out custom URL patterns !

سوالات متداول

We replaced Top Issues with Recent Alerts as a follow-up to our recent introduction of alerts, which automatically notify you when the thresholds you set are crossed. Issues are now deprecated and replaced by alerts.

The apps selector at the top of the Performance card filters the alert entries under Recent Alerts . Only the three most recent alerts for the app(s) selected are displayed.

To learn more about alerts, see Set up alerts for performance issues .

Performance Monitoring supports alerts for metrics that exceed defined thresholds. To avoid confusion with these configurable thresholds for performance metrics, we removed the ability to configure thresholds for issues .

We replaced the Details and Metrics pages with a newly redesigned, centralized user interface (UI) to improve how you troubleshoot issues. This new troubleshooting UI offers the same core functionality that Details and Metrics offered. To learn more about troubleshooting, see View more data for a specific trace .

Performance Monitoring collects performance data from your app's user devices. If your application has many users or if the app generates a large amount of performance activity, Performance Monitoring might limit data collection to a subset of devices to reduce the number of processed events. These limits are high enough so that, even with fewer events, the metric values are still representative of your user's app experience.

To manage the volume of data that we collect, Performance Monitoring uses the following sampling options:

  • On-device rate limiting : To prevent a device from sending sudden bursts of traces, we limit the number of code and network request traces sent from a device to 300 events every 10 mins. This approach protects the device from looped instrumentations that can send large amounts of performance data, and it prevents a single device from skewing the performance measurements.

  • Dynamic sampling : Performance Monitoring collects a limited number of code traces and network request traces per app daily across all app users. A dynamic sampling rate is fetched on devices (using Firebase Remote Config ) to determine whether a random device should capture and send traces. A device that is not selected for sampling does not send any events. The dynamic sampling rate is app-specific and adjusts to ensure that the overall volume of collected data remains below the limit.

    Projects that enabled BigQuery integration receive a higher limit for the number of network request traces.

    User sessions send additional, detailed data from a user's device, requiring more resources to capture and send the data. To minimize the impact of user sessions, Performance Monitoring might also restrict the number of sessions.

  • Server-side rate limiting : To ensure that apps don't exceed the sampling limit, Performance Monitoring might use server-side sampling to drop some events received from devices. Although this type of limiting doesn't change the effectiveness of our metrics, it may cause minor pattern shifts, including the following:

    • The number of traces can differ from the number of times that a piece of code was executed.
    • Traces that are closely coupled in code may each have a different number of samples.

We replaced the Issues tab with the introduction of Alerts, which automatically notifies you when the thresholds you set are exceeded. You no longer need to manually check the Firebase console to determine the status of a threshold. To learn about Alerts, see Set up alerts for performance issues .

We've redesigned the Performance Monitoring section of the Firebase console so that the Dashboard tab displays your key metrics and all your traces in one space. As part of the redesign, we removed the On device and Network pages.

The traces table at the bottom of the Dashboard tab has all the same information that the On device and Network tabs displayed, but with some added features, including the ability to sort your traces by the percentage change for a specific metric. To view all the metrics and data for a specific trace, click the trace name in the traces table.

View your traces in the following subtabs of the traces table:

  • Network request traces (both out-of-the-box and custom) — Network requests subtab
  • Custom code traces — Custom traces subtab
  • App start, app-in-foreground, app-in-background traces — Custom traces subtab
  • Screen rendering traces — Screen rendering subtab
  • Page load traces — Page load subtab

For details about the traces table and viewing metrics and data, visit the console overview page ( iOS+ | Android | Web ).

Slow rendering frames and frozen frames are calculated with an assumed device refresh rate of 60Hz. If a device refresh rate is lower than 60Hz, each frame will have a slower rendering time because fewer frames are rendered per second. Slower rendering times can cause more slow or frozen frames to be reported because more frames will be rendered slower or will freeze. However, if a device refresh rate is higher than 60Hz, each frame will have a faster rendering time. This can cause fewer slow or frozen frames to be reported. This is a current limitation in the Performance Monitoring SDK.

To see the performance of fragments in addition to app activity, make sure that your app is using Performance Monitoring Android SDK version 20.1.0 or above. To learn more, see Add Performance Monitoring to your app .

Each of the fragment and activity traces is based on its class name as defined in your application. Each of the screen traces contains the st prefix followed by the name of the class. On the Firebase console, the prefix is removed. To learn more, see Learn about screen rendering performance data (Apple & Android apps) .

Performance Monitoring conducts event sampling across all events collected on a device. This approach lets us collect the minimum events needed from user devices to provide performance metrics.

Performance Monitoring lets you set up alerts for the metrics you care about. For generated screen rendering traces, you can set up alerts to notify you when the slow and frozen frames percentage exceeds a threshold that you set.

Performance Monitoring for Android uses bytecode instrumentation to provide some out-of-the-box features like monitoring HTTP/S network requests . As a part of compilation, the process requires iteration through all the classes of your app (including dependencies) to instrument the code that is crucial in measuring the network request performance of your application.

Here are some key contributors to an increase in build time:

  • Number of classes or files
  • Size of each of those classes (lines of code)
  • Your machine configuration
  • Initial build versus a subsequent build (subsequent builds are usually faster than the initial build)

To optimize your build time, consider modularizing your code .

Starting with v1.3.3 of the Performance Monitoring plugin, we've concentrated on making considerable improvements in the incremental build processing and caching of library inputs. To receive the most recent build time improvements, make sure to use the latest version of the plugin (v1.4.2) .

Note that you can disable the Performance Monitoring plugin for your debug builds locally if you want to avoid long build times. However, this approach is not recommended for production builds, as it could result in missed performance measurements for the network requests in your app.

Performance Monitoring for Android uses bytecode instrumentation to provide some out-of-the-box features like monitoring HTTP/S network requests . As a part of compilation, the process requires iteration through all the classes of your app (including dependencies) to instrument the code that is crucial in measuring the network request performance of your application.

If you get build errors like JSR/RET are not supported with computeFrames option or similar errors after integrating with the Performance Monitoring plugin, this might be because you also have a dependency on a library that's incompatible with the Performance Monitoring Gradle plugin.

To get around this, you can exclude incompatible classes/libraries from being instrumented by following these steps:

  1. Update to the latest version of Performance Monitoring Gradle plugin (minimum v1.4.0 ).
  2. Update your Android Gradle plugin version to v7.2.0 or newer.
  3. Add the following flag to your module (app-level) build.gradle file to exclude the incompatible classes/libraries from being instrumented:
    android {
      // ...
      androidComponents {
        onVariants(selector().all(), {
            instrumentation.excludes.add("example.incompatible.library")
        })
      }
    }
    To learn more about the exclude property of Android Gradle plugin's Instrumentation API, see Instrumentation .

Please file a Github issue when you encounter build errors due to incompatible libraries so that they can also be excluded from being instrumented in the Performance Monitoring plugin.

If you have enabled the BigQuery integration for Firebase Performance Monitoring , your data will be exported to BigQuery 12 to 24 hours after the end of the day (Pacific Time).

For example, the data for April 19th will be available in BigQuery on April 20th between 12:00pm and midnight (all dates and times are Pacific Time).

Near real-time data processing and display

Firebase Performance Monitoring processes collected performance data as it comes in, which results in near real-time data display in the Firebase console. Processed data displays in the console within a few minutes of its collection, hence the term "near real-time".

To take advantage of near real-time data processing, make sure your app uses a real-time compatible SDK version .

To take advantage of near real-time data processing, you only need to make sure that your app uses a Performance Monitoring SDK version that's compatible with real-time data processing.

These are the real-time compatible SDK versions:

  • iOS — v7.3.0 or later
  • tvOS — v8.9.0 or later
  • Android — v19.0.10 or later (or Firebase Android BoM v26.1.0 or later)
  • Web — v7.14.0 or later

Note that we always recommend using the latest version of SDK, but any version listed above will enable Performance Monitoring to process your data in near real time.

These are the SDK versions compatible with real-time data processing:

  • iOS — v7.3.0 or later
  • tvOS — v8.9.0 or later
  • Android — v19.0.10 or later (or Firebase Android BoM v26.1.0 or later)
  • Web — v7.14.0 or later

Note that we always recommend using the latest version of SDK, but any version listed above will enable Performance Monitoring to process your data in near real time.

If your app doesn't use a real-time compatible SDK version, you will still see all your app's performance data in the Firebase console. However, the display of performance data will be delayed by roughly 36 hours from the time of its collection.

بله! Regardless of which SDK version an app instance uses, you'll see performance data from all your users.

However, if you're looking at recent data (less than roughly 36 hours old), then the displayed data is from users of app instances using a real-time compatible SDK version. The non-recent data, though, includes performance data from all versions of your app.

Contacting Firebase Support

If you reach out to Firebase Support , always include your Firebase App ID. Find your Firebase App ID in the Your apps card of your Project settings .