Package io.sentry
Interface ISentryClient
-
- All Known Implementing Classes:
SentryClient
public interface ISentryClient
Sentry Client interface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @Nullable SentryId
captureEnvelope(@NotNull SentryEnvelope envelope)
Captures an envelope.@Nullable SentryId
captureEnvelope(@NotNull SentryEnvelope envelope, @Nullable java.lang.Object hint)
Captures an envelope.default @NotNull SentryId
captureEvent(@NotNull SentryEvent event)
Captures the event.default @NotNull SentryId
captureEvent(@NotNull SentryEvent event, @Nullable Scope scope)
Captures the event.@NotNull SentryId
captureEvent(@NotNull SentryEvent event, @Nullable Scope scope, @Nullable java.lang.Object hint)
Capture the eventdefault @NotNull SentryId
captureEvent(@NotNull SentryEvent event, @Nullable java.lang.Object hint)
Capture the eventdefault @NotNull SentryId
captureException(@NotNull java.lang.Throwable throwable)
Captures the exception.default @NotNull SentryId
captureException(@NotNull java.lang.Throwable throwable, @Nullable Scope scope)
Captures the exception.default @NotNull SentryId
captureException(@NotNull java.lang.Throwable throwable, @Nullable Scope scope, @Nullable java.lang.Object hint)
Captures the exception.default @NotNull SentryId
captureException(@NotNull java.lang.Throwable throwable, @Nullable java.lang.Object hint)
Captures the exception.default @NotNull SentryId
captureMessage(@NotNull java.lang.String message, @NotNull SentryLevel level)
Captures the message.default @NotNull SentryId
captureMessage(@NotNull java.lang.String message, @NotNull SentryLevel level, @Nullable Scope scope)
Captures the message.default void
captureSession(@NotNull Session session)
Captures a session.void
captureSession(@NotNull Session session, @Nullable java.lang.Object hint)
Captures a session.default @NotNull SentryId
captureTransaction(@NotNull SentryTransaction transaction)
Captures a transaction without scope nor hint.default @NotNull SentryId
captureTransaction(@NotNull SentryTransaction transaction, @Nullable Scope scope, @Nullable java.lang.Object hint)
Captures a transaction.default @NotNull SentryId
captureTransaction(@NotNull SentryTransaction transaction, @Nullable TraceState traceState)
Captures a transaction without scope nor hint.@NotNull SentryId
captureTransaction(@NotNull SentryTransaction transaction, @Nullable TraceState traceState, @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
-
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Whether the client is enabled or not- Returns:
- true if its enabled or false otherwise.
-
captureEvent
@NotNull @NotNull SentryId captureEvent(@NotNull @NotNull SentryEvent event, @Nullable @Nullable Scope scope, @Nullable @Nullable java.lang.Object hint)
Capture the event- Parameters:
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.- Returns:
- The Id (SentryId object) of the event.
-
close
void close()
Flushes out the queue for up to timeout seconds and disable the client.
-
flush
void flush(long timeoutMillis)
Flushes events queued up, but keeps the client enabled. Not implemented yet.- Parameters:
timeoutMillis
- time in milliseconds
-
captureEvent
@NotNull default @NotNull SentryId captureEvent(@NotNull @NotNull SentryEvent event)
Captures the event.- Parameters:
event
- the event- Returns:
- The Id (SentryId object) of the event
-
captureEvent
@NotNull default @NotNull SentryId captureEvent(@NotNull @NotNull SentryEvent event, @Nullable @Nullable Scope scope)
Captures the event.- Parameters:
event
- the eventscope
- An optional scope to be applied to the event.- Returns:
- The Id (SentryId object) of the event
-
captureEvent
@NotNull default @NotNull SentryId captureEvent(@NotNull @NotNull SentryEvent event, @Nullable @Nullable java.lang.Object hint)
Capture the event- Parameters:
event
- the eventhint
- SDK specific but provides high level information about the origin of the event.- Returns:
- The Id (SentryId object) of the event.
-
captureMessage
@NotNull default @NotNull SentryId captureMessage(@NotNull @NotNull java.lang.String message, @NotNull @NotNull SentryLevel level, @Nullable @Nullable Scope scope)
Captures the message.- Parameters:
message
- The message to send.level
- The message level.scope
- An optional scope to be applied to the event.- Returns:
- The Id (SentryId object) of the event
-
captureMessage
@NotNull default @NotNull SentryId captureMessage(@NotNull @NotNull java.lang.String message, @NotNull @NotNull SentryLevel level)
Captures the message.- Parameters:
message
- The message to send.level
- The message level.- Returns:
- The Id (SentryId object) of the event
-
captureException
@NotNull default @NotNull SentryId captureException(@NotNull @NotNull java.lang.Throwable throwable)
Captures the exception.- Parameters:
throwable
- The exception.- Returns:
- The Id (SentryId object) of the event
-
captureException
@NotNull default @NotNull SentryId captureException(@NotNull @NotNull java.lang.Throwable throwable, @Nullable @Nullable Scope scope, @Nullable @Nullable java.lang.Object hint)
Captures the exception.- Parameters:
throwable
- The exception.hint
- SDK specific but provides high level information about the origin of the eventscope
- An optional scope to be applied to the event.- Returns:
- The Id (SentryId object) of the event
-
captureException
@NotNull default @NotNull SentryId captureException(@NotNull @NotNull java.lang.Throwable throwable, @Nullable @Nullable java.lang.Object hint)
Captures the exception.- Parameters:
throwable
- The exception.hint
- SDK specific but provides high level information about the origin of the event- Returns:
- The Id (SentryId object) of the event
-
captureException
@NotNull default @NotNull SentryId captureException(@NotNull @NotNull java.lang.Throwable throwable, @Nullable @Nullable Scope scope)
Captures the exception.- Parameters:
throwable
- The exception.scope
- An optional scope to be applied to the event.- Returns:
- The Id (SentryId object) of the event
-
captureUserFeedback
void captureUserFeedback(@NotNull @NotNull UserFeedback userFeedback)
Captures a manually created user feedback and sends it to Sentry.- Parameters:
userFeedback
- The user feedback to send to Sentry.
-
captureSession
void captureSession(@NotNull @NotNull Session session, @Nullable @Nullable java.lang.Object hint)
Captures a session. This method transform a session to an envelope and forwards to captureEnvelope- Parameters:
hint
- SDK specific but provides high level information about the origin of the eventsession
- the Session
-
captureSession
default void captureSession(@NotNull @NotNull Session session)
Captures a session. This method transform a session to an envelope and forwards to captureEnvelope- Parameters:
session
- the Session
-
captureEnvelope
@Nullable @Nullable SentryId captureEnvelope(@NotNull @NotNull SentryEnvelope envelope, @Nullable @Nullable java.lang.Object hint)
Captures an envelope.- Parameters:
envelope
- the SentryEnvelope to send.hint
- SDK specific but provides high level information about the origin of the event- Returns:
- The Id (SentryId object) of the event
-
captureEnvelope
@Nullable default @Nullable SentryId captureEnvelope(@NotNull @NotNull SentryEnvelope envelope)
Captures an envelope.- Parameters:
envelope
- the SentryEnvelope to send.- Returns:
- The Id (SentryId object) of the event
-
captureTransaction
@NotNull default @NotNull SentryId captureTransaction(@NotNull @NotNull SentryTransaction transaction, @Nullable @Nullable Scope scope, @Nullable @Nullable java.lang.Object hint)
Captures a transaction.- Parameters:
transaction
- theITransaction
to sendscope
- An optional scope to be applied to the event.hint
- SDK specific but provides high level information about the origin of the event- Returns:
- The Id (SentryId object) of the event
-
captureTransaction
@NotNull @Experimental @NotNull SentryId captureTransaction(@NotNull @NotNull SentryTransaction transaction, @Nullable @Nullable TraceState traceState, @Nullable @Nullable Scope scope, @Nullable @Nullable java.lang.Object hint)
Captures a transaction.- Parameters:
transaction
- theITransaction
to sendtraceState
- the trace statescope
- An optional scope to be applied to the event.hint
- SDK specific but provides high level information about the origin of the event- Returns:
- The Id (SentryId object) of the event
-
captureTransaction
@Experimental @NotNull default @NotNull SentryId captureTransaction(@NotNull @NotNull SentryTransaction transaction, @Nullable @Nullable TraceState traceState)
Captures a transaction without scope nor hint.- Parameters:
transaction
- theITransaction
to sendtraceState
- the trace state- Returns:
- The Id (SentryId object) of the event
-
captureTransaction
@NotNull default @NotNull SentryId captureTransaction(@NotNull @NotNull SentryTransaction transaction)
Captures a transaction without scope nor hint.- Parameters:
transaction
- theITransaction
to send- Returns:
- The Id (SentryId object) of the event
-
-