Created
October 18, 2021 14:14
-
-
Save niemyjski/5e718e7826ef40007d110fdc92921e7c to your computer and use it in GitHub Desktop.
Exceptionless Ignore 404 from non users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ExceptionlessClient.Default.Configuration.AddPlugin<Ignore404sFromNonUsers>(); | |
[Priority(100)] | |
public class Ignore404sFromNonUsers : IEventPlugin { | |
public void Run(EventPluginContext ctx) { | |
if (!String.Equals(ctx.Event.Type, Event.KnownTypes.NotFound)) | |
return; | |
// Ignore any 404 that doesn't have user info. | |
ctx.Cancel = !ctx.Event.Data.ContainsKey(Event.KnownDataKeys.UserInfo); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment