Googleplayservicescomponents: There's no NewTrace method in Firebase.Perf

Created on 10 Oct 2018  路  19Comments  路  Source: xamarin/GooglePlayServicesComponents

On Android, as per docs, the instance of FirebasePerformance should have a NewTrace(string) method, but it doesn't.

This was tested using both the current stable (60.1142.1) and latest preview (70.1600.0-preview2).

VS bug #732434

azdo-sync

All 19 comments

@willsb I have assigned this too @Redth to investigate

I am facing the same issue. I am trying to add firebase performance monitoring to my project in xamarin but I could not find any proper documentation to use this nuget package in my app. Can you please provide a documentation or steps to use this in my app. Any help will be appreciated.

Hey, @willsb and @Redth I've tried to build the FirebasePerformance manually while changing the base type of com.google.firebase.perf.metrics.Trace to java.lang.Object.

In Firebase-Perf/Transforms/Metadata.xml I've added the following line:

<attr path="/api/package/*[@extends='com.google.android.gms.internal.zzekz']" name="extends">java.lang.Object</attr>

And then built the project, and added the resulting .dll directly into our Xamarin project.
NewTrace(string) did show up together with Trace. But while trying to watch FirebasePeformance console outputs, nothing came out.

I tried checking the outputs with adb logcat -s FirebasePerformance.

Other than that, build the whole project again with sh ./build.sh --target=nuget and adding the result .nupkg didn't result in being able to use NewTrace in comparison to simply adding the .dll after a build.

Update: We managed to both compile and get things working. The fix is indeed just that little change in the Metadata.xml package. We did not submit a PR simply because we are not aware of any side effects this might cause in other Xamarin.Firebase packages

Can somebody please tell me how can i make performance monitoring working in my xamarin.forms project in both android and ios. Because i could find any documentation or any steps which i can follow. It will be really great if somebody can help. Performance monitoring is enabled in my app the only issue is how can i trace other api calls because there is no newTrace(String) in current package. Thank you in advance.

can we expect any update to fix this issue soon?

We are working on this, thanks for your patience

Metrics.Trace class was surfaced with:

    <attr path="/api/package/*[@extends='com.google.android.gms.internal.firebase-perf.zze']" name="extends">java.lang.Object</attr>

This fix will be in the next prerelease packages.

Closing this one.

Please reopen if necessary.

Any plans on when the pre-release packages will be available? There's nothing on NuGet

Over a month has passed and there still are no new releases on NuGet.

Is release for this coming anytime soon?

Hey guys, the fix still isn't available in the latest pre-release packages.
Xamarin.Firebase.Perf 71.1620.0-preview6 still doesn't include the Trace reference. We still can't use access NewTrace(string) from the FirebasePerformance instance.

Why was this even closed in the first place if it's not available after 5 months?

Our team is also looking for this feature, 71.1620.0-preview8 doesn't have the NewTrace method.

Should this issue be reopened? @moljac @Redth

@Redth @moljac It seems this issue hasn't been solved in stable 71.1620.0, since neither NewTrace method nor Trace class are exposed.

It looks like Firebase Performance on Android requires a gradle plugin to be run which isn't documented at all by google, other than the fact it exists and should be added to your gradle build script. Looking at the .jar file it seems that there's quite a bit going on with it, including quite possibly some byte code rewriting. At this point I can't say we support this set of API's and we will likely remove the NuGet package as a result.

Since this last update we've learned that definitely _some_ parts of Performance monitoring are working with just the binding and not all the functionality necessarily requires the gradle plugin (or some ported version of it on our side) to function. As long as this is the case we will keep the bindings around for these. For now we have no future plans to support any of the functionality that requires the gradle plugin to work.

Was this page helpful?
0 / 5 - 0 ratings