Show / Hide Table of Contents

    Class SentryEvent

    An event to be sent to Sentry

    Inheritance
    Object
    BaseScope
    SentryEvent
    Inherited Members
    BaseScope.ScopeOptions
    BaseScope.Level
    BaseScope.Transaction
    BaseScope.Request
    BaseScope.Contexts
    BaseScope.User
    BaseScope.Environment
    BaseScope.Sdk
    BaseScope.Fingerprint
    BaseScope.Breadcrumbs
    BaseScope.Extra
    BaseScope.Tags
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    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 Source

    SentryEvent()

    Creates a new instance of SentryEvent

    Declaration
    public SentryEvent()
    | Improve this Doc View Source

    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 Source

    EventId

    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!)

    | Improve this Doc View Source

    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 Source

    Logger

    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
    | Improve this Doc View Source

    Message

    Gets the message that describes this event

    Declaration
    [DataMember(Name = "message", EmitDefaultValue = false)]
    public string Message { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Modules

    A list of relevant modules and their versions.

    Declaration
    public IDictionary<string, string> Modules { get; }
    Property Value
    Type Description
    IDictionary<String, String>
    | Improve this Doc View Source

    Platform

    The name of the platform

    Declaration
    [DataMember(Name = "platform", EmitDefaultValue = false)]
    public string Platform { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Release

    The release version of the application.

    Declaration
    [DataMember(Name = "release", EmitDefaultValue = false)]
    public string Release { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    SentryExceptions

    The Sentry Exception interface

    Declaration
    public IEnumerable<SentryException> SentryExceptions { get; set; }
    Property Value
    Type Description
    IEnumerable<SentryException>
    | Improve this Doc View Source

    SentryThreads

    The Sentry Thread interface

    Declaration
    public IEnumerable<SentryThread> SentryThreads { get; set; }
    Property Value
    Type Description
    IEnumerable<SentryThread>
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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

    See Also

    https://docs.sentry.io/clientdev/attributes/
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX