switch to sentry
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michele Scandura 2021-09-15 16:11:40 +01:00
parent 9033151006
commit dd97d5ec4e
9 changed files with 19 additions and 34 deletions

View File

@ -1,8 +1,7 @@
using System;
using System.Threading.Tasks;
using System.Threading.Channels;
using Exceptionless;
using Exceptionless.Models;
namespace Sledgemapper
{
@ -29,7 +28,7 @@ namespace Sledgemapper
}
catch (Exception ex)
{
ExceptionlessClient.Default.SubmitException(ex);
//ExceptionlessClient.Default.SubmitException(ex);
throw;
}
}

View File

@ -1,5 +1,4 @@
using System;
using Exceptionless;
using System;
namespace Sledgemapper
{
@ -8,14 +7,8 @@ namespace Sledgemapper
[STAThread]
static void Main()
{
ExceptionlessClient.Default.Configuration.ServerUrl = "https://exceptionless.michelescandura.com";
#if DEBUG
ExceptionlessClient.Default.Startup("Qvdn6odZRJyGNnorjayMkiwjVsnAK3rNkFtn9bvL");
#else
ExceptionlessClient.Default.Startup("uprV1LocxAlUPPC9oB4eOlt8jGZ5WypMZKdJCsdL");
#endif
using(Sentry.SentrySdk.Init("https://973ac1606651454ba7a19f642d0a9bc1@glitchtip.michelescandura.com/1"))
using (var game = new Sledgemapper())
game.Run();
}

View File

@ -1,5 +1,4 @@
using System;
using Exceptionless;
using Microsoft.Xna.Framework;
namespace Sledgemapper
@ -28,7 +27,7 @@ namespace Sledgemapper
}
catch (Exception ex)
{
ExceptionlessClient.Default.SubmitException(ex);
//ExceptionlessClient.Default.SubmitException(ex);
MachineName = "n/a";
}
}

View File

@ -1,5 +1,3 @@
using Exceptionless;
using Exceptionless.Models;
using Microsoft.AspNetCore.SignalR.Client;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@ -75,27 +73,27 @@ namespace Sledgemapper
private async Task OnHubDisconnected(Exception arg)
{
ExceptionlessClient.Default.SubmitEvent(new Event { Message = "Hub disconnected", Type = "SignalR Client Events", Source = _settings.MachineName });
// ExceptionlessClient.Default.SubmitEvent(new Event { Message = "Hub disconnected", Type = "SignalR Client Events", Source = _settings.MachineName });
_mainWidget.lblConnectionStatus.Text = "Disconnected";
await Task.Yield();
}
private async Task OnHubReconnecting(Exception arg)
{
ExceptionlessClient.Default.SubmitEvent(new Event { Message = "Reconnecting Hub", Type = "SignalR Client Events", Source = _settings.MachineName });
// ExceptionlessClient.Default.SubmitEvent(new Event { Message = "Reconnecting Hub", Type = "SignalR Client Events", Source = _settings.MachineName });
_mainWidget.lblConnectionStatus.Text = "Reconnecting";
await Task.Yield();
}
private async Task OnHubReconnected(string arg)
{
ExceptionlessClient.Default.SubmitEvent(new Event { Message = "Hub reconnected", Type = "SignalR Client Events", Source = _settings.MachineName });
// ExceptionlessClient.Default.SubmitEvent(new Event { Message = "Hub reconnected", Type = "SignalR Client Events", Source = _settings.MachineName });
_mainWidget.lblConnectionStatus.Text = "Connected";
await Task.Yield();
}
protected override void Initialize()
{
ExceptionlessClient.Default.SubmitEvent(new Event { Message = "Initialize", Type = "AppLifecycle", Source = _settings.MachineName });
// ExceptionlessClient.Default.SubmitEvent(new Event { Message = "Initialize", Type = "AppLifecycle", Source = _settings.MachineName });
IsMouseVisible = true;
Window.AllowUserResizing = true;
Window.ClientSizeChanged += OnClientSizeChanged;

View File

@ -42,7 +42,6 @@
</ItemGroup> -->
<ItemGroup>
<PackageReference Include="AsyncAwaitBestPractices" Version="6.0.0" />
<PackageReference Include="exceptionless" Version="4.6.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0-preview.7.21377.19" />
<PackageReference Include="MonoGame.Extended" Version="3.8.0" />
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
@ -55,6 +54,7 @@
<PackageReference Include="polly" Version="7.2.2" />
<PackageReference Include="polly.extensions.http" Version="3.0.0" />
<PackageReference Include="Refit.HttpClientFactory" Version="6.0.94" />
<PackageReference Include="Sentry" Version="3.9.2" />
<PackageReference Include="TinyMessenger" Version="1.4.0-alpha3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>

View File

@ -1,4 +1,3 @@
using Exceptionless;
using Myra.Graphics2D.Brushes;
using Myra.Graphics2D.UI;
using System;
@ -123,7 +122,7 @@ namespace Sledgemapper.UI
}
catch (Exception ex)
{
ExceptionlessClient.Default.SubmitException(ex);
//ExceptionlessClient.Default.SubmitException(ex);
}
//if (successful)

