Open SpurguX opened 4 years ago
Does the Firebase doc mention configuration that needs to be added?
Well according to the docs:
"Performance Monitoring automatically collects metrics for network requests that use the following networking libraries:
This out-of-the-box monitoring includes most network requests for your app. However, some requests might not be reported or you might use a different library to make network requests."
And NativeScript does use HttpUrlConnection in its HttpRequestTask class. I'm using axios in my app though, but that shouldn't matter, as far as I understand, since the Android app will be making requests using HttpUrlConnection in the end.
OK, that's clear. So if the plugin doesn't need to configure anything then I have no clue why it's not working..
I have asked about this issue on Slack's Firebase workspace perf-mon channel and got the following response:
I am not sure how nativescript-plugin-firebase works, but network requests are automatically instrumented by Firebase Performance Gradle Plugin. Therefore, the Firebase Performance SDK itself is not sufficient to collect network traffic. Based on your description, it looks like that SDK is acting correctly, but the functionality provided by Gradle plugin is not.
I do not see on the Gradle files generated by the nativescript plugin any mention of the steps required to add the above mentioned plugin. Please take a look as Step 2 on this page.
If the plugin itself cannot make the changes, maybe we can change the documentation to tell users what o change manually in order to add the Firebase Performance Gradle Plugin.
@jalberto-ghub Makes sense. The plugin doesn't add it, so at the very least there should be a mention of https://firebase.google.com/docs/perf-mon/get-started-android in the plugin docs.
Anyone wants to try adding that config and PR the docs?
@EddyVerbruggen do you think the changes can be applied to the Gradle files on App_Resources
? I am willing to try and then PR the documentation, but I am new to Gradle so really do not understand much how it all works. There seem to be Gradle files all over on the generated platforms/android
.
It's worth a shot, but it may require a hook to successfully manipulate the gradle files in the platforms/android folder. The plugin already has such a hook btw.
But first step would be to try the App_Resources change and see where the change ends up in platforms/android.
I've tried doing the App_Resources changes but it didn't work :(
Finally I have created a dummy plugin in my project with an after-prepare hook to manipulate the gradle files with the changes from https://firebase.google.com/docs/perf-mon/get-started-android
According to the docs Firebase Performance automatically monitors HTTP network requests. However, after weeks of using Firebase, the network tab in the Firebase console remains empty. I'm wondering whether this feature is implemented in this plugin or requires some additional configuration? Didn't find anything by browsing the source.
Custom traces are working just fine.
Here's the content of my conf file: