Skip to content

Instantly share code, notes, and snippets.

@niemyjski
Created October 18, 2021 14:14
Show Gist options
  • Save niemyjski/5e718e7826ef40007d110fdc92921e7c to your computer and use it in GitHub Desktop.
Save niemyjski/5e718e7826ef40007d110fdc92921e7c to your computer and use it in GitHub Desktop.
Exceptionless Ignore 404 from non users
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