firebase / firebase-android-sdk

Firebase Android SDK
https://firebase.google.com
Apache License 2.0
2.28k stars 578 forks source link

How to control the switch of ANR collection online #4035

Open iamskullking opened 2 years ago

iamskullking commented 2 years ago

What feature would you like to see?

sdk in my project: com.google.firebase:firebase-crashlytics:18.2.4

our needs: We want to control whether we want to collect ANR events, But we didn't find that there is such a function in the sdk, We would like to know if there are some configurations or methods that can support our needs now?

what we found:

image

The sdk will obtain a configuration file from the Internet. Is it possible to modify this file?

google-oss-bot commented 2 years ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

iamskullking commented 2 years ago

@argzdev Hi, I would like to ask if there is a way to do it now

argzdev commented 2 years ago

Hi @iamskullking, thanks for filing. There's currently no way to control collection for ANR events. You can only enable/disable Crashlytics as a whole by disabling automatic reporting and sending data when you choose to in your code. Here's the link to our documentations.

I've marked this as a feature request, so our engineers can take a look when they have the time. I can't promise any timeline for this. If others find this feature useful, adding an emoji thumbs up on the post can help our engineers prioritize adding this to the roadmap.

iamskullking commented 2 years ago

@argzdev ok, thanks a lot for your help :)

argzdev commented 2 years ago

@iamskullking, sure, no problem! :)

mrichards commented 2 years ago

@iamskullking To help us evaluate this feature request, can you elaborate on why you'd like to enable/disable ANRs? That is, what is the benefit of turning off ANR collection? Follow up question: Does it matter if it can be turned on/off at runtime vs build time?