C# Class Sentry.RavenClient

Exibir arquivo Open project: ryanvalentin/raven-uwp Class Usage Examples

Public Properties

Property Type Description
Dsn Dsn

Private Properties

Property Type Description
Application_UnhandledException void
BuildHttpClient System.Net.Http.HttpClient
FlushStoredPayloadsAsync System.Threading.Tasks.Task
GeneratePayloadAsync Task
GeneratePayloadAsync Task
GetBasePayloadAsync Task
HandleInternalException void
ProcessExceptionAsync System.Threading.Tasks.Task
ProcessMessageAsync System.Threading.Tasks.Task
SendPayloadAsync Task
SetDefaultExtra object>.IDictionary
SetDefaultTagsAsync string>>.Task
StorePayloadAsync System.Threading.Tasks.Task
TaskScheduler_UnobservedTaskException void

Public Methods

Method Description
CaptureExceptionAsync ( Exception ex, bool forceSend = false ) : void

Captures an exception.

CaptureExceptionAsync ( Exception ex, bool forceSend = false, RavenLogLevel level = RavenLogLevel.Error, string>.IDictionary tags = null, object>.IDictionary extra = null ) : void

Captures an exception.

CaptureMessageAsync ( string message, bool forceSend = false ) : void

Captures a message.

CaptureMessageAsync ( string message, bool forceSend = false, RavenLogLevel level = RavenLogLevel.Info, string>.IDictionary tags = null, object>.IDictionary extra = null ) : void

Captures a message.

InitializeAsync ( Dsn dsn, bool captureUnhandled = true ) : void

Initializes the RavenClient class which you can then access through Instance. Call this in your App() constructor before InitializeComponent()

RegisterAsyncContextHandler ( ) : void

Call this in the "OnLaunched" and "OnActivated" handlers of App.xaml.cs to capture unobserved async void errors.

SetUser ( string id ) : void

Instantiates or updates the RavenUser to be sent with every Sentry request.

SetUser ( string id, string username ) : void

Instantiates or updates the RavenUser to be sent with every Sentry request.

SetUser ( string id, string username, string email ) : void

Instantiates or updates the RavenUser to be sent with every Sentry request.

Protected Methods

Method Description
RavenClient ( Dsn dsn, bool captureUnhandled = true ) : Newtonsoft.Json

Private Methods

Method Description
Application_UnhandledException ( object sender, UnhandledExceptionEventArgs e ) : void
BuildHttpClient ( ) : HttpClient
FlushStoredPayloadsAsync ( ) : System.Threading.Tasks.Task
GeneratePayloadAsync ( Exception ex, RavenLogLevel level, string>.IDictionary tags, object>.IDictionary extra ) : Task
GeneratePayloadAsync ( string message, RavenLogLevel level, string>.IDictionary tags, object>.IDictionary extra ) : Task
GetBasePayloadAsync ( RavenLogLevel level, string>.IDictionary tags, object>.IDictionary extra ) : Task
HandleInternalException ( Exception ex ) : void
ProcessExceptionAsync ( Exception ex, RavenLogLevel level, string>.IDictionary tags, object>.IDictionary extra, bool forceSend ) : System.Threading.Tasks.Task
ProcessMessageAsync ( string message, RavenLogLevel level, string>.IDictionary tags, object>.IDictionary extra, bool forceSend ) : System.Threading.Tasks.Task
SendPayloadAsync ( RavenPayload payload ) : Task
SetDefaultExtra ( object>.IDictionary extra = null ) : object>.IDictionary
SetDefaultTagsAsync ( string>.IDictionary tags = null ) : string>>.Task
StorePayloadAsync ( RavenPayload payload ) : System.Threading.Tasks.Task
TaskScheduler_UnobservedTaskException ( object sender, System.Threading.Tasks.UnobservedTaskExceptionEventArgs e ) : void

Method Details

CaptureExceptionAsync() public method

Captures an exception.
public CaptureExceptionAsync ( Exception ex, bool forceSend = false ) : void
ex System.Exception The to capture.
forceSend bool Whether to send the request immediately upon capture.
return void

CaptureExceptionAsync() public method

Captures an exception.
public CaptureExceptionAsync ( Exception ex, bool forceSend = false, RavenLogLevel level = RavenLogLevel.Error, string>.IDictionary tags = null, object>.IDictionary extra = null ) : void
ex System.Exception The to capture.
forceSend bool Whether to send the request immediately upon capture.
level RavenLogLevel The level this exception should be logged at.
tags string>.IDictionary Any additional tags to be sent with this exception.
extra object>.IDictionary Any additional extra data to be sent with this exception.
return void

CaptureMessageAsync() public method

Captures a message.
public CaptureMessageAsync ( string message, bool forceSend = false ) : void
message string The message text to be logged.
forceSend bool Whether to send the request immediately upon capture.
return void

CaptureMessageAsync() public method

Captures a message.
public CaptureMessageAsync ( string message, bool forceSend = false, RavenLogLevel level = RavenLogLevel.Info, string>.IDictionary tags = null, object>.IDictionary extra = null ) : void
message string The message text to be logged.
forceSend bool Whether to send the request immediately upon capture.
level RavenLogLevel The level this message should be logged at.
tags string>.IDictionary Any additional tags to be sent with this message.
extra object>.IDictionary Any additional extra data to be sent with this message.
return void

InitializeAsync() public static method

Initializes the RavenClient class which you can then access through Instance. Call this in your App() constructor before InitializeComponent()
public static InitializeAsync ( Dsn dsn, bool captureUnhandled = true ) : void
dsn Dsn
captureUnhandled bool
return void

RavenClient() protected method

protected RavenClient ( Dsn dsn, bool captureUnhandled = true ) : Newtonsoft.Json
dsn Dsn
captureUnhandled bool
return Newtonsoft.Json

RegisterAsyncContextHandler() public method

Call this in the "OnLaunched" and "OnActivated" handlers of App.xaml.cs to capture unobserved async void errors.
public RegisterAsyncContextHandler ( ) : void
return void

SetUser() public method

Instantiates or updates the RavenUser to be sent with every Sentry request.
public SetUser ( string id ) : void
id string The unique identifier of this user.
return void

SetUser() public method

Instantiates or updates the RavenUser to be sent with every Sentry request.
public SetUser ( string id, string username ) : void
id string The unique identifier of this user.
username string The username of the this user.
return void

SetUser() public method

Instantiates or updates the RavenUser to be sent with every Sentry request.
public SetUser ( string id, string username, string email ) : void
id string The unique identifier of this user.
username string The username of the this user.
email string The email address of this user.
return void

Property Details

Dsn public_oe property

public Dsn,Sentry Dsn
return Dsn