C# Class SharpRaven.RavenClient

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

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode 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 méthode

Captures the specified event.
public Capture ( SentryEvent @event ) : string
@event SharpRaven.Data.SentryEvent
Résultat string

CaptureAsync() public méthode

Captures the event.
public CaptureAsync ( SentryEvent @event ) : Task
@event SharpRaven.Data.SentryEvent
Résultat Task

PreparePacket() protected méthode

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.
Résultat SharpRaven.Data.JsonPacket

RavenClient() public méthode

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.
Résultat System

RavenClient() public méthode

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.
Résultat System

RavenClient() public méthode

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.
Résultat System

Send() protected méthode

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

SendAsync() protected méthode

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