Coder Social home page Coder Social logo

nickcraver / stackexchange.exceptional Goto Github PK

View Code? Open in Web Editor NEW
858.0 50.0 170.0 9.04 MB

Error handler used for the Stack Exchange network

Home Page: https://nickcraver.com/StackExchange.Exceptional/

License: Apache License 2.0

C# 93.45% CSS 1.83% PowerShell 0.33% JavaScript 1.24% Batchfile 0.05% TSQL 0.78% Less 2.31%

stackexchange.exceptional's Introduction

StackExchange.Exceptional

StackExchange.Exceptional is the error handler/logger used internally by Stack Overflow (Stack Exchange) for logging to SQL Server, but many backends (including custom) are supported. It also supports adding custom data to exceptions as they're logged, filtering of what's logged, ignoring errors, and much more. Check out the docs to get started.

Build Status

Documentation

See the docs for how to get configured and logging in just a few minutes.

Package Status

Package NuGet Stable NuGet Pre-release Downloads MyGet
StackExchange.Exceptional StackExchange.Exceptional StackExchange.Exceptional StackExchange.Exceptional StackExchange.Exceptional MyGet
StackExchange.Exceptional.AspNetCore StackExchange.Exceptional.AspNetCore StackExchange.Exceptional.AspNetCore StackExchange.Exceptional.AspNetCore StackExchange.Exceptional.AspNetCore MyGet
StackExchange.Exceptional.MySQL StackExchange.Exceptional.MySQL StackExchange.Exceptional.MySQL StackExchange.Exceptional.MySQL StackExchange.Exceptional.MySQL MyGet
StackExchange.Exceptional.PostgreSql StackExchange.Exceptional.PostgreSql StackExchange.Exceptional.PostgreSql StackExchange.Exceptional.PostgreSql StackExchange.Exceptional.PostgreSql MyGet
StackExchange.Exceptional.MongoDB StackExchange.Exceptional.MongoDB StackExchange.Exceptional.MongoDB StackExchange.Exceptional.MongoDB StackExchange.Exceptional.MongoDB MyGet
StackExchange.Exceptional.Shared StackExchange.Exceptional.Shared StackExchange.Exceptional.Shared StackExchange.Exceptional.Shared StackExchange.Exceptional.Shared MyGet

CI Package feeds (created on every build):

License

Dual-licensed under:

stackexchange.exceptional's People

Contributors

19317362 avatar akoslukacs avatar alexsikilinda avatar ashleyglee avatar davemulford avatar daviddh avatar davidduffett avatar dixon avatar djseng avatar douglas-cleghorn avatar imgbotapp avatar johnboker avatar johnmwright avatar jokecamp avatar jpuck avatar m0sa avatar mandlar avatar mattjeanes avatar mmillican avatar nickcraver avatar paully21 avatar rossipedia avatar seankearney avatar seankilleen avatar sergeymirvoda avatar snoopydo avatar stefankert avatar steve-brown avatar stijnherreman avatar zbecknell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stackexchange.exceptional's Issues

'Error log is in failure mode' due to maxJsonLength

I have an error on the exceptions log screen that says:

Error log is in failure mode, 1 entry queued to log.
Last Logging Exception: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

It seems to be caused by trying to view a logged error. When I click on the most recent error in my log, this exception is thrown:

System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
   at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat)
   at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat)
   at StackExchange.Exceptional.Error.ToDetailedJson() in C:\BuildAgent\work\d20fce4a5bb47bd3\StackExchange.Exceptional\Error.cs:line 500
   at StackExchange.Exceptional.Pages.Master.Execute() in C:\BuildAgent\work\d20fce4a5bb47bd3\StackExchange.Exceptional\Pages\Master.generated.cs:line 0
   at StackExchange.Exceptional.RazorPageBase.TransformText() in C:\BuildAgent\work\d20fce4a5bb47bd3\StackExchange.Exceptional\RazorPage.cs:line 57
   at StackExchange.Exceptional.RazorPageBase.TransformText() in C:\BuildAgent\work\d20fce4a5bb47bd3\StackExchange.Exceptional\RazorPage.cs:line 57
   at StackExchange.Exceptional.RazorPageBase.ProcessRequest() in C:\BuildAgent\work\d20fce4a5bb47bd3\StackExchange.Exceptional\RazorPage.cs:line 70
   at StackExchange.Exceptional.RazorPageBase.System.Web.IHttpHandler.ProcessRequest(HttpContext context) in C:\BuildAgent\work\d20fce4a5bb47bd3\StackExchange.Exceptional\RazorPage.cs:line 68

The log entry in question probably has a large exception message (it contains logged SOAP communication). If you need a DB dump of the entry, I can provide it to you via private communication.

Always "Yay, no errors"

Hi,

i've did the exact same setup as the MVC sample and the errors are not being logged. Currently the project in which i will use your great library is MVC3. It's a large project and i was using ELMAH before.

The action Exceptions is always returning "Yay, no errors." even when i make a 404 and refresh it.

Is there a reason the errors are not logged and how can i test why there is no logging happening.

NOTE: In VS2012 and your MVC4 sample everything works and errors are logged.
Thanks in advanced

Configuration of schema for exception table

The SQLErrorStore assumes that the schema for the exception table is the default schema of the logged in user. I would like to see a configuration item added to the errorsetttings that would allow the configuration of the schema and possibly table name.

Handling expected and bogus errors

We have a number of expected and bogus errors:

  • invalid URLs by Symantec Vulnerability Assessment (recurring)
  • invalid URLs by malware on the client
  • unsupported browsers and clients (we sometimes get HEAD requests with Microsoft Office Excel 2013 as the user agent)

These can usually be identified based on IP address, URL or request headers. I don't want to outright ignore these errors, but it would be useful to set up persistent filters for this, for example in the form of a tab in the log.

Any ideas or suggestions for how this could be implemented? Or should I just give it a go, see what I can come up with and make a PR?

HttpRequestValidationException not logged

ELMAH has the same issue: when .NET 4.0 request validation is enabled, HttpRequestValidationExceptions will not be logged, as in Error constructor you are accessing the following Request collections:

QueryString = new NameValueCollection(request.QueryString);
Form = new NameValueCollection(request.Form);
Cookies = new NameValueCollection(request.Cookies.Count);

Each time these are accessed they are validated by the .NET framework, and if any one of these collections contains the data that caused the HttpRequestValidationException then it will be thrown in the Error constructor, causing the exception not to be logged.

Not pretty but a couple of options:

  • Check to see whether the exception is HttpRequestValidationException and if it is, leave off the QueryString, Form and Cookies from the log; OR
  • try/catch for HttpRequestValidationException around accessing each of these collections, so that you can log the ones that don't fail validation

Allow connection string name in configuration

We use Octopus for deployments which makes it very easy to swap in and out app settings and connection strings for different environments (dev, test, live).

It would be great for StackExchange.Exceptional to accept a connection string name, instead of the full connection string for the SQL ErrorStore.

This way people can keep all of their connection strings up in the connectionStrings element of their configuration.

Making the project truly platform agnostic

This issue is sort of related to #3. In issue #3, I have added the System.Web reference as a framework assembly inside the nuspec metadata so that the requied System.Web reference can be added if it is missing. You proposed a workaround for that by introducing another method.

However, the main problem, IMO, is that StackExchange.Exceptional is tightly coupled with System.Web which shouldn't be if it is intended to be used outside the ASP.NET. If I were to use this package outside the ASP.NET, I would be still getting the System.Web related stuff. Even if they are not being used, the end user would still have access to methods to use which would be error prone IMO.

My proposal is to make the project loosely coupled. This might be achieved by introducing a core project, StackExchange.Exceptional.Core, which would include all the necessary features that would make it run on a console app. Then, another project, StackExchange.Exceptional.Web, which would depend on StackExchange.Exceptional.Core and only introduces the System.Web specifics. This way is the right way to go IMO because this makes the core of the project platform agnostic. So, I would be able to use the core to build another project for other platforms such as ASP.NET Web API which is a platform agnostic framework and doesn't need to have dependency on HttpContext if the project is not hosted on ASP.NET.

