Skip to content

isabella232/sentry-dotnet-ef

 
 

Repository files navigation


Entity Framework 6 Integration for Sentry

AppVeyor

Name NuGet
Sentry.EntityFramework NuGet

This is packages extend Sentry's .NET SDK with Entity Framework 6 queries as Breadcrumbs. It also processes DbEntityValidationExceptions to extract the validation errors and add to the Extra field. This increases the debuggability of Entity Framework related errors gratefully.

Example in Sentry

Usage

There are 2 steps to adding Entity Framework 6 support to your project:

  • Call SentryDatabaseLogging.UseBreadcrumbs() to either your application's startup method, or into a static constructor inside your Entity Framework object. Make sure you only call this method once! This will add the interceptor to Entity Framework to log database queries.
  • When setting up your SentryClient, use SentryOptions.AddEntityFramework(). This extension method will register all error processors to extract extra data, such as validation errors, from the exceptions thrown by Entity Framework.

Samples

You may find a usage sample using ASP.NET MVC 5 under /samples/Sentry.Samples.AspNet.Mvc

About

Sentry integration with Entity Framework 6

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 89.0%
  • PowerShell 11.0%