public final class SentryClient extends java.lang.Object implements ISentryClient
Modifier and Type | Method and Description |
---|---|
@NotNull SentryId |
captureEnvelope(@NotNull SentryEnvelope envelope,
@Nullable java.lang.Object hint)
Captures an envelope.
|
@NotNull SentryId |
captureEvent(@NotNull SentryEvent event,
@Nullable Scope scope,
@Nullable java.lang.Object hint)
Capture the event
|
void |
captureSession(@NotNull Session session,
@Nullable java.lang.Object hint)
Captures a session.
|
@NotNull SentryId |
captureTransaction(@NotNull SentryTransaction transaction,
@Nullable Scope scope,
@Nullable java.lang.Object hint)
Captures a transaction.
|
void |
captureUserFeedback(@NotNull UserFeedback userFeedback)
Captures a manually created user feedback and sends it to Sentry.
|
void |
close()
Flushes out the queue for up to timeout seconds and disable the client.
|
void |
flush(long timeoutMillis)
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
captureEnvelope, captureEvent, captureEvent, captureEvent, captureException, captureException, captureException, captureException, captureMessage, captureMessage, captureSession, captureTransaction
public boolean isEnabled()
ISentryClient
isEnabled
in interface ISentryClient
@NotNull public @NotNull SentryId captureEvent(@NotNull @NotNull 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 captureUserFeedback(@NotNull @NotNull UserFeedback userFeedback)
ISentryClient
captureUserFeedback
in interface ISentryClient
userFeedback
- The user feedback to send to Sentry.@ApiStatus.Internal public void captureSession(@NotNull @NotNull Session session, @Nullable @Nullable java.lang.Object hint)
ISentryClient
captureSession
in interface ISentryClient
session
- the Sessionhint
- SDK specific but provides high level information about the origin of the event@ApiStatus.Internal @NotNull public @NotNull SentryId captureEnvelope(@NotNull @NotNull SentryEnvelope envelope, @Nullable @Nullable java.lang.Object hint)
ISentryClient
captureEnvelope
in interface ISentryClient
envelope
- the SentryEnvelope to send.hint
- SDK specific but provides high level information about the origin of the event@NotNull public @NotNull SentryId captureTransaction(@NotNull @NotNull SentryTransaction transaction, @Nullable @Nullable Scope scope, @Nullable @Nullable java.lang.Object hint)
ISentryClient
captureTransaction
in interface ISentryClient
transaction
- the ITransaction
to sendscope
- An optional scope to be applied to the event.hint
- SDK specific but provides high level information about the origin of the eventpublic void close()
ISentryClient
close
in interface ISentryClient
public void flush(long timeoutMillis)
ISentryClient
flush
in interface ISentryClient
timeoutMillis
- time in milliseconds