public final class SentryClient extends java.lang.Object implements ISentryClient
Constructor and Description |
---|
SentryClient(@NotNull SentryOptions options,
@Nullable Connection connection) |
Modifier and Type | Method and Description |
---|---|
@Nullable 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.
|
SentryId |
captureTransaction(@NotNull SentryTransaction transaction,
@NotNull Scope scope,
@Nullable java.lang.Object hint)
Captures a transaction.
|
void |
captureUserFeedback(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 SentryClient(@NotNull @NotNull SentryOptions options, @Nullable @Nullable Connection connection)
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(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 @Nullable public @Nullable 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 eventpublic SentryId captureTransaction(@NotNull @NotNull SentryTransaction transaction, @NotNull @NotNull Scope scope, @Nullable @Nullable java.lang.Object hint)
ISentryClient
captureTransaction
in interface ISentryClient
transaction
- the SentryTransaction
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