This project is read-only.

Error reporting API for modules

Topics: Core, General, Writing modules
Nov 23, 2013 at 12:45 PM
The proposal is about having a standard API that can be used to report errors in modules to their authors. This would make the discovery of errors more direct than bug reports (and in a big part of the cases, automated), helping to enhance the quality of modules.
  • Let Orchard automatically gather exceptions and build errors for modules if possible. Unhandled exceptions from controllers (through the existing UnhandledExceptionFilter), background tasks (BackgroundService), scheduled tasks (ScheduledTaskExecutor) migrations and other tasks executed through ProcessingEngine (DefaultProcessingEngine), build errors (DefaultBuildManager), parse errors and unhandled exceptions from views (somehow) could be not only logged as it is currently but also fed to the error reporting API.
  • Errors are paired to modules (using e.g. file paths and/or namespaces) so we get a list of errors per modules.
  • The gathered errors are periodically (e.g. once a day) sent to the module authors if the admin allows it.
  • The admin can cofigure what data is sent in the error reports (e.g. how detailed the errors should be, whether to include a contact e-mail where the author can ask for some details).
  • The target or error reports for a module is optionally specified in the Module.txt. This could be an e-mail in the simple case (what is problematic as not all sites are able to send e-mails) or an API endpoint. This endpoint could be hosted by the module author or maybe even be part of the new Gallery. It would accept the error reports and also have some reporting for the author.
Such errors may not be accurate in all cases of course, e.g. an exception originating from my module may be by design and it's the fault of the external code using it that it is raised. This kind of noise can be filtered out when reporting

What do you think?
Nov 23, 2013 at 3:00 PM
Zoltan, Are you proposing to rebuild windows inside Orchard :) ?
Help Improve Orchard Yes/No ?
Idea basically seems interesting but I am not sure that all the authors, if they have provided some way to contact them, will look at this.... what ? email, big-data bug database in Cloud ?
Nov 23, 2013 at 3:25 PM
Yes, also the concept includes redesigning the YSOD to be blue!

No surprise that Windows has this: as a website owner your also gather information about your site's performance and possible issues, at least by reading the error logs too, to improve it. As a module author however you have absolutely no insight into the issues of your own module's instances running everywhere unless others file bug reports (that nobody likes to do, are mostly inaccurate or lack information).

The concept I outlined (not necessarily with these particular implementation details) aims to improve the quality of 3rd party modules (but a more complex similar system could be employed to do the same with the Orchard framework itself and with the built in or core modules) by letting authors know about certain issues that users don't report (because they don't like to open bug reports, just don't care or don't even know about every error).

As mentioned this would contain some noise and would still lack reports about some surfaced errors (like client-side errors, performance issues or simply flaws in the logic) but still be better than the complete lack of information now.

Authors could optionally allow error reporting for their modules as I mentioned in the last point. E-mail could be a simple way to share such reports but ideally it would be handled by a database that's communicated with through an API.
Nov 23, 2013 at 4:17 PM
I know a product that could do part of the job.
Nov 23, 2013 at 4:36 PM
Care to tell? :-)