add bugsnag error reporting (#665)
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Blazored.LocalStorage" Version="4.2.0" />
|
||||
<PackageReference Include="Bugsnag.AspNet.Core" Version="3.0.0" />
|
||||
<PackageReference Include="FluentValidation" Version="10.3.6" />
|
||||
<PackageReference Include="FluentValidation.AspNetCore" Version="10.3.6" />
|
||||
<PackageReference Include="HtmlSanitizer" Version="7.1.475" />
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Channels;
|
||||
using Blazored.LocalStorage;
|
||||
using Bugsnag.AspNet.Core;
|
||||
using Dapper;
|
||||
using ErsatzTV.Application;
|
||||
using ErsatzTV.Application.Channels.Queries;
|
||||
@@ -12,6 +13,7 @@ using ErsatzTV.Application.Streaming;
|
||||
using ErsatzTV.Application.Streaming.Commands;
|
||||
using ErsatzTV.Core;
|
||||
using ErsatzTV.Core.Emby;
|
||||
using ErsatzTV.Core.Errors;
|
||||
using ErsatzTV.Core.FFmpeg;
|
||||
using ErsatzTV.Core.Health;
|
||||
using ErsatzTV.Core.Health.Checks;
|
||||
@@ -80,6 +82,23 @@ namespace ErsatzTV
|
||||
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
BugsnagConfiguration bugsnagConfig = Configuration.GetSection("Bugsnag").Get<BugsnagConfiguration>();
|
||||
|
||||
services.AddBugsnag(
|
||||
configuration =>
|
||||
{
|
||||
configuration.ApiKey = bugsnagConfig.ApiKey;
|
||||
configuration.ProjectNamespaces = new[] { "ErsatzTV" };
|
||||
configuration.AppVersion = Assembly.GetEntryAssembly()
|
||||
?.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
|
||||
?.InformationalVersion ?? "unknown";
|
||||
|
||||
configuration.NotifyReleaseStages = new[] { "public" };
|
||||
|
||||
// effectively "disable" by tweaking app config
|
||||
configuration.ReleaseStage = bugsnagConfig.Enable ? "public" : "private";
|
||||
});
|
||||
|
||||
services.AddCors(
|
||||
o => o.AddPolicy(
|
||||
"AllowAll",
|
||||
|
||||
@@ -34,5 +34,9 @@
|
||||
},
|
||||
"Trakt": {
|
||||
"ClientId": "5a4e78338b7f177cf980d6a8881dd5a52dee680746864e9e442b42d5f4d4ac82"
|
||||
},
|
||||
"Bugsnag": {
|
||||
"ApiKey": "f59f3cc93cce91210a5c0f047eb2047c",
|
||||
"Enable": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user