Sentry 0.0.1-preview2

Prefix Reserved
This is a prerelease version of Sentry.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Sentry --version 0.0.1-preview2
                    
NuGet\Install-Package Sentry -Version 0.0.1-preview2
                    
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="Sentry" Version="0.0.1-preview2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sentry" Version="0.0.1-preview2" />
                    
Directory.Packages.props
<PackageReference Include="Sentry" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Sentry --version 0.0.1-preview2
                    
#r "nuget: Sentry, 0.0.1-preview2"
                    
#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.
#:package Sentry@0.0.1-preview2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Sentry&version=0.0.1-preview2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Sentry&version=0.0.1-preview2&prerelease
                    
Install as a Cake Tool

Initialize the SDK:

void Main() 
{
    using (SentrySdk.Init("dsn"))
    {
        // App code
    }
}

The SDK by default will watch for unhandled exceptions in your app. If the DSN is not explicitly passed by parameter to Init, the SDK will try to locate it via environment variable SENTRY_DSN.

To configure advanced settings, for example a proxy server:

void Main() 
{
    using (SentrySdk.Init(o =>
    {
        o.Dsn = new Dsn("dsn");
        o.Http(h =>
        {
            h.Proxy = new WebProxy("https://localhost:3128");
        });
    }))
    {
        // App code
    }
}

Capture an exception:

try
{
    throw null;
}
catch (Exception e)
{
    SentrySdk.CaptureException(e);
}

Capture a message: ```csharp` SentrySdk.CaptureMessage("this just happened"); ``

Internals/Testability

It's often the case we don't want to couple our code with static class like SentrySdk, especially to allow our code to be testable. If that's your case, you can use 2 abstractions:

  • ISentryClient
  • IHub

The ISentryClient is responsible to queueing the event to be sent to Sentry and abstracting away the internal transport. The IHub on the other hand, holds a client and the current scope. It in fact also implements ISentryClient and is able to dispatch calls to the right client depending on the current scope.

In order to allow different events hold different contextual data, you need to know in which scope you are in. That's the job of the Hub. It holds the scope management as well as a client.

If all you are doing is sending events, without modification/access to the current scope, then you depend on ISentryClient. If on the other hand you would like to have access to the current scope by configuring it or binding a different client to it, etc. You'd depend on IHub.

An example using IHub for testability is SentryLogger and its unit tests SentryLoggerTests.
SentryLogger depends on IHub because it does modify the scope (through AddBreadcrumb). In case it only sent events, it should instead depend on ISentryClient

Compatibility

The packages target .NET Standard 2.0. That means it is compatible with the following versions or newer:

  • .NET Framework 4.6.1
  • .NET Core 2.0
  • Mono 5.4
  • Xamarin.Android 8.0
  • Xamarin.Mac 3.8
  • Xamarin.iOS 10.14
  • Universal Windows Platform 10.0.16299

Of those, we've tested (we run our unit/integration tests) against:

  • .NET Framework 4.6.2 on Windows (AppVeyor)
  • Mono 5.12 macOS and Linux (Travis-CI)
  • .NET Core 2.0 Windows (AppVeyor), macOS and Linux (Travis-CI)
  • .NET Core 2.1 Windows (AppVeyor), macOS and Linux (Travis-CI)
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (88)

Showing the top 5 NuGet packages that depend on Sentry:

Package Downloads
Sentry.Extensions.Logging

Official Microsoft.Extensions.Logging integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.

Sentry.Serilog

Official Serilog integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.

Sentry.NLog

Official NLog integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.

Sentry.DiagnosticSource

Official Diagnostic.Listener integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. Note: This package is not needed when using Sentry with .NET Core 3 or higher.

Sentry.EntityFramework

Official Entity Framework 6 integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.

GitHub repositories (69)

Showing the top 20 popular GitHub repositories that depend on Sentry:

