NewRelicAgentForXamarin 1.0.74
See the version list below for details.
dotnet add package NewRelicAgentForXamarin --version 1.0.74
NuGet\Install-Package NewRelicAgentForXamarin -Version 1.0.74
<PackageReference Include="NewRelicAgentForXamarin" Version="1.0.74" />
paket add NewRelicAgentForXamarin --version 1.0.74
#r "nuget: NewRelicAgentForXamarin, 1.0.74"
// Install NewRelicAgentForXamarin as a Cake Addin #addin nuget:?package=NewRelicAgentForXamarin&version=1.0.74 // Install NewRelicAgentForXamarin as a Cake Tool #tool nuget:?package=NewRelicAgentForXamarin&version=1.0.74
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);
BreadCrumbs
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 we should use the Class NetworkRequest
instead of the C# native HttpClient
:
NetworkRequest client = new NetworkRequest();
Get Request Example
static async Task<HttpResponseMessage> GetRequest()
{
NetworkRequest client = new NetworkRequest();
HttpResponseMessage responseBody = await client.GetAsync("https://your-endpoint-here/");
return responseBody;
}
Put Request Example
static async Task<HttpResponseMessage> PutRequest()
{
NetworkRequest client = new NetworkRequest();
HttpContent content = new StringContent("");
HttpResponseMessage responseBody = await client.PutAsync("https://your-endpoint-here/", content);
return responseBody;
}
Post Request Example
static async Task<HttpResponseMessage> PostRequest()
{
NetworkRequest client = new NetworkRequest();
HttpContent content = new StringContent("");
HttpResponseMessage responseBody = await client.PostAsync("https://your-endpoint-here/", content);
return responseBody;
}
Delete Request Example
static async Task<HttpResponseMessage> DeleteRequest()
{
NetworkRequest client = new NetworkRequest();
HttpResponseMessage responseBody = await client.DeleteAsync("https://your-endpoint-here/");
return responseBody;
}
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 | Versions 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. |
-
.NETStandard 1.0
- NETStandard.Library (>= 2.0.3)
- Newtonsoft.Json (>= 13.0.1)
- System.Json (>= 4.7.1)
- Xam.Plugin.DeviceInfo (>= 4.1.1)
- Xam.Plugins.Settings (>= 3.1.1)
- Xamarin.Essentials (>= 1.6.1)
- Xamarin.Forms (>= 5.0.0.2012)
-
.NETStandard 2.0
- NETStandard.Library (>= 2.0.3)
- Newtonsoft.Json (>= 13.0.1)
- SharpZipLib (>= 1.3.3)
- System.Json (>= 4.7.1)
- Xam.Plugin.DeviceInfo (>= 4.1.1)
- Xam.Plugins.Settings (>= 3.1.1)
- Xamarin.Essentials (>= 1.6.1)
- Xamarin.Forms (>= 5.0.0.2012)
-
.NETStandard 2.1
- NETStandard.Library (>= 2.0.3)
- Newtonsoft.Json (>= 13.0.1)
- SharpZipLib (>= 1.3.3)
- System.Json (>= 4.7.1)
- Xam.Plugin.DeviceInfo (>= 4.1.1)
- Xam.Plugins.Settings (>= 3.1.1)
- Xamarin.Essentials (>= 1.6.1)
- Xamarin.Forms (>= 5.0.0.2012)
-
MonoAndroid 1.0
- NETStandard.Library (>= 2.0.3)
- Newtonsoft.Json (>= 13.0.1)
- SharpZipLib (>= 1.3.3)
- System.Json (>= 4.7.1)
- Xam.Plugin.DeviceInfo (>= 4.1.1)
- Xam.Plugins.Settings (>= 3.1.1)
- Xamarin.Essentials (>= 1.6.1)
- Xamarin.Forms (>= 5.0.0.2012)
-
Xamarin.iOS 1.0
- NETStandard.Library (>= 2.0.3)
- Newtonsoft.Json (>= 13.0.1)
- SharpZipLib (>= 1.3.3)
- System.Json (>= 4.7.1)
- Xam.Plugin.DeviceInfo (>= 4.1.1)
- Xam.Plugins.Settings (>= 3.1.1)
- Xamarin.Essentials (>= 1.6.1)
- Xamarin.Forms (>= 5.0.0.2012)
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,316 | 6/28/2022 |
1.0.82 | 773 | 6/28/2022 |
1.0.81 | 712 | 6/28/2022 |
1.0.80 | 1,225 | 6/15/2022 |
1.0.79 | 1,387 | 6/15/2022 |
1.0.78 | 1,435 | 6/14/2022 |
1.0.77 | 1,225 | 6/14/2022 |
1.0.76 | 1,210 | 6/13/2022 |
1.0.75 | 1,181 | 6/13/2022 |
1.0.74 | 738 | 5/4/2022 |
1.0.72 | 737 | 5/3/2022 |
1.0.71 | 734 | 5/3/2022 |
1.0.66 | 751 | 5/3/2022 |
1.0.65 | 745 | 5/2/2022 |
1.0.63 | 735 | 5/2/2022 |
1.0.45 | 727 | 5/2/2022 |
1.0.18 | 1,389 | 4/6/2022 |
1.0.17 | 1,287 | 2/22/2022 |
1.0.16 | 1,501 | 2/17/2022 |
1.0.15 | 1,486 | 2/17/2022 |
1.0.14 | 1,311 | 2/17/2022 |
1.0.13 | 1,299 | 2/8/2022 |
1.0.11 | 1,248 | 2/8/2022 |
1.0.10 | 1,390 | 2/8/2022 |
1.0.9 | 1,413 | 2/8/2022 |
1.0.8 | 1,486 | 2/8/2022 |
1.0.6 | 1,545 | 2/7/2022 |
1.0.5 | 1,077 | 2/5/2022 |
1.0.1 | 1,084 | 2/3/2022 |
1.0.0 | 1,058 | 2/3/2022 |
Creation of NuGet Package to Instrument New Relic on a Xamarin Project.