Package io.sentry

Class SentryBaseEvent

  • Direct Known Subclasses:
    SentryEvent, SentryTransaction

    public abstract class SentryBaseEvent
    extends java.lang.Object
    An item sent to Sentry in the envelope. Can be either SentryEvent or the Performance transaction.
    • Field Detail

      • DEFAULT_PLATFORM

        public static final java.lang.String DEFAULT_PLATFORM
        See Also:
        Constant Field Values
      • throwable

        @Nullable
        protected transient @Nullable java.lang.Throwable throwable
        The captured Throwable
    • Constructor Detail

      • SentryBaseEvent

        protected SentryBaseEvent​(@NotNull
                                  @NotNull SentryId eventId)
      • SentryBaseEvent

        protected SentryBaseEvent()
    • Method Detail

      • getEventId

        @Nullable
        public @Nullable SentryId getEventId()
      • setEventId

        public void setEventId​(@Nullable
                               @Nullable SentryId eventId)
      • getContexts

        @NotNull
        public @NotNull Contexts getContexts()
      • getSdk

        @Nullable
        public @Nullable SdkVersion getSdk()
      • setSdk

        public void setSdk​(@Nullable
                           @Nullable SdkVersion sdk)
      • getRequest

        @Nullable
        public @Nullable Request getRequest()
      • setRequest

        public void setRequest​(@Nullable
                               @Nullable Request request)
      • getThrowable

        @Nullable
        public @Nullable java.lang.Throwable getThrowable()
        Returns the captured Throwable or null. If a throwable is wrapped in ExceptionMechanismException, returns unwrapped throwable.
        Returns:
        the Throwable or null
      • getOriginThrowable

        @Deprecated
        @Nullable
        public @Nullable java.lang.Throwable getOriginThrowable()
        Deprecated.
        Returns the captured Throwable or null. If a throwable is wrapped in ExceptionMechanismException, returns unwrapped throwable.
        Returns:
        the Throwable or null
      • setThrowable

        public void setThrowable​(@Nullable
                                 @Nullable java.lang.Throwable throwable)
        Sets the Throwable
        Parameters:
        throwable - the Throwable or null
      • getTags

        @Internal
        @Nullable
        public @Nullable java.util.Map<java.lang.String,​java.lang.String> getTags()
      • setTags

        public void setTags​(@Nullable
                            @Nullable java.util.Map<java.lang.String,​java.lang.String> tags)
      • removeTag

        public void removeTag​(@NotNull
                              @NotNull java.lang.String key)
      • getTag

        @Nullable
        public @Nullable java.lang.String getTag​(@NotNull
                                                 @NotNull java.lang.String key)
      • setTag

        public void setTag​(@NotNull
                           @NotNull java.lang.String key,
                           @NotNull
                           @NotNull java.lang.String value)
      • getRelease

        @Nullable
        public @Nullable java.lang.String getRelease()
      • setRelease

        public void setRelease​(@Nullable
                               @Nullable java.lang.String release)
      • getEnvironment

        @Nullable
        public @Nullable java.lang.String getEnvironment()
      • setEnvironment

        public void setEnvironment​(@Nullable
                                   @Nullable java.lang.String environment)
      • getPlatform

        @Nullable
        public @Nullable java.lang.String getPlatform()
      • setPlatform

        public void setPlatform​(@Nullable
                                @Nullable java.lang.String platform)
      • getServerName

        @Nullable
        public @Nullable java.lang.String getServerName()
      • setServerName

        public void setServerName​(@Nullable
                                  @Nullable java.lang.String serverName)
      • getDist

        @Nullable
        public @Nullable java.lang.String getDist()
      • setDist

        public void setDist​(@Nullable
                            @Nullable java.lang.String dist)
      • getUser

        @Nullable
        public @Nullable User getUser()
      • setUser

        public void setUser​(@Nullable
                            @Nullable User user)
      • getBreadcrumbs

        @Nullable
        public @Nullable java.util.List<Breadcrumb> getBreadcrumbs()
      • setBreadcrumbs

        public void setBreadcrumbs​(@Nullable
                                   @Nullable java.util.List<Breadcrumb> breadcrumbs)
      • addBreadcrumb

        public void addBreadcrumb​(@NotNull
                                  @NotNull Breadcrumb breadcrumb)
      • setExtras

        public void setExtras​(@Nullable
                              @Nullable java.util.Map<java.lang.String,​java.lang.Object> extra)
      • setExtra

        public void setExtra​(@NotNull
                             @NotNull java.lang.String key,
                             @NotNull
                             @NotNull java.lang.Object value)
      • removeExtra

        public void removeExtra​(@NotNull
                                @NotNull java.lang.String key)
      • getExtra

        @Nullable
        public @Nullable java.lang.Object getExtra​(@NotNull
                                                   @NotNull java.lang.String key)
      • addBreadcrumb

        public void addBreadcrumb​(@Nullable
                                  @Nullable java.lang.String message)