-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bugsnag #488
Add bugsnag #488
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #488 +/- ##
==========================================
- Coverage 57.15% 57.15% -0.01%
==========================================
Files 277 277
Lines 14150 14152 +2
Branches 1900 1900
==========================================
+ Hits 8088 8089 +1
Misses 5474 5474
- Partials 588 589 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 16 of 19 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @johnml1135)
src/Machine/src/Serval.Machine.EngineServer/Program.cs
line 32 at r2 (raw file):
} builder.Services.AddBugSnag(builder.Configuration);
We don't need our own AddBugSnag
method. We can just call:
builder.Services.Configure<Bugsnag.Configuration>(builder.Configuration.GetSection("Bugsnag"));
builder.Services.AddBugSnag();
src/Serval/src/Serval.Shared/Controllers/BugsnagExceptionFilter.cs
line 5 at r2 (raw file):
namespace Serval.Shared.Controllers; public class BugsnagExceptionFilter : ExceptionFilterAttribute
We don't need this. Bugsnag automatically reports unhandled exceptions.
src/Serval/src/Serval.Shared/Controllers/ServalControllerBase.cs
line 14 at r2 (raw file):
[TypeFilter(typeof(ForbiddenExceptionFilter))] [TypeFilter(typeof(BadRequestExceptionFilter))] public abstract class ServalControllerBase(IAuthorizationService authService, Bugsnag.IClient bugsnagClient)
There is no need to inject the BugSnag client into every controller. We can just inject it where needed.
src/ServiceToolkit/src/SIL.ServiceToolkit/Configuration/BugsnagOptions.cs
line 3 at r2 (raw file):
namespace SIL.ServiceToolkit.Services; public class BugsnagOptions
Bugsnag already has a configuration options class.
src/ServiceToolkit/src/SIL.ServiceToolkit/Configuration/IServiceCollectionExtensions.cs
line 9 at r2 (raw file):
public static class IServiceCollectionExtensions { public static IServiceCollection AddBugSnag(this IServiceCollection services, IConfiguration? configuration = null)
We don't need this. See my comment above.
Previously, ddaspit (Damien Daspit) wrote…
Done. |
Previously, ddaspit (Damien Daspit) wrote…
I was thinking about the exceptions we handled that I still wanted to log them, but then I released that they are normally bad user behavior (looking for a file that doesn't exist) rather than code error. Updated. |
Previously, ddaspit (Damien Daspit) wrote…
Done. |
Previously, ddaspit (Damien Daspit) wrote…
Done. |
Previously, ddaspit (Damien Daspit) wrote…
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 16 of 16 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @johnml1135)
Initial Implementation for all controller exceptions.
#485
This change is