Class SentryEvent
An event to be sent to Sentry
Inherited Members
Namespace: Sentry
Assembly: Sentry.Protocol.dll
Syntax
[DataContract]
public class SentryEvent : BaseScope
Remarks
Members are included in the event but often modified as part of a scope manipulation which could affect multiple outgoing events.
Constructors
| Improve this Doc View SourceSentryEvent()
Creates a new instance of SentryEvent
Declaration
public SentryEvent()
SentryEvent(Exception)
Creates a Sentry event with optional Exception details and default values like Id and Timestamp
Declaration
public SentryEvent(Exception exception)
Parameters
Type | Name | Description |
---|---|---|
Exception | exception | The exception. |
Properties
| Improve this Doc View SourceEventId
The unique identifier of this event
Declaration
public SentryId EventId { get; }
Property Value
Type | Description |
---|---|
SentryId |
Remarks
Hexadecimal string representing a uuid4 value. The length is exactly 32 characters (no dashes!)
LogEntry
Gets the structured message that describes this event
Declaration
[DataMember(Name = "logentry", EmitDefaultValue = false)]
public LogEntry LogEntry { get; set; }
Property Value
Type | Description |
---|---|
LogEntry |
Remarks
This helps Sentry group events together as the grouping happens on the template message instead of the result string message.
Examples
LogEntry will have a template like: 'user {0} logged in' Or structured logging template '{user} has logged in'
| Improve this Doc View SourceLogger
Name of the logger (or source) of the event
Declaration
[DataMember(Name = "logger", EmitDefaultValue = false)]
public string Logger { get; set; }
Property Value
Type | Description |
---|---|
String |
Message
Gets the message that describes this event
Declaration
[DataMember(Name = "message", EmitDefaultValue = false)]
public string Message { get; set; }
Property Value
Type | Description |
---|---|
String |
Modules
A list of relevant modules and their versions.
Declaration
public IDictionary<string, string> Modules { get; }
Property Value
Type | Description |
---|---|
IDictionary<String, String> |
Platform
The name of the platform
Declaration
[DataMember(Name = "platform", EmitDefaultValue = false)]
public string Platform { get; set; }
Property Value
Type | Description |
---|---|
String |
Release
The release version of the application.
Declaration
[DataMember(Name = "release", EmitDefaultValue = false)]
public string Release { get; set; }
Property Value
Type | Description |
---|---|
String |
SentryExceptions
The Sentry Exception interface
Declaration
public IEnumerable<SentryException> SentryExceptions { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<SentryException> |
SentryThreads
The Sentry Thread interface
Declaration
public IEnumerable<SentryThread> SentryThreads { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<SentryThread> |
ServerName
Identifies the host SDK from which the event was recorded.
Declaration
[DataMember(Name = "server_name", EmitDefaultValue = false)]
public string ServerName { get; set; }
Property Value
Type | Description |
---|---|
String |
Timestamp
Indicates when the event was created
Declaration
[DataMember(Name = "timestamp", EmitDefaultValue = false)]
public DateTimeOffset Timestamp { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset |
Examples
2018-04-03T17:41:36