Repository Stars
files-community/Files
A modern file manager that helps users organize their files and folders.
ppy/osu
rhythm is just a *click* away!
Sonarr/Sonarr
Smart PVR for newsgroup and bittorrent users.
Radarr/Radarr
Movie organizer/manager for usenet and torrent users.
LykosAI/StabilityMatrix
Multi-Platform Package Manager for Stable Diffusion
Prowlarr/Prowlarr
Prowlarr is an indexer manager/proxy built on the popular *arr .net/reactjs base stack to integrate with your various PVR apps, supporting management of both Torrent Trackers and Usenet Indexers.
1Remote/1Remote
One Remote Access Manager to Rule Them All
Lidarr/Lidarr
Looks and smells like Sonarr but made for music.
DearVa/Everywhere
A context-aware AI assistant for your desktop. Ready to respond intelligently, seamlessly integrating multiple LLMs and MCP tools.
timschneeb/GalaxyBudsClient
Unofficial Galaxy Buds Manager for Windows, macOS, Linux, and Android
tixl3d/tixl
TiXL is an open source software to create realtime motion graphics.
BililiveRecorder/BililiveRecorder
录播姬 | mikufans 生放送录制
Facepunch/sbox-public
s&box is a modern game engine, built on Valve's Source 2 and the latest .NET technology, it provides a modern intuitive editor for creating games
Readarr/Readarr
Book Manager and Automation (Sonarr for Ebooks)
bombomby/optick
C++ Profiler For Games
huynhsontung/Screenbox
LibVLC-based media player for the Universal Windows Platform
ClassIsland/ClassIsland
一款功能强、可定制、跨平台,适用于班级多媒体屏幕的课表信息显示工具,可以一目了然地显示各种信息。
ProtonVPN/win-app
Official ProtonVPN Windows app
MCCTeam/Minecraft-Console-Client
Lightweight console for Minecraft chat and automated scripts
CollapseLauncher/Collapse
An Advanced Launcher for miHoYo/HoYoverse Games
Version Downloads Last Updated
6.0.0 97,514 12/11/2025
6.0.0-rc.2-prerelease 8,596 11/25/2025
6.0.0-rc.1-prerelease 6,870 11/17/2025
6.0.0-preview.2-prerelease 3,161 10/30/2025
6.0.0-preview.1-prerelease 4,702 10/6/2025
5.16.2 576,806 10/31/2025
5.16.1 301,362 10/14/2025
5.16.0 246,088 10/1/2025
5.15.1 276,940 9/20/2025
5.15.1-maxpath.1 4,337 9/18/2025
5.15.0 189,284 9/11/2025
5.14.1 669,746 8/14/2025
5.14.0 107,115 8/8/2025
5.14.0-alpha.1 390 8/6/2025
5.14.0-alpha.0 391 8/5/2025
5.13.0 273,155 7/28/2025
5.12.0 273,428 7/15/2025
5.12.0-alpha.0 2,156 7/11/2025
5.11.2 663,434 6/25/2025
5.11.1 73,275 6/21/2025
5.11.0 38,843 6/19/2025
5.11.0-alpha.3 1,033 6/13/2025
5.11.0-alpha.1 1,728 6/7/2025
5.10.0 409,449 6/6/2025
5.9.0 123,313 5/30/2025
5.8.2-beta.1 196 5/29/2025
5.8.1 74,817 5/27/2025
5.8.0 226,340 5/21/2025
5.8.0-alpha.0 207 5/22/2025
5.7.0 215,682 5/13/2025
5.7.0-beta.0 2,332 5/2/2025
5.6.0 489,987 4/24/2025
5.5.1 645,315 4/8/2025
5.5.0 166,465 4/2/2025
5.4.0 608,653 3/15/2025
5.3.0 350,462 3/7/2025
5.2.0 376,083 2/26/2025
5.1.1 596,290 2/13/2025
5.1.0 777,734 2/3/2025
5.0.1 3,489,724 1/8/2025
5.0.0 1,272,763 12/19/2024
5.0.0-alpha.1 26,997 11/25/2024
5.0.0-alpha.0 276 11/24/2024
4.13.0 2,955,455 11/5/2024
4.12.2 136,980 11/2/2024
4.12.1 1,252,850 10/10/2024
4.12.1-segv1 1,189 11/1/2024
4.12.0 444,190 10/2/2024
4.11.0 971,184 9/22/2024
4.10.2 2,003,451 8/21/2024
4.10.1 312,151 8/16/2024
4.10.0 85,318 8/14/2024
4.9.0 1,723,544 7/11/2024
4.9.0-sync.collection.2 424 7/30/2024
4.9.0-sync.collection.1 228 7/30/2024
4.8.1 523,577 7/2/2024
4.8.0 374,250 6/26/2024
4.7.0 1,530,357 5/27/2024 4.7.0 is deprecated.
4.6.2 574,711 5/14/2024 4.6.2 is deprecated.
4.6.0 135,165 5/9/2024 4.6.0 is deprecated.
4.5.0 460,451 4/30/2024 4.5.0 is deprecated.
4.4.0 815,591 4/12/2024 4.4.0 is deprecated.
4.3.0 240,090 4/10/2024 4.3.0 is deprecated.
4.2.1 1,163,956 3/12/2024 4.2.1 is deprecated.
4.2.0 52,698 3/11/2024 4.2.0 is deprecated.
4.1.2 1,522,047 2/20/2024 4.1.2 is deprecated.
4.1.1 258,818 2/14/2024 4.1.1 is deprecated.
4.1.0 219,361 2/9/2024 4.1.0 is deprecated.
4.0.3 102,995 2/7/2024 4.0.3 is deprecated.
4.0.2 165,604 2/6/2024 4.0.2 is deprecated.
4.0.1 49,294 2/5/2024 4.0.1 is deprecated.
4.0.0 158,156 2/1/2024 4.0.0 is deprecated.
4.0.0-beta.9 1,253 1/30/2024
4.0.0-beta.8 18,574 1/11/2024
4.0.0-beta.7 8,066 1/5/2024
4.0.0-beta.6 26,165 12/13/2023
4.0.0-beta.5 2,631 12/12/2023
4.0.0-beta.4 26,228 12/5/2023
4.0.0-beta.3 708 12/2/2023
4.0.0-beta.2 5,091 11/23/2023
4.0.0-beta.1 1,157 11/19/2023
4.0.0-beta.0 703 11/17/2023
4.0.0-alpha.0 10,585 11/9/2023
3.41.4 1,812,535 1/23/2024
3.41.3 2,093,701 11/29/2023
3.41.2 402,941 11/23/2023
3.41.1 108,599 11/22/2023
3.41.0 1,031,123 11/8/2023
3.40.1 947,727 10/12/2023
3.40.0 151,981 10/10/2023
3.40.0-beta.0 17,468 9/21/2023
3.39.1 2,798,542 9/12/2023
3.39.0 267,528 9/7/2023
3.36.0 744,716 8/22/2023
3.35.1 272,818 8/16/2023
3.35.0 189,272 8/8/2023 3.35.0 is deprecated.
3.34.0 1,481,109 7/13/2023
3.33.1 1,501,501 6/13/2023
3.33.0 1,359,421 5/22/2023
3.32.0 30,073 5/22/2023
3.31.0 916,334 5/2/2023
3.30.0 1,283,162 4/11/2023
3.29.1 1,949,793 3/11/2023
3.29.0 298,755 3/6/2023
3.28.1 1,499,756 2/10/2023
3.28.0 95,100 2/8/2023
3.27.1 380,653 2/3/2023
3.27.0 157,732 2/1/2023
3.26.2 933,506 1/24/2023
3.26.1 330,891 1/17/2023
3.26.0 405,607 1/13/2023
3.25.0 1,417,033 12/23/2022
3.24.1 432,938 12/16/2022
3.24.0 2,175,089 11/18/2022
3.23.1 976,867 10/31/2022
3.23.0 104,621 10/27/2022
3.22.0 1,714,658 10/7/2022
3.21.0 1,965,976 9/2/2022
3.20.1 1,915,458 7/26/2022
3.19.0 1,030,969 6/28/2022
3.18.0 663,255 6/15/2022
3.17.1 1,614,383 5/8/2022
3.17.0 153,187 5/3/2022
3.16.0 1,026,595 4/7/2022
3.15.0 1,075,939 3/15/2022
3.14.1 960,151 2/18/2022
3.14.0 223,610 2/14/2022
3.13.0 1,580,374 1/11/2022
3.12.3 1,184,571 12/19/2021
3.12.2 99,208 12/15/2021
3.12.1 408,657 12/6/2021
3.12.0 316,201 11/23/2021
3.12.0-alpha.1 6,383 11/7/2021
3.11.1 761,143 11/5/2021
3.11.0 194,083 11/2/2021
3.10.0 732,864 10/15/2021
3.9.4 1,213,017 9/29/2021
3.9.3 181,116 9/21/2021
3.9.2 262,224 9/10/2021
3.9.1 16,338 9/9/2021
3.9.0 331,637 8/27/2021
3.8.3 948,891 7/25/2021
3.8.2 144,213 7/17/2021
3.8.1 28,273 7/15/2021
3.8.0 134,004 7/14/2021
3.7.0 151,958 7/10/2021
3.6.1 196,002 7/2/2021
3.6.0 258,489 6/23/2021
3.6.0-alpha.2 846 6/18/2021
3.6.0-alpha.1 1,467 6/11/2021
3.5.0 501,630 6/7/2021 3.5.0 is deprecated because it has critical bugs.
3.4.0 159,700 5/31/2021 3.4.0 is deprecated because it has critical bugs.
3.4.0-beta.0 629 5/27/2021 3.4.0-beta.0 is deprecated because it has critical bugs.
3.3.5-beta.0 2,774 5/13/2021
3.3.4 819,371 4/26/2021
3.3.3 9,600 4/23/2021
3.3.2 25,141 4/23/2021
3.3.1 590,500 4/5/2021
3.3.0 35,537 4/3/2021
3.2.0 140,405 3/26/2021
3.1.0 402,737 3/10/2021
3.0.8 74,114 3/4/2021
3.0.7 254,837 2/20/2021
3.0.6 108,165 2/14/2021
3.0.5 76,030 2/9/2021
3.0.4 32,726 2/8/2021
3.0.3 82,040 2/3/2021
3.0.2 28,654 2/3/2021
3.0.1 151,012 1/29/2021
3.0.0 58,860 1/28/2021
3.0.0-beta.0 11,996 1/20/2021
3.0.0-alpha.11 706 1/15/2021
3.0.0-alpha.10 66,306 1/10/2021
3.0.0-alpha.9 2,477 12/29/2020
3.0.0-alpha.8 4,773 12/25/2020
3.0.0-alpha.7 3,223 12/16/2020
3.0.0-alpha.6 4,027 11/30/2020
3.0.0-alpha.5 3,518 11/21/2020
3.0.0-alpha.4 2,701 11/2/2020
3.0.0-alpha.3 2,116 10/29/2020
3.0.0-alpha.2 1,070 10/21/2020
3.0.0-alpha.1 6,409 10/16/2020
3.0.0-alpha.0 2,582 9/25/2020
2.2.0-alpha 3,352 9/19/2020
2.1.8 2,280,451 11/21/2020
2.1.6 2,230,841 8/20/2020
2.1.5 646,136 7/27/2020
2.1.5-beta 4,612 6/30/2020
2.1.4 654,860 6/25/2020
2.1.3 729,945 6/5/2020
2.1.2-beta5 8,327 5/19/2020
2.1.2-beta4 5,287 5/12/2020
2.1.2-beta3 2,471 5/7/2020
2.1.2-beta2 22,676 4/16/2020
2.1.2-beta 4,775 3/31/2020
2.1.1 1,692,947 3/19/2020
2.1.0 781,828 2/24/2020
2.0.3 608,734 2/12/2020
2.0.2 36,809 2/8/2020
2.0.1 299,888 1/28/2020
2.0.0-beta8 24,571 1/15/2020
2.0.0-beta7 168,702 12/17/2019
2.0.0-beta6 103,676 10/31/2019
2.0.0-beta5 7,698 10/29/2019
2.0.0-beta4 76,510 9/4/2019
2.0.0-beta3 17,569 7/26/2019
2.0.0-beta2 6,720 6/9/2019
2.0.0-beta 3,711 6/4/2019
1.2.1-beta 2,793 5/27/2019
1.2.0 3,262,709 5/23/2019
1.1.3-beta4 2,386 5/15/2019
1.1.3-beta3 2,155 5/13/2019
1.1.3-beta2 8,633 3/28/2019
1.1.3-beta 5,786 2/11/2019
1.1.2 661,121 1/16/2019
1.1.2-beta 3,929 1/8/2019
1.1.1 24,989 1/5/2019
1.1.0 125,550 12/5/2018
1.0.1-beta5 3,069 12/5/2018
1.0.1-beta4 3,789 12/3/2018
1.0.1-beta3 18,930 11/15/2018
1.0.1-beta2 3,678 11/14/2018
1.0.1-beta 21,804 10/24/2018
1.0.0 324,127 10/2/2018
1.0.0-rc2 25,226 9/7/2018
1.0.0-rc 6,313 8/24/2018
0.0.1-preview5 8,044 8/5/2018
0.0.1-preview4 5,575 7/30/2018
0.0.1-preview3 7,318 7/17/2018
0.0.1-preview2 6,691 7/3/2018
0.0.1-preview1 3,092 6/28/2018