C# Class SharpRaven.RavenClient

The Raven Client, responsible for capturing exceptions and sending them to Sentry.
Inheritance: IRavenClient
Datei anzeigen Open project: getsentry/raven-csharp Class Usage Examples

Public Methods

Method Description
Capture ( SentryEvent @event ) : string

Captures the specified event.

CaptureAsync ( SentryEvent @event ) : Task

Captures the event.

RavenClient ( SharpRaven.Dsn dsn, IJsonPacketFactory jsonPacketFactory = null, ISentryRequestFactory sentryRequestFactory = null, ISentryUserFactory sentryUserFactory = null ) : System

Initializes a new instance of the RavenClient class.

RavenClient ( IJsonPacketFactory jsonPacketFactory = null ) : System

Initializes a new instance of the RavenClient class. Sentry Data Source Name will be read from sharpRaven section in your app.config or web.config.

RavenClient ( string dsn, IJsonPacketFactory jsonPacketFactory = null, ISentryRequestFactory sentryRequestFactory = null, ISentryUserFactory sentryUserFactory = null ) : System

Initializes a new instance of the RavenClient class.

Protected Methods

Method Description
PreparePacket ( JsonPacket packet ) : JsonPacket

Performs JsonPacket post-processing prior to being sent to Sentry.

Send ( JsonPacket packet ) : string

Sends the specified packet to Sentry.

SendAsync ( JsonPacket packet ) : Task

Sends the specified packet to Sentry.

Private Methods

Method Description
CaptureEvent ( Exception e ) : string
CaptureEvent ( Exception e, string>.Dictionary tags ) : string
CaptureException ( Exception exception, SentryMessage message = null, ErrorLevel level = ErrorLevel.Error, string>.IDictionary tags = null, string fingerprint = null, object extra = null ) : string
CaptureExceptionAsync ( Exception exception, SentryMessage message = null, ErrorLevel level = ErrorLevel.Error, string>.IDictionary tags = null, string fingerprint = null, object extra = null ) : Task
CaptureMessage ( SentryMessage message, ErrorLevel level = ErrorLevel.Info, string>.IDictionary tags = null, string fingerprint = null, object extra = null ) : string
CaptureMessageAsync ( SentryMessage message, ErrorLevel level = ErrorLevel.Info, string>.IDictionary tags = null, string fingerprint = null, object extra = null ) : Task
HandleException ( Exception exception ) : string
MergeTags ( string>.IDictionary tags = null ) : string>.IDictionary

Method Details

Capture() public method

Captures the specified event.
public Capture ( SentryEvent @event ) : string
@event SharpRaven.Data.SentryEvent
return string

CaptureAsync() public method

Captures the event.
public CaptureAsync ( SentryEvent @event ) : Task
@event SharpRaven.Data.SentryEvent
return Task

PreparePacket() protected method

Performs JsonPacket post-processing prior to being sent to Sentry.
protected PreparePacket ( JsonPacket packet ) : JsonPacket
packet SharpRaven.Data.JsonPacket The prepared which has cleared the creation pipeline.
return SharpRaven.Data.JsonPacket

RavenClient() public method

Initializes a new instance of the RavenClient class.
dsn
public RavenClient ( SharpRaven.Dsn dsn, IJsonPacketFactory jsonPacketFactory = null, ISentryRequestFactory sentryRequestFactory = null, ISentryUserFactory sentryUserFactory = null ) : System
dsn SharpRaven.Dsn The Data Source Name in Sentry.
jsonPacketFactory IJsonPacketFactory The optional factory that will be used to create the that will be sent to Sentry.
sentryRequestFactory ISentryRequestFactory The optional factory that will be used to create the that will be sent to Sentry.
sentryUserFactory ISentryUserFactory The optional factory that will be used to create the that will be sent to Sentry.
return System

RavenClient() public method

Initializes a new instance of the RavenClient class. Sentry Data Source Name will be read from sharpRaven section in your app.config or web.config.
public RavenClient ( IJsonPacketFactory jsonPacketFactory = null ) : System
jsonPacketFactory IJsonPacketFactory The optional factory that will be used to create the that will be sent to Sentry.
return System

RavenClient() public method

Initializes a new instance of the RavenClient class.
public RavenClient ( string dsn, IJsonPacketFactory jsonPacketFactory = null, ISentryRequestFactory sentryRequestFactory = null, ISentryUserFactory sentryUserFactory = null ) : System
dsn string The Data Source Name in Sentry.
jsonPacketFactory IJsonPacketFactory The optional factory that will be used to create the that will be sent to Sentry.
sentryRequestFactory ISentryRequestFactory The optional factory that will be used to create the that will be sent to Sentry.
sentryUserFactory ISentryUserFactory The optional factory that will be used to create the that will be sent to Sentry.
return System

Send() protected method

Sends the specified packet to Sentry.
protected Send ( JsonPacket packet ) : string
packet SharpRaven.Data.JsonPacket The packet to send.
return string

SendAsync() protected method

Sends the specified packet to Sentry.
protected SendAsync ( JsonPacket packet ) : Task
packet SharpRaven.Data.JsonPacket The packet to send.
return Task