Package io.sentry

Class SentryEvent

All Implemented Interfaces:
JsonSerializable, JsonUnknown

public final class SentryEvent extends SentryBaseEvent implements JsonUnknown, JsonSerializable
  • Constructor Details

    • SentryEvent

      public SentryEvent(@Nullable @Nullable Throwable throwable)
      SentryEvent ctor with the captured Throwable
      throwable - the Throwable or null
    • SentryEvent

      public SentryEvent()
    • SentryEvent

      @TestOnly public SentryEvent(@NotNull @NotNull Date timestamp)
  • Method Details

    • getTimestamp

      public Date getTimestamp()
    • setTimestamp

      public void setTimestamp(@NotNull @NotNull Date timestamp)
    • getMessage

      @Nullable public @Nullable Message getMessage()
    • setMessage

      public void setMessage(@Nullable @Nullable Message message)
    • getLogger

      @Nullable public @Nullable String getLogger()
    • setLogger

      public void setLogger(@Nullable @Nullable String logger)
    • getThreads

      @Nullable public @Nullable List<SentryThread> getThreads()
    • setThreads

      public void setThreads(@Nullable @Nullable List<SentryThread> threads)
    • getExceptions

      @Nullable public @Nullable List<SentryException> getExceptions()
    • setExceptions

      public void setExceptions(@Nullable @Nullable List<SentryException> exception)
    • getLevel

      @Nullable public @Nullable SentryLevel getLevel()
    • setLevel

      public void setLevel(@Nullable @Nullable SentryLevel level)
    • getTransaction

      @Nullable public @Nullable String getTransaction()
    • setTransaction

      public void setTransaction(@Nullable @Nullable String transaction)
    • getFingerprints

      @Nullable public @Nullable List<String> getFingerprints()
    • setFingerprints

      public void setFingerprints(@Nullable @Nullable List<String> fingerprint)
    • setModules

      public void setModules(@Nullable @Nullable Map<String,String> modules)
    • setModule

      public void setModule(@NotNull @NotNull String key, @NotNull @NotNull String value)
    • removeModule

      public void removeModule(@NotNull @NotNull String key)
    • getModule

      @Nullable public @Nullable String getModule(@NotNull @NotNull String key)
    • isCrashed

      public boolean isCrashed()
      Returns true if any exception was unhandled by the user.
      true if its crashed or false otherwise
    • getUnhandledException

      @Nullable public @Nullable SentryException getUnhandledException()
    • isErrored

      public boolean isErrored()
      Returns true if this event has any sort of exception
      true if errored or false otherwise
    • serialize

      public void serialize(@NotNull @NotNull ObjectWriter writer, @NotNull @NotNull ILogger logger) throws IOException
      Specified by:
      serialize in interface JsonSerializable
    • getUnknown

      @Nullable public @Nullable Map<String,Object> getUnknown()
      Specified by:
      getUnknown in interface JsonUnknown
    • setUnknown

      public void setUnknown(@Nullable @Nullable Map<String,Object> unknown)
      Specified by:
      setUnknown in interface JsonUnknown