Design of Setup method: setting the application name

I'm working on some changes to allow SQLErrorStore to display errors from multiple applications.

One issue I'm running into is that the application name is not available during construction of the ErrorStore. Would it make sense to make applicationName part of the constructor? The only side-effect would be that it breaks backwards compatibility.

Rate-limit emails

The roll-up feature for duplicate exceptions is great in the web UI, but it would be good to have a similar sort of result when sending email notifications of exceptions - it's not nice having your inbox fill up with thousands of emails!

It would be good to rate-limit emails, so that, for example, no more than 1 email is sent every x minutes for each unique exception.

The modules section in web.config is always required

The wiki page https://github.com/NickCraver/StackExchange.Exceptional/wiki/Setup under the section This is all optional, you can setup completely via code as well. Examples suggests that all of the web.config setup can be skipped if you just use the ErrorStore.Setup() method.

I found however that I still need at minimum the

  <system.webServer>
    <modules>
      <add name="ErrorStore" type="StackExchange.Exceptional.ExceptionalModule, StackExchange.Exceptional" />
    </modules>
  </system.webServer>

to catch the exceptions.

Can we somehow make this requirement clearer? It will save a lot of folks a lot of time I think.

Missing tagged versions

The version numbers used on the nuget packages are not tagged in the git repository. This makes it hard to debug my usage of the library and to see whether a fix for an issue has already been added.

So all in all, adding tags when new versions are released would be really nice.

Grouped exceptions should use the latest/most recent date

Correct me if I'm wrong, but it seems that when exceptions are grouped, the date (for ordering the item in the list) is taken from the first occurrence of the grouped exception. This seems odd to me and I find myself getting frustrated when I trigger an exception (manually for example), and find that it's not at the top of the list, but rather a few lines down but now with a (2).

I would have thought that like a grouped email thread, that when a new message (or exception) is added to the thread/group, that then the whole group would then be considered new/recent and move to the top of the list.

Is it by design that the last/most recent item in a group is not the one whose date is used for sorting?

Linkify throws an exception when there's no HttpContext

Linkify throws an exception when there's no HttpContext where it tries to access the SiteUrl for example in a background thread.

System.NullReferenceException: Object reference not set to an instance of an object.
   at StackExchange.Exceptional.Email.ErrorEmail.Linkify(String s) in C:\BuildAgent\work\d20fce4a5bb47bd3\Email\ErrorEmail.cshtml:line 111
   at StackExchange.Exceptional.Email.ErrorEmail.Execute() in C:\BuildAgent\work\d20fce4a5bb47bd3\Email\ErrorEmail.cshtml:line 160
   at StackExchange.Exceptional.RazorPageBase.TransformText() in C:\BuildAgent\work\d20fce4a5bb47bd3\StackExchange.Exceptional\RazorPage.cs:line 57
   at StackExchange.Exceptional.Email.ErrorEmailer.GetErrorHtml(Error error) in C:\BuildAgent\work\d20fce4a5bb47bd3\StackExchange.Exceptional\Email\ErrorEmailer.cs:line 112
   at StackExchange.Exceptional.Email.ErrorEmailer.SendMail(Error error) in C:\BuildAgent\work\d20fce4a5bb47bd3\StackExchange.Exceptional\Email\ErrorEmailer.cs:line 74

Documentation Please

The documentation for this project is abysmally sparse: 2 wiki pages that only show the simplest of setups. Google searches yielded nothing other than the following categories:

  • this site,
  • the Nuget page,
  • Nick's one and only blog post from 2 years ago talking about releasing this (which promised more details to come but never delivered apparently),
  • pages that just wrap one of the previous 3 and add no real content (ie: nugetmusthaves), and
  • completely unrelated stuff (misses).

Searches on SO and SE were no better. Looking in the code doesn't help much either since it isn't even well documented.

