Package io.sentry
Interface ISentryClient
- All Known Implementing Classes:
SentryClient
public interface ISentryClient
Sentry Client interface
-
Method Summary
Modifier and TypeMethodDescription@NotNull SentryId
captureCheckIn
(@NotNull CheckIn checkIn, @Nullable IScope scope, @Nullable Hint hint) default @Nullable SentryId
captureEnvelope
(@NotNull SentryEnvelope envelope) Captures an envelope.@Nullable SentryId
captureEnvelope
(@NotNull SentryEnvelope envelope, @Nullable Hint hint) Captures an envelope.default @NotNull SentryId
captureEvent
(@NotNull SentryEvent event) Captures the event.default @NotNull SentryId
captureEvent
(@NotNull SentryEvent event, @Nullable Hint hint) Capture the eventdefault @NotNull SentryId
captureEvent
(@NotNull SentryEvent event, @Nullable IScope scope) Captures the event.@NotNull SentryId
captureEvent
(@NotNull SentryEvent event, @Nullable IScope scope, @Nullable Hint hint) Capture the eventdefault @NotNull SentryId
captureException
(@NotNull Throwable throwable) Captures the exception.default @NotNull SentryId
captureException
(@NotNull Throwable throwable, @Nullable Hint hint) Captures the exception.default @NotNull SentryId
captureException
(@NotNull Throwable throwable, @Nullable IScope scope) Captures the exception.default @NotNull SentryId
captureException
(@NotNull Throwable throwable, @Nullable IScope scope, @Nullable Hint hint) Captures the exception.default @NotNull SentryId
captureMessage
(@NotNull String message, @NotNull SentryLevel level) Captures the message.default @NotNull SentryId
captureMessage
(@NotNull String message, @NotNull SentryLevel level, @Nullable IScope scope) Captures the message.@NotNull SentryId
captureReplayEvent
(@NotNull SentryReplayEvent event, @Nullable IScope scope, @Nullable Hint hint) default void
captureSession
(@NotNull Session session) Captures a session.void
captureSession
(@NotNull Session session, @Nullable Hint 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 IScope scope, @Nullable Hint hint) Captures a transaction.default @NotNull SentryId
captureTransaction
(@NotNull SentryTransaction transaction, @Nullable TraceContext traceContext) Captures a transaction without scope nor hint.default @NotNull SentryId
captureTransaction
(@NotNull SentryTransaction transaction, @Nullable TraceContext traceContext, @Nullable IScope scope, @Nullable Hint hint) Captures a transaction.@NotNull SentryId
captureTransaction
(@NotNull SentryTransaction transaction, @Nullable TraceContext traceContext, @Nullable IScope scope, @Nullable Hint hint, @Nullable ProfilingTraceData profilingTraceData) 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
close
(boolean isRestarting) 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.@NotNull IMetricsAggregator
@Nullable RateLimiter
boolean
Whether the client is enabled or notdefault boolean
-
Method Details
-
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 IScope scope, @Nullable @Nullable Hint 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. -
close
void close(boolean isRestarting) Flushes out the queue for up to timeout seconds and disable the client.- Parameters:
isRestarting
- if true, avoids locking the main thread when finishing the queue.
-
flush
void flush(long timeoutMillis) Flushes events queued up, but keeps the client enabled. Not implemented yet.- Parameters:
timeoutMillis
- time in milliseconds
-
captureEvent
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 IScope 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 Hint 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 String message, @NotNull @NotNull SentryLevel level, @Nullable @Nullable IScope 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 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
Captures the exception.- Parameters:
throwable
- The exception.- Returns:
- The Id (SentryId object) of the event
-
captureException
@NotNull default @NotNull SentryId captureException(@NotNull @NotNull Throwable throwable, @Nullable @Nullable IScope scope, @Nullable @Nullable Hint 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 Throwable throwable, @Nullable @Nullable Hint 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 Throwable throwable, @Nullable @Nullable IScope 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
-
captureReplayEvent
@NotNull @NotNull SentryId captureReplayEvent(@NotNull @NotNull SentryReplayEvent event, @Nullable @Nullable IScope scope, @Nullable @Nullable Hint hint) -
captureUserFeedback
Captures a manually created user feedback and sends it to Sentry.- Parameters:
userFeedback
- The user feedback to send to Sentry.
-
captureSession
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
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 Hint 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
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 IScope scope, @Nullable @Nullable Hint 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 default @NotNull SentryId captureTransaction(@NotNull @NotNull SentryTransaction transaction, @Nullable @Nullable TraceContext traceContext, @Nullable @Nullable IScope scope, @Nullable @Nullable Hint 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 @Internal @NotNull SentryId captureTransaction(@NotNull @NotNull SentryTransaction transaction, @Nullable @Nullable TraceContext traceContext, @Nullable @Nullable IScope scope, @Nullable @Nullable Hint hint, @Nullable @Nullable ProfilingTraceData profilingTraceData) Captures a transaction.- Parameters:
transaction
- theITransaction
to sendtraceContext
- the trace contextscope
- An optional scope to be applied to the event.hint
- SDK specific but provides high level information about the origin of the eventprofilingTraceData
- An optional profiling trace data captured during the transaction- Returns:
- The Id (SentryId object) of the event
-
captureTransaction
@Internal @NotNull default @NotNull SentryId captureTransaction(@NotNull @NotNull SentryTransaction transaction, @Nullable @Nullable TraceContext traceContext) Captures a transaction without scope nor hint.- Parameters:
transaction
- theITransaction
to sendtraceContext
- the trace context- 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
-
captureCheckIn
-
getRateLimiter
-
isHealthy
@Internal default boolean isHealthy() -
getMetricsAggregator
-