1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

Use correct sentry integration package. Fixes #669 (#670)

This commit is contained in:
David Roth 2020-03-16 13:25:46 +01:00 committed by GitHub
parent 287054c6e7
commit b7b06d77df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 8 deletions

View File

@ -45,7 +45,7 @@
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Extensions.Logging.File" Version="2.0.0" />
<PackageReference Include="Serilog.Sinks.AzureDocumentDB" Version="3.8.0" />
<PackageReference Include="Serilog.Sinks.Sentry.AspNetCore" Version="2.4.2" />
<PackageReference Include="Sentry.Serilog" Version="2.1.0" />
<PackageReference Include="IdentityServer4" Version="3.1.2" />
<PackageReference Include="Dapper" Version="2.0.30" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />

View File

@ -22,10 +22,6 @@ namespace Bit.Core.Utilities
return;
}
if(CoreHelpers.SettingHasValue(globalSettings?.Sentry.Dsn))
{
appBuilder.AddSentryContext();
}
applicationLifetime.ApplicationStopped.Register(Log.CloseAndFlush);
}
@ -72,9 +68,7 @@ namespace Bit.Core.Utilities
{
config.WriteTo.Sentry(globalSettings.Sentry.Dsn)
.Enrich.FromLogContext()
.Enrich.WithProperty("Project", globalSettings.ProjectName)
.Destructure.With<HttpContextDestructingPolicy>()
.Filter.ByExcluding(e => e.Exception?.CheckIfCaptured() == true);
.Enrich.WithProperty("Project", globalSettings.ProjectName);
}
else if(CoreHelpers.SettingHasValue(globalSettings.LogDirectory))
{