Documentation for emailing errors is especially absent. For example, "How do I prevent it from sending an email for each and every exception?" "How do I customize the format of the email?" "How do I filter out certain exceptions from being emailed, but still have them logged to the database?" These are just a few of the questions that need to be addressed with some documentation.

Thanks in advance! :)

Configuration via code

When calling ErrorStore.Setup() with any type of store from Application_Start in MVC3, I get the error in my action to view exceptions (and exceptions fail to log to the store):

ErrorStore 'type' must be specified

on the following line of code:

page.ProcessRequest(context);

If I call ErrorStore.Setup() before the handler is called, it works fine.

ErrorStore.Setup("Example App", new SQLErrorStore("validConnectionString"));
var context = System.Web.HttpContext.Current;
...
page.ProcessRequest(context);

Is it incorrect to call the setup method from Application_Start? Your example seems to indicate that's the correct place, but it seems that configuration is missing at the controller action level.

Thanks for the great release!

JSON store path configuration problem

I decided to go with JSON Error store. Configuration via web.config. Exceptional kept translating path="/Errors" as being relative not to application but relative to web server. I am using IIS Express 8.5 on my project.
I solved this by switching to code-based configuration. Same path "
/Errors" was correctly mapped this time.

Add return value to static void LogException

Currently LogException does not return any value, but I think it would be useful if it would return Error instance.
Consider following scenario - I wish to include error hash in error page, in case client would contact our support, he could provide that hash and we could use it to find concrete error.
I could make workaround and add to custom data own calculated hash when calling LogException, but that would be calculating hash twice, as long as it would cost practically nothing to return error as a result, I would prefer this way :)

Add netstandard & ASP.NET Core support

V2 needs ASP.NET Core and netstandard support included. This will follow the library split patterns of MiniProfiler, but there's a blocker in play. A critical component of Exceptional is AppDomain.UnhandledException, but unfortunately this isn't coming back until netstandard2.0.

That issue is resolved here: https://github.com/dotnet/corefx/issues/6398, just waiting for that release to get going. Now that I've figured out patterns and beat the crap out of the build system with MiniProfiler, actually porting StackExchange.Exceptional won't be a huge task.

Custom data section displays links as encoded html

I'm adding custom data like
data.Add("Url referrer", context.Request.UrlReferrer != null ? context.Request.UrlReferrer.OriginalString : "");

and it outputs it as

Url referrer    <a href="http://localhost:9090/">http://localhost:9090/</a>

it think it should display link as in server variables section.

SSMS 'Copy Database' fails (error about ANSI_PADDING)

I'm not able to use 'Copy Database' on databases that have the Exceptions table created by SQLExceptionTable.sql

CREATE NONCLUSTERED INDEX [IX_Exceptions_Applica..." failed with the following error: "CREATE INDEX failed because the following SET options have incorrect settings: 'ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Is this something that can be resolved by the creation script? Or could this be caused by server configuration? (I'm not the DBA here, just a developer)
The db runs on an SQL Server 2008 R2 instance.

Separate content from presentation

It's kind of offtopic, so feel free to close :)
What I really like about Exceptional is clean UI. If it would be possible to separate UI from content, it would be possible to have whole family "ional". For example to use same UI for logging SQL queries - miniprofiler does a great job, but it does not collect statistics what parts of the site are used most and needs most tunning, using UI from Exceptional and sql logging code from miniprofiler would be possible to have sql query wall. It would kind of replicate sql profiler, but in other hand Exceptional kind of replicates event viewer :)

The NuGet package seems only to contain a .NET 4.5 build which won't work on servers that don't have 4.5 installed

While trying to deploy StackExchange.Exceptional to our test environment we discovered that the package seemingly was compiled against 4.5, and that it didn't have 2.0 or 4.0 builds included. I would like test

We fixed this problem by upgrading our server to 4.5, but there are probably a whole lot of people who don't have the luxury of upgrading their servers whenever they feel like it. I suggest you include builds for various versions of the framework (2.0, 4.0 & 4.5) in your package if possible. :)

