| Modifier and Type | Method and Description |
|---|---|
void |
addBreadcrumb(Breadcrumb breadcrumb,
@Nullable java.lang.Object hint)
Adds a breadcrumb to the current Scope
|
void |
bindClient(ISentryClient client)
Binds a different client to the hub
|
SentryId |
captureEnvelope(SentryEnvelope envelope,
@Nullable java.lang.Object hint)
Captures an envelope.
|
SentryId |
captureEvent(SentryEvent event,
@Nullable java.lang.Object hint)
Captures the event.
|
SentryId |
captureException(java.lang.Throwable throwable,
@Nullable java.lang.Object hint)
Captures the exception.
|
SentryId |
captureMessage(java.lang.String message,
SentryLevel level)
Captures the message.
|
void |
captureUserFeedback(UserFeedback userFeedback)
Captures a manually created user feedback and sends it to Sentry.
|
void |
clearBreadcrumbs()
Deletes current breadcrumbs from the current scope.
|
IHub |
clone()
Clones the Hub
|
void |
close()
Flushes out the queue for up to timeout seconds and disable the Hub.
|
void |
configureScope(ScopeCallback callback)
Configures the scope through the callback.
|
void |
endSession()
Ends the current session
|
void |
flush(long timeoutMillis)
Flushes events queued up, but keeps the Hub enabled.
|
static HubAdapter |
getInstance() |
SentryId |
getLastEventId()
Last event id recorded in the current scope
|
boolean |
isEnabled()
Check if the Hub is enabled/active.
|
void |
popScope()
Removes the first scope
|
void |
pushScope()
Pushes a new scope while inheriting the current scope's data.
|
void |
removeExtra(java.lang.String key)
Removes the extra key to an arbitrary value to the current Scope
|
void |
removeTag(java.lang.String key)
Removes the tag to a string value to the current Scope
|
void |
setExtra(java.lang.String key,
java.lang.String value)
Sets the extra key to an arbitrary value to the current Scope, overwriting a potential previous
value
|
void |
setFingerprint(java.util.List<java.lang.String> fingerprint)
Sets the fingerprint to group specific events together to the current Scope.
|
void |
setLevel(SentryLevel level)
Sets the level of all events sent within current Scope
|
void |
setTag(java.lang.String key,
java.lang.String value)
Sets the tag to a string value to the current Scope, overwriting a potential previous value
|
void |
setTransaction(java.lang.String transaction)
Sets the name of the current transaction to the current Scope.
|
void |
setUser(User user)
Shallow merges user configuration (email, username, etc) to the current Scope.
|
void |
startSession()
Starts a new session.
|
void |
withScope(ScopeCallback callback)
Runs the callback with a new scope which gets dropped at the end
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBreadcrumb, addBreadcrumb, addBreadcrumb, captureEnvelope, captureEvent, captureException, captureMessagepublic static HubAdapter getInstance()
public boolean isEnabled()
IHubpublic SentryId captureEvent(SentryEvent event, @Nullable @Nullable java.lang.Object hint)
IHubcaptureEvent in interface IHubevent - the eventhint - SDK specific but provides high level information about the origin of the eventpublic SentryId captureMessage(java.lang.String message, SentryLevel level)
IHubcaptureMessage in interface IHubmessage - The message to send.level - The message level.@ApiStatus.Internal public SentryId captureEnvelope(SentryEnvelope envelope, @Nullable @Nullable java.lang.Object hint)
IHubcaptureEnvelope in interface IHubenvelope - the SentryEnvelope to send.hint - SDK specific but provides high level information about the origin of the eventpublic SentryId captureException(java.lang.Throwable throwable, @Nullable @Nullable java.lang.Object hint)
IHubcaptureException in interface IHubthrowable - The exception.hint - SDK specific but provides high level information about the origin of the eventpublic void captureUserFeedback(UserFeedback userFeedback)
IHubcaptureUserFeedback in interface IHubuserFeedback - The user feedback to send to Sentry.public void startSession()
IHubstartSession in interface IHubpublic void endSession()
IHubendSession in interface IHubpublic void close()
IHubpublic void addBreadcrumb(Breadcrumb breadcrumb, @Nullable @Nullable java.lang.Object hint)
IHubaddBreadcrumb in interface IHubbreadcrumb - the breadcrumbhint - SDK specific but provides high level information about the origin of the eventpublic void setLevel(SentryLevel level)
IHubpublic void setTransaction(java.lang.String transaction)
IHubsetTransaction in interface IHubtransaction - the transactionpublic void setUser(User user)
IHubpublic void setFingerprint(java.util.List<java.lang.String> fingerprint)
IHubsetFingerprint in interface IHubfingerprint - the fingerprintspublic void clearBreadcrumbs()
IHubclearBreadcrumbs in interface IHubpublic void setTag(java.lang.String key,
java.lang.String value)
IHubpublic void removeTag(java.lang.String key)
IHubpublic void setExtra(java.lang.String key,
java.lang.String value)
IHubpublic void removeExtra(java.lang.String key)
IHubremoveExtra in interface IHubkey - the keypublic SentryId getLastEventId()
IHubgetLastEventId in interface IHubpublic void pushScope()
IHubpublic void popScope()
IHubpublic void withScope(ScopeCallback callback)
IHubpublic void configureScope(ScopeCallback callback)
IHubconfigureScope in interface IHubcallback - The configure scope callback.public void bindClient(ISentryClient client)
IHubbindClient in interface IHubclient - the client.public void flush(long timeoutMillis)
IHub