about summary refs log tree commit diff
path: root/MatrixUtils.Desktop/SentryService.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-10-29 19:05:58 +0100
committerRory& <root@rory.gay>2025-10-29 19:05:58 +0100
commit7182e3f9650e4de9f944d8c4e897fe4a24a3b8bc (patch)
tree8e9def463203505b21c3e9529d7d6f84327e2ffd /MatrixUtils.Desktop/SentryService.cs
parentVarious fixes (diff)
downloadMatrixUtils-7182e3f9650e4de9f944d8c4e897fe4a24a3b8bc.tar.xz
dotnet 10, synapse admin room list improvements HEAD master
Diffstat (limited to 'MatrixUtils.Desktop/SentryService.cs')
-rw-r--r--MatrixUtils.Desktop/SentryService.cs29
1 files changed, 0 insertions, 29 deletions
diff --git a/MatrixUtils.Desktop/SentryService.cs b/MatrixUtils.Desktop/SentryService.cs
deleted file mode 100644

index c965632..0000000 --- a/MatrixUtils.Desktop/SentryService.cs +++ /dev/null
@@ -1,29 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using Sentry; - -namespace MatrixUtils.Desktop; - -public class SentryService : IDisposable { - private IDisposable? _sentrySdkDisposable; - public SentryService(IServiceScopeFactory scopeFactory, ILogger<SentryService> logger) { - var config = scopeFactory.CreateScope().ServiceProvider.GetRequiredService<RMUDesktopConfiguration>(); - if (config.SentryDsn is null) { - logger.LogWarning("Sentry DSN is not set, skipping Sentry initialisation"); - return; - } - _sentrySdkDisposable = SentrySdk.Init(o => { - o.Dsn = config.SentryDsn; - // When configuring for the first time, to see what the SDK is doing: - o.Debug = true; - // Set traces_sample_rate to 1.0 to capture 100% of transactions for performance monitoring. - // We recommend adjusting this value in production. - o.TracesSampleRate = 1.0; - // Enable Global Mode if running in a client app - o.IsGlobalModeEnabled = true; - }); - } - - /// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary> - public void Dispose() => _sentrySdkDisposable?.Dispose(); -}