Install the NuGet package:
# Using Package Manager
Install-Package Sentry
# Or using .NET Core CLI
dotnet add package Sentry
You should initialize the SDK as early as possible, like in the Main
method in Program.cs
:
SentrySdk.Init(options =>
{
options.Dsn = "YOUR-GLITCHTIP-DSN-HERE";
});
You can verify GlitchTip is capturing unhandled exceptions by raising an exception:
throw new Exception("Hello world!");