BlendInteractive.Sentry 1.0.4

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package BlendInteractive.Sentry --version 1.0.4
NuGet\Install-Package BlendInteractive.Sentry -Version 1.0.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlendInteractive.Sentry" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlendInteractive.Sentry --version 1.0.4
#r "nuget: BlendInteractive.Sentry, 1.0.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BlendInteractive.Sentry as a Cake Addin
#addin nuget:?package=BlendInteractive.Sentry&version=1.0.4

// Install BlendInteractive.Sentry as a Cake Tool
#tool nuget:?package=BlendInteractive.Sentry&version=1.0.4

BlendInteractive.Sentry

Blend's default Sentry configuration. This repo / nuget package is a simple way to ensure all Blend-related Sentry installations are consistent and have a default minimum exception filtering applied.

Installation

For .NET 4.8:

  1. Install the BlendInteractive.Sentry package.
  2. In your global.asax.cs file, in the Application_Start method, call ApplicationStartupExtensions.InitializeSentry, optionally passing in a Func<Exception?, bool> method to add further filtering. Keep the returned IDisposable value in a member.
  3. In the Application_Error method, get the last server error and pass it to ApplicationStartupExtensions.LogException.
  4. In the Application_End method, dispose of the IDisposable instance returned by ApplicationStartupExtensions.InitializeSentry.
    private static IDisposable? _sentry = null;

    protected void Application_Start()
    {
        _sentry = ApplicationStartupExtensions.InitializeSentry();
    }

    protected void Application_Error()
    {
        var exception = Server.GetLastError();
        ApplicationStartupExtensions.LogException(exception);
    }

    protected void Application_End()
    {
        _sentry?.Dispose();
    }

For .NET 5:

  1. Install the BlendInteractive.Sentry package.
  2. In the Program.cs file, in the CreateHostBuilder method, call the the UseBlendSentry extension method from your IWebHostBuilder builder, optionally passing in a Func<Exception?, bool> method to add further filtering.
    return Host.CreateDefaultBuilder(args)
        .ConfigureCmsDefaults()
        .ConfigureAppConfiguration((ctx, builder) => {
            builder.AddConfiguration(_configuration);
        })
        .ConfigureWebHostDefaults(webBuilder =>
        {
            webBuilder
                // return true if the message should be filtered and removed. 
                .UseBlendSentry(ex => ex!.Message.Contains("this is the text in the exception message to filter", StringComparison.InvariantCultureIgnoreCase)) 
                .UseStartup<Startup>();
        });
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4 479 4/13/2023
1.0.3 783 8/19/2022