NewRelicAgentForXamarin 1.0.72

There is a newer version of this package available.
See the version list below for details.
dotnet add package NewRelicAgentForXamarin --version 1.0.72
NuGet\Install-Package NewRelicAgentForXamarin -Version 1.0.72
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NewRelicAgentForXamarin" Version="1.0.72" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NewRelicAgentForXamarin --version 1.0.72
#r "nuget: NewRelicAgentForXamarin, 1.0.72"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NewRelicAgentForXamarin as a Cake Addin
#addin nuget:?package=NewRelicAgentForXamarin&version=1.0.72

// Install NewRelicAgentForXamarin as a Cake Tool
#tool nuget:?package=NewRelicAgentForXamarin&version=1.0.72

New Relic Agent For Xamarin

New Relic Agent For Xamarin

Installation

The Agent to Instrument New Relic in Xamarin is available on a NuGet Package called NewRelicAgentForXamarin.

License

MIT

To start Install the NuGet Package via Manage Nuget Packages under the Tools menu for Windows and under the Project menu on Mac.

on the MainPage.xaml.cs inside the MainPage method.

NewRelic.Agent.withApplicationToken("new_relic_license_key").start(Application.Current);

Make sure you replace the new_relic_license_key with your own. You can find your own license key by creating a Mobile app within the New Relic UI. Go to Mobile > Add a new app > Choose your platform > Give your App a name > Your license key is now visible lower down the page.

Optionally you can add logs adding a using on top of the file:

using NewRelic.logging;

and adding the withLogLevel instruction at the start instruction:

NewRelic.Agent.withApplicationToken("new_relic_license_key").withLogLevel(AgentLog.AUDIT).start(Application.Current);

For this work in progress version we should call the onSleep method manually on the OnSleep method inside the App.xaml.cs file:

protected override void OnSleep()
{
    NewRelic.Agent.onSleep();
}

Custom Events with Attributes

For sending Custom events we use the method recordCustomEvent included in the package, sending as parameters an event name and optionally we can send custom attributes:

NewRelic.Agent.recordCustomEvent(string eventName, Dictionary<string, object> attributes);
NewRelic.Agent.recordCustomEvent(string breadcrumbName, Dictionary<string, object> attributes);

Handled Error

Inside a try Catch block, in the catch part we can record handled exceptions:

NewRelic.Agent.recordHandledException (Exception e, Dictionary<string, object> attributes);;

Notice Http Request

For noticing http request in this work in progress version we should add the instruction:

NewRelic.Agent.noticeHttpTransaction(string url, string httpMethod, int statusCode, long startTimeMs, long endTimeMs, long bytesSent, long bytesReceived);

Crash Report

To use the crash event trail:

Go to one.newrelic.com > Mobile > (select a mobile app) > Crash analysis.

On the lower right side of the Crash analysis page, select a crash type.

On the Crash details page, beside the stack trace, select Event trail.

Study the events leading up to a crash type for clues to the reasons for the crash.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.0 is compatible.  netstandard1.1 was computed.  netstandard1.2 was computed.  netstandard1.3 was computed.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 was computed. 
.NET Framework net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed.  monoandroid10 is compatible. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Windows Phone wp8 was computed.  wp81 was computed.  wpa81 was computed. 
Windows Store netcore was computed.  netcore45 was computed.  netcore451 was computed. 
Xamarin.iOS xamarinios was computed.  xamarinios10 is compatible. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.83 3,151 6/28/2022
1.0.82 730 6/28/2022
1.0.81 686 6/28/2022
1.0.80 1,203 6/15/2022
1.0.79 1,359 6/15/2022
1.0.78 1,412 6/14/2022
1.0.77 1,202 6/14/2022
1.0.76 1,187 6/13/2022
1.0.75 1,158 6/13/2022
1.0.74 711 5/4/2022
1.0.72 714 5/3/2022
1.0.71 709 5/3/2022
1.0.66 726 5/3/2022
1.0.65 722 5/2/2022
1.0.63 711 5/2/2022
1.0.45 706 5/2/2022
1.0.18 1,364 4/6/2022
1.0.17 1,259 2/22/2022
1.0.16 1,479 2/17/2022
1.0.15 1,463 2/17/2022
1.0.14 1,284 2/17/2022
1.0.13 1,277 2/8/2022
1.0.11 1,224 2/8/2022
1.0.10 1,365 2/8/2022
1.0.9 1,393 2/8/2022
1.0.8 1,464 2/8/2022
1.0.6 1,520 2/7/2022
1.0.5 1,038 2/5/2022
1.0.1 1,039 2/3/2022
1.0.0 1,014 2/3/2022

Creation of NuGet Package to Instrument New Relic on a Xamarin Project.