StackExchange.Exceptional does not implement IHttpHandlerFactory or IHttpHandler

I was trying the sample MVC app and the Exceptions.axd handler is not working:

Server Error in '/' Application.

StackExchange.Exceptional.ExceptionalModule, StackExchange.Exceptional does not implement IHttpHandlerFactory or IHttpHandler.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Configuration.ConfigurationErrorsException: StackExchange.Exceptional.ExceptionalModule, StackExchange.Exceptional does not implement IHttpHandlerFactory or IHttpHandler.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ConfigurationErrorsException: StackExchange.Exceptional.ExceptionalModule, StackExchange.Exceptional does not implement IHttpHandlerFactory or IHttpHandler.]
System.Web.Configuration.HandlerFactoryCache.GetHandlerType(String type) +9657807
System.Web.Configuration.HandlerFactoryCache..ctor(String type) +19
System.Web.HttpApplication.GetFactory(String type) +86
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +262
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18045

top-bg.png is 404ing

Does this happen for anyone else? It's not a big deal but it does mean you can't see the page header. And no one likes 404s in the console if it can be avoided right?

Update Nuget package!

Hi,
Very thanks for StackExchange.Exceptional!

Why nuget package isn't update from 'December 06 2013' ?

Going back shows old list

If I'm deleting some error from list and press go back, it it still there, could we force anyhow to refresh list on going back?

Add ability to delete all errors from single ip

We're logging all errors, even 404's and etc., so when a script kiddie throws at us his collection of probing requests, that generates loads of errors in log, that have different message text, so we have to pick them manually one by one and delete. It would be great, if we could delete all error messages by ip with a single click.

No CSS on details page

I've been helping out on an MVC project for a couple days (I don't know the ins and outs of the project) and it was missing error logging, so I added this one.

It works fine, except for one small issue. CSS isn't being loaded on the details page.

On http://localhost/MyProject/Home/Exceptions/ the CSS is loaded from href="/MyProject/Home/Exceptions/css" but on http://localhost/MyProject/Home/Exceptions/info?guid=... the CSS is loaded from href="/MyProject/Home/Exceptions/info/css"

Server is IIS 7.5, project is MVC 4, library is 1.0.0.86 from NuGet.

I've followed the wiki for setup configuration. I'm rather dumbfounded by this, I'm using Exceptional on another project without any trouble, so it almost has to be a project configuration issue.

Any clue what's causing this?

Not attaching StackExchange.Exceptional to TransactionScope

I've got this scenario (using v.1.0.52 from nuget)

using (TransactionScope t = new TransactionScope(TransactionScopeOption.Required, tOptions))
{
  try
  {
    // do some stuff that throws an exception
    t.Complete();
  }
  catch (Exception e)
  {
    ErrorStore.LogException(e, HttpContext.Current);
  }
}

Since my code throws an exception before signalling done to the transactionscope everything done inside the transactionscope will be rolled back, including my logged exception that has been pushed to my sql store.

An option to let the errorstore write not to attach itself to the transactionscope would be nice :-)

Logging InnerException?

Hi!

The InnerException is not logged, so information there is lost. Is this a design choice, or you just didn't had to look at InnerExceptions, and didn't implement this?

Extend Database Specific Error Store

Problem when add ability to extend the database specific error store apart from stock Sql Server Error Store SQLErrorStore, because its database specific and would require to add reference library to implement it will add unnecessary requirement for StackExchange.Exceptional.

Therefore it only extend SQLErrorStore as most of the process and query can be reused and only need few method to be override. but in order to enable this extension outsite the project, its require to change the access level of class ex: Dapper, Extension, SqlServer (also modified to support override and reuse connection). Do you have in mind to let this extension possible (i did this also for StackExchange.Profiler aka MiniProfiler) as its introduce flexibility add nuget package for specific database

My implementation sample is MySqlErrorStore which also i put sample in Sample.MVC4
if you considered this and welcome a pull request.. i will ask pull request for it

