All Projects → getsentry → Raven Csharp

getsentry / Raven Csharp

Licence: bsd-3-clause
Superseded by: https://github.com/getsentry/sentry-dotnet

Projects that are alternatives of or similar to Raven Csharp

Sentry Laravel
Laravel SDK for Sentry
Stars: ✭ 927 (+301.3%)
Mutual labels:  error-monitoring, crash-reporting, crash-reports
Bugsnag Cocoa
Bugsnag crash reporting for iOS, macOS and tvOS apps
Stars: ✭ 167 (-27.71%)
Mutual labels:  error-monitoring, crash-reporting, crash-reports
Bugsnag Android
Bugsnag crash monitoring and reporting tool for Android apps
Stars: ✭ 990 (+328.57%)
Mutual labels:  error-monitoring, crash-reporting, crash-reports
Sentry
Sentry is cross-platform application monitoring, with a focus on error reporting.
Stars: ✭ 29,700 (+12757.14%)
Mutual labels:  error-monitoring, crash-reporting, crash-reports
Ohbug
An open source application information monitoring platform.
Stars: ✭ 101 (-56.28%)
Mutual labels:  error-monitoring, crash-reporting, crash-reports
Exceptionless
Exceptionless server and jobs
Stars: ✭ 2,107 (+812.12%)
Mutual labels:  error-monitoring, crash-reporting, crash-reports
Sentry Telegram
Plugin for Sentry which allows sending notification via Telegram messenger.
Stars: ✭ 168 (-27.27%)
Mutual labels:  error-monitoring, crash-reporting, crash-reports
Sentry Cocoa
The official Sentry SDK for iOS, tvOS, macOS, watchOS
Stars: ✭ 370 (+60.17%)
Mutual labels:  error-monitoring, crash-reporting, crash-reports
Raven Node
A standalone (Node.js) client for Sentry
Stars: ✭ 462 (+100%)
Mutual labels:  error-monitoring, crash-reporting, crash-reports
Sentry Go
Official Sentry SDK for Go
Stars: ✭ 415 (+79.65%)
Mutual labels:  error-monitoring, crash-reporting, crash-reports
Sentry Php
The official PHP SDK for Sentry (sentry.io)
Stars: ✭ 1,591 (+588.74%)
Mutual labels:  error-monitoring, crash-reporting, crash-reports
Raven Go
Sentry client in Go
Stars: ✭ 554 (+139.83%)
Mutual labels:  error-monitoring, crash-reporting, crash-reports
Sentry Ruby
Sentry SDK for Ruby
Stars: ✭ 724 (+213.42%)
Mutual labels:  error-monitoring, crash-reporting, crash-reports
Bugsnag Go
Automatic panic monitoring for Go and Go web frameworks, like negroni, gin, and revel
Stars: ✭ 155 (-32.9%)
Mutual labels:  error-monitoring, crash-reporting
Bugsnag Android Ndk
DEPRECATED - this project now lives at bugsnag/bugsnag-android
Stars: ✭ 42 (-81.82%)
Mutual labels:  error-monitoring, crash-reporting
Bugsnag Node
[DEPRECATED] Please upgrade to our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
Stars: ✭ 48 (-79.22%)
Mutual labels:  error-monitoring, crash-reporting
Airbrake
The official Airbrake library for Ruby applications
Stars: ✭ 896 (+287.88%)
Mutual labels:  error-monitoring, crash-reporting
Airbrake Ruby
A plain Ruby Airbrake notifier
Stars: ✭ 52 (-77.49%)
Mutual labels:  error-monitoring, crash-reporting
Bugsnag Python
Official bugsnag error monitoring and error reporting for django, flask, tornado and other python apps.
Stars: ✭ 69 (-70.13%)
Mutual labels:  error-monitoring, crash-reporting
Ndcrash
A powerful crash reporting library for Android NDK. Don't forget to run git submodule update --init --recursive after checking out.
Stars: ✭ 91 (-60.61%)
Mutual labels:  crash-reporting, crash-reports


Note

Sentry is unifying the API across all SDKs. With that, a new .NET SDK was created.

This SDK is still recommended for .NET Framework 3.5 to 4.6.0.

For .NET Framework 4.6.1, .NET Core 2.0, Mono 5.4 or higher please use the new SDK.

Raven is the official legacy .NET client for Sentry

Stable Pre-release
GitHub GitHub release -
SharpRaven NuGet NuGet
SharpRaven.Nancy NuGet NuGet
Travis Build Master Develop
AppVeyor Build Master Develop

Usage

Instantiate the client with your 'Data Source Name' (DSN):

var ravenClient = new RavenClient("https://[email protected]/project-id");

Capturing Exceptions

Call out to the client in your catch block:

try
{
    int i2 = 0;
    int i = 10 / i2;
}
catch (Exception exception)
{
    ravenClient.Capture(new SentryEvent(exception));
}

Logging Non-Exceptions

You can capture a message without being bound by an exception:

ravenClient.Capture(new SentryEvent("Hello World!"));

Additional Data

You can add additional data to the Exception.Data property on exceptions thrown about in your solution:

try
{
    // ...    
}
catch (Exception exception)
{
    exception.Data.Add("SomeKey", "SomeValue");
    throw;
}

The data SomeKey and SomeValue will be captured and presented in the extra property on Sentry.

Additionally, the SentryEvent class allow you to provide extra data to be sent with your request, such as ErrorLevel, Fingerprint, a custom Message and Tags.

Async Support

In the .NET 4.5 or later build of SharpRaven, there's an async version of the Capture method as well:

async Task<string> CaptureAsync(SentryEvent @event);

Nancy Support

You can install the SharpRaven.Nancy package to capture the HTTP context in Nancy applications. It will auto-register on the IPipelines.OnError event, so all unhandled exceptions will be sent to Sentry.

The only thing you have to do is provide a DSN, either by registering an instance of the Dsn class in your container:

protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
{
    container.Register(new Dsn("https://[email protected]/project-id"));
}

or through configuration:

<configuration>
  <configSections>
    <section name="sharpRaven" type="SharpRaven.Nancy.NancyConfiguration, SharpRaven.Nancy" />
  </configSections>
  <sharpRaven>
    <dsn value="https://[email protected]/project-id" />
  </sharpRaven>
</configuration>

The DSN will be picked up by the auto-registered IRavenClient instance, so if you want to send events to Sentry, all you have to do is add a requirement on IRavenClient in your classes:

public class LoggingModule : NancyModule
{
    private readonly IRavenClient ravenClient;

    public LoggingModule(IRavenClient ravenClient)
    {
        this.ravenClient = ravenClient;
    }
}

Debugging SharpRaven

If an exception is raised internally to RavenClient it is logged to the Console. To extend this behaviour use the property ErrorOnCapture:

ravenClient.ErrorOnCapture = exception =>
{
    // Custom code here
};

You can also hook into the BeforeSend function to inspect or manipulate the data being sent to Sentry before it is sent:

ravenClient.BeforeSend = requester =>
{
    // Here you can log data from the requester
    // or replace it entirely if you want.
    return requester;
};

Get it!

You can clone and build SharpRaven yourself, but for those of us who are happy with prebuilt binaries, there's NuGet packages of both SharpRaven and SharpRaven.Nancy.

Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].