View File

@ -1,7 +1,6 @@
using System;
using System.Diagnostics;
using System.Linq;
using Exceptionless;
using Microsoft.Xna.Framework;
using Myra.Graphics2D.Brushes;
using Myra.Graphics2D.UI;
@ -122,13 +121,13 @@ namespace Sledgemapper.UI
}
catch (Refit.ApiException refitException)
{
ExceptionlessClient.Default.SubmitException(refitException);
//ExceptionlessClient.Default.SubmitException(refitException);
LblLoginError.Text = refitException.Content;
LblLoginError.Visible = true;
}
catch (Exception ex)
{
ExceptionlessClient.Default.SubmitException(ex);
//ExceptionlessClient.Default.SubmitException(ex);
LblLoginError.Text = "Can't connect to the server";
LblLoginError.Visible = true;
Debug.Write(ex);
@ -190,13 +189,13 @@ namespace Sledgemapper.UI
}
catch (Refit.ApiException refitException)
{
ExceptionlessClient.Default.SubmitException(refitException);
//ExceptionlessClient.Default.SubmitException(refitException);
localContent.LblLoginError.Text = refitException.Content;
localContent.LblLoginError.Visible = true;
}
catch (Exception ex)
{
ExceptionlessClient.Default.SubmitException(ex);
//ExceptionlessClient.Default.SubmitException(ex);
localContent.LblLoginError.Text = "Can't connect to the server";
localContent.LblLoginError.Visible = true;
Debug.Write(ex);

View File

@ -1,4 +1,3 @@
using Exceptionless;
using Microsoft.AspNetCore.SignalR.Client;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
@ -617,7 +616,7 @@ namespace Sledgemapper.UI
}
catch (Exception ex)
{
ExceptionlessClient.Default.SubmitException(ex);
Sentry.SentrySdk.CaptureException(ex);
}
//if (successful)
@ -780,7 +779,7 @@ namespace Sledgemapper.UI
}
catch (Exception ex)
{
ExceptionlessClient.Default.SubmitException(ex);
//ExceptionlessClient.Default.SubmitException(ex);
}
//if (successful)

View File

@ -1,6 +1,5 @@
/* Generated by MyraPad at 10/11/2020 10:59:36 */
using System;
using Exceptionless;
using Microsoft.AspNetCore.SignalR.Client;
using Myra.Graphics2D.UI;
using Sledgemapper.Shared.Entities;
@ -58,7 +57,7 @@ namespace Sledgemapper.UI
}
catch (Exception ex)
{
ExceptionlessClient.Default.SubmitException(ex);
//ExceptionlessClient.Default.SubmitException(ex);
}
if (successful)