Package io.sentry
Class SentryEvent
- java.lang.Object
-
- io.sentry.SentryBaseEvent
-
- io.sentry.SentryEvent
-
- All Implemented Interfaces:
IUnknownPropertiesConsumer
public final class SentryEvent extends SentryBaseEvent implements IUnknownPropertiesConsumer
-
-
Field Summary
-
Fields inherited from class io.sentry.SentryBaseEvent
DEFAULT_PLATFORM, throwable
-
-
Constructor Summary
Constructors Constructor Description SentryEvent()
SentryEvent(@NotNull java.util.Date timestamp)
SentryEvent(@Nullable java.lang.Throwable throwable)
SentryEvent ctor with the captured Throwable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptUnknownProperties(@NotNull java.util.Map<java.lang.String,java.lang.Object> unknown)
@Nullable DebugMeta
getDebugMeta()
@Nullable java.util.List<SentryException>
getExceptions()
@Nullable java.util.List<java.lang.String>
getFingerprints()
@Nullable SentryLevel
getLevel()
@Nullable java.lang.String
getLogger()
@Nullable Message
getMessage()
@Nullable java.lang.String
getModule(@NotNull java.lang.String key)
@Nullable java.util.List<SentryThread>
getThreads()
java.util.Date
getTimestamp()
@Nullable java.lang.String
getTransaction()
@Nullable java.util.Map<java.lang.String,java.lang.Object>
getUnknown()
boolean
isCrashed()
Returns true if any exception was unhandled by the user.boolean
isErrored()
Returns true if this event has any sort of exceptionvoid
removeModule(@NotNull java.lang.String key)
void
setDebugMeta(@Nullable DebugMeta debugMeta)
void
setExceptions(@Nullable java.util.List<SentryException> exception)
void
setFingerprints(@Nullable java.util.List<java.lang.String> fingerprint)
void
setLevel(@Nullable SentryLevel level)
void
setLogger(@Nullable java.lang.String logger)
void
setMessage(@Nullable Message message)
void
setModule(@NotNull java.lang.String key, @NotNull java.lang.String value)
void
setModules(@Nullable java.util.Map<java.lang.String,java.lang.String> modules)
void
setThreads(@Nullable java.util.List<SentryThread> threads)
void
setTransaction(@Nullable java.lang.String transaction)
-
Methods inherited from class io.sentry.SentryBaseEvent
addBreadcrumb, addBreadcrumb, getBreadcrumbs, getContexts, getDist, getEnvironment, getEventId, getExtra, getOriginThrowable, getPlatform, getRelease, getRequest, getSdk, getServerName, getTag, getTags, getThrowable, getUser, removeExtra, removeTag, setBreadcrumbs, setDist, setEnvironment, setEventId, setExtra, setExtras, setPlatform, setRelease, setRequest, setSdk, setServerName, setTag, setTags, setThrowable, setUser
-
-
-
-
Constructor Detail
-
SentryEvent
public SentryEvent(@Nullable @Nullable java.lang.Throwable throwable)
SentryEvent ctor with the captured Throwable- Parameters:
throwable
- the Throwable or null
-
SentryEvent
public SentryEvent()
-
SentryEvent
@TestOnly public SentryEvent(@NotNull @NotNull java.util.Date timestamp)
-
-
Method Detail
-
getTimestamp
public java.util.Date getTimestamp()
-
getMessage
@Nullable public @Nullable Message getMessage()
-
setMessage
public void setMessage(@Nullable @Nullable Message message)
-
getLogger
@Nullable public @Nullable java.lang.String getLogger()
-
setLogger
public void setLogger(@Nullable @Nullable java.lang.String logger)
-
getThreads
@Nullable public @Nullable java.util.List<SentryThread> getThreads()
-
setThreads
public void setThreads(@Nullable @Nullable java.util.List<SentryThread> threads)
-
getExceptions
@Nullable public @Nullable java.util.List<SentryException> getExceptions()
-
setExceptions
public void setExceptions(@Nullable @Nullable java.util.List<SentryException> exception)
-
getLevel
@Nullable public @Nullable SentryLevel getLevel()
-
setLevel
public void setLevel(@Nullable @Nullable SentryLevel level)
-
getTransaction
@Nullable public @Nullable java.lang.String getTransaction()
-
setTransaction
public void setTransaction(@Nullable @Nullable java.lang.String transaction)
-
getFingerprints
@Nullable public @Nullable java.util.List<java.lang.String> getFingerprints()
-
setFingerprints
public void setFingerprints(@Nullable @Nullable java.util.List<java.lang.String> fingerprint)
-
acceptUnknownProperties
@Internal public void acceptUnknownProperties(@NotNull @NotNull java.util.Map<java.lang.String,java.lang.Object> unknown)
- Specified by:
acceptUnknownProperties
in interfaceIUnknownPropertiesConsumer
-
getUnknown
@TestOnly @Nullable public @Nullable java.util.Map<java.lang.String,java.lang.Object> getUnknown()
-
setModules
public void setModules(@Nullable @Nullable java.util.Map<java.lang.String,java.lang.String> modules)
-
setModule
public void setModule(@NotNull @NotNull java.lang.String key, @NotNull @NotNull java.lang.String value)
-
removeModule
public void removeModule(@NotNull @NotNull java.lang.String key)
-
getModule
@Nullable public @Nullable java.lang.String getModule(@NotNull @NotNull java.lang.String key)
-
getDebugMeta
@Nullable public @Nullable DebugMeta getDebugMeta()
-
setDebugMeta
public void setDebugMeta(@Nullable @Nullable DebugMeta debugMeta)
-
isCrashed
public boolean isCrashed()
Returns true if any exception was unhandled by the user.- Returns:
- true if its crashed or false otherwise
-
isErrored
public boolean isErrored()
Returns true if this event has any sort of exception- Returns:
- true if errored or false otherwise
-
-