Thanks

Error not found

Using the following configuration (same as other apps), Opserver is saying "Error not found" when you hover over it or click on it.
2016-04-ct54z

<system.webServer>
....
    <modules runAllManagedModulesForAllRequests="true">
        <add name="ErrorLog" type="StackExchange.Exceptional.ExceptionalModule,               StackExchange.Exceptional" />
 </modules>
....
</system.webServer>

<Exceptional applicationName="Sales Portal">
    <LogFilters>
        <Form>
            <add name="password" replaceWith="******" />
            <add name="__RequestVerificationToken" replaceWith="******" />
        </Form>
        <Cookies>
            <add name="Marcus" replaceWith="******" />
        </Cookies>
    </LogFilters>
    <ErrorStore type="SQL" connectionStringName="LoggingDb" />
</Exceptional>

I've had this issue with one other app, but the issue seems to have resolved itself. Any ideas?

Inaccurate date sort

Currently, the tableSorter parser for the errorDate column doesn't subtract the month parameter by one, to account for the fact that months in JavaScript DateTime are 0-indexed.

This results in the following issue: March 31st and April 1st are parsed as new Date(2014, 3, 31, ...) and new Date(2014, 4, 1), respectively, which are both interpreted as May 1st, as April (month 3 in JavaScript) has only 30 days, and thus rolls over to May.

The date parser needs an additional -1 in the month parameter, else March 31st and April 1st, and other dates like them, cannot be internally sorted.

https://github.com/NickCraver/StackExchange.Exceptional/blob/master/StackExchange.Exceptional/Resources/Scripts.js#L55

Make jQuery URL configurable

Could you please make the jQuery URL that is used in all pages configurable? Currently it's always loaded from the Google CDN, which isn't very good if you want to use StackExchange.Exceptional in an environment without internet access (e.g. internal web applications).

I know that there is already the possibility to include custom JavaScript files, but this doesn't work since they are included after the page tries to execute the script that is shipped with StackExchange.Exceptional, and that script already requires jQuery.

V2 Planning - Ideas and Feedback Needed!

This is a planning post for V2, which I've already started into in the v2 branch (needs VS 2017 15.3 Preview to work with). I've made pretty sweeping changes to settings locations to centralize them on the code side (old web.config sections still work!), and will continue to do so as I find a good solution for ASP.NET and ASP.NET Core both. I've also been working on the UI, code sharing etc. Let's break it down.

