PricingBlogDocumentationDocsRegister

Connect your C# project to GlitchTip

Installation

Install the NuGet package:

# Using Package Manager
Install-Package Sentry

# Or using .NET Core CLI
dotnet add package Sentry

Configuration

You should initialize the SDK as early as possible, like in the Main method in Program.cs:

using (SentrySdk.Init("your DSN here"))
{
    // App code
}

You can verify GlitchTip is capturing unhandled exceptions by raising an exception. For example, you can use the following snippet to raise a DivideByZeroException:

using (SentrySdk.Init("your DSN here"))
{
    Console.WriteLine(1 / 0);
}