Crash and information reporter for dotnet.
The package that reports request, crashes, exceptions and any other data you want.
Compatible with any service such as email, discord, telegram and etc. All you need to do is implementing report for it.
You can easily config and use it in your ASP.Net projects.
If you like it you can support this project
Incoming requests to your web application. they can be reported with RequestReporters.
Also you can access RequestReporters with ServiceProvider.GetServices<IRequestReporter>()
and report them with ReportRequest method.
Any exception that occurs in request pipeline can be reported with ExceptionReporters.
Pipeline exceptions will be detected even if you use UseExceptionHandler.
For other exceptions that handled by try-catch blocks or non-pipeline exceptions, you can access ExceptionReporter with ServiceProvider.GetServices<IExceptionReporter>()
and report them with ReportException method.
If you want to report any other data or log that is important for you, you can use DataReporter.You can access DataReporter with ServiceProvider.GetServices<IDataReporter>()
and report them with ReportData method.
You can use any service for reporting.
Use this list to check if the service has been implemented.
If the service you want to use has not been implemented, you can implement it with this how-to and let me know to update this list.
Prefix of routes that ReportSharp should report them with RequestReporter and ExceptionReporter.
You can use this feature to customize ReportSharp.
Note: if you have direct access to RequestReporter or ExceptionReporters from ServiceProvider, Requests or exceptions will be reported even if they are not match with watchdog prefix
Dotnet Core 3.1 or later
- Add following lines to
ConfigureServicesmethod inStartupclass:
services.AddReportSharp(options => {
options.ConfigReportSharp(configBuilder =>
configBuilder.SetWatchdogPrefix("/")
// The url prefix that ReportSharp ExceptionReporters and RequestReporter should report them
);
options.AddRequestReporter(() => new TheRequestReporterThatYouWantToUse());
options.AddExceptionReporter(() => new TheExceptionReporterThatYouWantToUse());
options.AddDataReporter(() => new TheDataReporterThatYouWantToUse());
options.AddReporter<Reporter,TheReporterThatYouWantToUse>(() => new TheReporterThatYouWantToUse());
});- Add following lines to
Configuremethod inStartupclass:
app.UseReportSharp(configure => {
configure.UseReportSharpMiddleware<ReportSharpMiddleware>();
});- Add following lines to
servicessection, beforebuilder.Build()line:
services.AddReportSharp(options => {
options.ConfigReportSharp(configBuilder =>
configBuilder.SetWatchdogPrefix("/")
// The url prefix that ReportSharp ExceptionReporters and RequestReporter should report them
);
options.AddRequestReporter(() => new TheRequestReporterThatYouWantToUse());
options.AddExceptionReporter(() => new TheExceptionReporterThatYouWantToUse());
options.AddDataReporter(() => new TheDataReporterThatYouWantToUse());
options.AddReporter<Reporter,TheReporterThatYouWantToUse>(() => new TheReporterThatYouWantToUse());
});- Add following lines to
Configuresection, afterbuilder.Build()line:
app.UseReportSharp(configure => {
configure.UseReportSharpMiddleware<ReportSharpMiddleware>();
});ReportSharp.DatabaseReporter for database.
ReportSharp.DiscordReporter for discord.
ReportSharp.Api implements apis for ReportSharp.DatabaseReporter.
Note: If you have implemented new a reporter, you can let me know with a new issue for this repository.
6.1. If IRequestReporter is implemented in TestReporter, Implement IRequestReporterOptionsBuilder<TestReporter>.
6.2. If IExceptionReporter is implemented in TestReporter, Implement IExceptionReporterOptionsBuilder<TestReporter>.
6.3. If IDataReporter is implemented in TestReporter, Implement IDataReporterOptionsBuilder<TestReporter>.
8.1. If IRequestReporter is implemented in TestReporter, use reportSharpOptionsBuilder.AddRequestReporter(() => new TestReportOptionsBuilder())
8.2. If IExceptionReporter is implemented in TestReporter, use reportSharpOptionsBuilder.AddExceptionReporter(() => new TestReportOptionsBuilder())
8.3. If IDataReporter is implemented in TestReporter, use reportSharpOptionsBuilder.AddDataReporter(() => new TestReportOptionsBuilder())
8.4. If IRequestReporter, IExceptionReporter and IDataReporter is implemented, you can use reportSharpOptionsBuilder.AddReporter<TestReporter, TestReportOptionsBuilder>(() => new TestReportOptionsBuilder).
TJ57yPBVwwK8rjWDxogkGJH1nF3TGPVq98forUSDT TRC200x743379201B80dA1CB680aC08F54b058Ac01346F1forUSDT ERC20