Here's a list of what I'm planning for V2:

  • netstandard2.0 build
    • StackExchange.Exceptional.Shared
    • StackExchange.Exceptional.AspNetCore
  • ASP.NET Core support (it'll be middleware, via a .UseExceptional() setup call)
  • Move shared code to .Shared library that StackExchange.Exceptional and StackExchange.Exceptional.AspNetCore depend on
  • Move logging methods from static to extension (this approach works in ASP.NET and Core, since they have different primitives)
  • Consolidate settings
    • Move all shared settings to StackExchange.Exceptional.Shared
    • Figure out GetCustomData and where it lives
    • Move IP parsing to IPNet (a utility class I created for Opserver)
      • Support IPv6 parsing/logging
  • All pages
    • Remove all images (replace with SVGs and CSS3)
    • Simplify pathing for module relative renders
    • Add SRI to CSS & JS includes
    • Embed jQuery (remove Google CDN dependency)
    • Styling overhaul (.less files with simpler, more consistent, and purpose-based styles)
    • Combine .js (via Web Essentials) to Bundle.js
    • Move all embedded resources to .Shared for consistency and DRY between libs
  • Error detail page (meta item for below)
    • More readable stack traces
      • Colorization of stack traces
      • Make generic arguments more readable (e.g. <T1,T2> instead of `2
      • Collapse async stack traces
      • Make this reusable (Utils.StackTrace.PrettyHtml(string stackTrace) method)
      • Linkify SourceLink source (configurable!) with GitHub links supported in the default options (e.g. click to go to source for the exact commit)
    • Add Google's Prettify for code blocks
    • Remove RazorGenerator dependency (uglier, but far simpler)
    • Remove System.Web dependency
  • Async all the things (since most stores of any cost will consume I/O)
    • Operational methods: Delete, Protect, etc.
    • Get/GetAll
    • Entire IHttpModule
    • Rendering pipeline for pages
    • Log()/LogAsync() equivalents
  • Add a .AddLogData() extension for easily adding custom data
  • Remove *List suffixes from Delete/Protect methods. Just make them overloads that take IEnumerable<Guid>
  • Remove "SQL" logging, and replace it with configurable many "Commands" logging (.Data["SQL"] will be recognized by default) - for example Redis commands, Elastic queries and responses, etc.
    • Make sure SQL still acts as a deserializer set for viewing old exceptions
    • Remove SQL column for SQL store scripts
    • Provide upgrade script instructions in an upgrade notes section
  • Add a LastLoggedDate column/property to fix rollup issues, e.g. roll up every 10 minutes (as before) but show the actual last date it occured in the UI, rather than the start of the rollup
  • Add a Category (string) field to the exception for a variety of use cases (categorization, severity, etc.)
  • Create /docs (GitHub pages, like miniprofiler.com/dotnet (source)
    • Add .NET section (e.g. console app)
    • Add .NET Core section
    • Add ASP.NET section
    • Add ASP.NET Core section
  • Providers
    • In-Memory
    • JSON
    • SQL Server
    • MySQL
    • Postgres
    • MongoDB
    • Redis
    • Elastic

That's just an overview of the stuff I already have in queue, for example here are what the new stack traces look like to a user (you can confiure it to looke like C#, VB, or F# syntax):
screen shot 2017-07-16 at 19 24 12
...and here's what the list page currently looks like:
screen shot 2017-07-16 at 21 26 15

...so that's what I've been working on. Now...

What functionality would you like to see in V2 for exceptional?

I'm not promising to implement all ideas, but I want to at least (hopefully) make all breaking changes necessary in a major release where they belong. I'm sure there are a lot of other great ideas (I know some co-workers have some that I'm forgetting right now) and I wanted to collect them all here so that none are forgotten. Please, share your ideas!

Also, as always, feedback on any of the above is welcome. I'm just trying to get a release out as personal time allows!

Not catching Soap/WebAPI exceptions

It seems that Exceptional is not catching the exceptions thrown by WebAPI-controllers or Soap Webservices.

Callstack for WebAPI-exception is like this:

at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary'2 arguments, CancellationToken cancellationToken)
I have no current example of soap-webservice (but they aren't that important any longer)

Prevent Certain Form Elements From Being Logged

I know it is possible to ignore exceptions by regex or by system type, however, I am wondering if it's possible to ignore certain form data (eg, passwords) from being logged with an exception. I would like to be able to log possible exceptions from items that deal with sensitive data, but obviously don't want that stored in plain text.

Email option

I would love to have the option to have each error emailed to an email address via a web.config settting:

I recognize that this isn't a viable option for high traffic sites like SO but it is great for smaller sites. Currently when I develop small internal web apps I set up a custom error to get the exception details and some custom user info and send that off as an email so I know something went wrong. With 50 small apps there is no way I am going to remember to check their error store on a regular enough basis.

I am working on adding this into the errorstore LogError method in my local project to suit my needs but having this as part of the package would be awesome.

Update Nuget package

Any chance you could update the Nuget package to include the latest changes, specifically #17?

Thanks

MySQLErrorStore in Nuget

I could not find the MySQLErrorStore in the Nuget package StackExchange.Exceptional version 1.0.0.111 (containing StackExchange.Exceptional.dll).

When building the source code my self the MySQLErrorStore seems to be working fine (using StackExchange.Exceptional.dll and StackExchange.Exceptional.MySQL.dll).

Any plans on creating a new Nuget package for MySQLErrorStore (StackExchange.Exceptional.MySQL.dll)? Or include it in the StackExchange.Exceptional package?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.