GooglePlayServicesComponents
GooglePlayServicesComponents copied to clipboard
FirebasePerformance @AddTrace() Not Working
Xamarin.Android Version (eg: 6.0):
Xamarin.Android Version: 10.2.0.100 (Visual Studio Enterprise)
Operating System & Version (eg: Mac OSX 10.11):
Mac OS 10.15.2 / VisualStudio for Mac 8.5.3
Describe your Issue
When added '[Firebase.Perf.Metrics.AddTrace(Enabled = true, Name = "someName")]' above methods it's not creating new traces to Firebase Performance console, nor do I see them logged to the console.
Relevant information
We unpacked a dll and noticed this line: .custom instance void [Xamarin.Firebase.Perf]Firebase.Perf.Metrics.AddTraceAttribute::.ctor() = ( 01 00 02 00 54 02 07 45 6E 61 62 6C 65 64 01 54 // ....T..Enabled.T 0E 04 4E 61 6D 65 09 4F 6E 50 61 75 73 65 28 29 )
Seems like this should be AddTrace() and not AddTraceAttribute(). When I decompiled a native Kotlin class with '@AddTrace(...)' to a method it shows this: ' @Lcom/google/firebase/perf/metrics/AddTrace;(name="someName() method", enabled=true) // invisible'
Add relevant project settings from *.csproj
file:
Packages used:
<PackageReference Include="Xamarin.Forms" Version="4.4.0.991265" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
<PackageReference Include="Xamarin.Firebase.Perf">
<Version>71.1620.2</Version>
</PackageReference>
Steps to Reproduce (with link to sample solution if possible):
See code snippet above fairly simple example.
Is there any limitation of using custom traces feature i.e. @AddTrace We see a spike in ANR possibly due to this
Firebase.Perf.FirebasePerformance.Instance.NewTrace seems to be missing in 119.0.7 or maybe I missed some update instructions. I'm updating from a pretty old version. Any advice? Thanks.