public final class SentryClient extends java.lang.Object implements ISentryClient
Constructor and Description |
---|
SentryClient(SentryOptions options,
@Nullable Connection connection) |
Modifier and Type | Method and Description |
---|---|
SentryId |
captureEvent(SentryEvent event,
@Nullable Scope scope,
@Nullable java.lang.Object hint)
Capture the event
|
void |
close()
Flushes out the queue for up to timeout seconds and disable the client.
|
void |
flush(long timeoutMills)
Flushes events queued up, but keeps the client enabled.
|
boolean |
isEnabled()
Whether the client is enabled or not
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
captureEvent, captureEvent, captureEvent, captureException, captureException, captureException, captureException, captureMessage, captureMessage
public SentryClient(SentryOptions options, @Nullable @Nullable Connection connection)
public boolean isEnabled()
ISentryClient
isEnabled
in interface ISentryClient
public SentryId captureEvent(SentryEvent event, @Nullable @Nullable Scope scope, @Nullable @Nullable java.lang.Object hint)
ISentryClient
captureEvent
in interface ISentryClient
event
- the eventscope
- An optional scope to be applied to the event.hint
- SDK specific but provides high level information about the origin of the event.public void close()
ISentryClient
close
in interface ISentryClient
public void flush(long timeoutMills)
ISentryClient
flush
in interface ISentryClient
timeoutMills
- time in milliseconds