Package io.sentry
Interface ISentryClient
- All Known Implementing Classes:
SentryClient
public interface ISentryClient
Sentry Client interface
-
Method Summary
Modifier and TypeMethodDescription@NotNull SentryIdcaptureCheckIn(@NotNull CheckIn checkIn, @Nullable Scope scope, @Nullable Hint hint) default @Nullable SentryIdcaptureEnvelope(@NotNull SentryEnvelope envelope) Captures an envelope.@Nullable SentryIdcaptureEnvelope(@NotNull SentryEnvelope envelope, @Nullable Hint hint) Captures an envelope.default @NotNull SentryIdcaptureEvent(@NotNull SentryEvent event) Captures the event.default @NotNull SentryIdcaptureEvent(@NotNull SentryEvent event, @Nullable Hint hint) Capture the eventdefault @NotNull SentryIdcaptureEvent(@NotNull SentryEvent event, @Nullable Scope scope) Captures the event.@NotNull SentryIdcaptureEvent(@NotNull SentryEvent event, @Nullable Scope scope, @Nullable Hint hint) Capture the eventdefault @NotNull SentryIdcaptureException(@NotNull Throwable throwable) Captures the exception.default @NotNull SentryIdcaptureException(@NotNull Throwable throwable, @Nullable Hint hint) Captures the exception.default @NotNull SentryIdcaptureException(@NotNull Throwable throwable, @Nullable Scope scope) Captures the exception.default @NotNull SentryIdcaptureException(@NotNull Throwable throwable, @Nullable Scope scope, @Nullable Hint hint) Captures the exception.default @NotNull SentryIdcaptureMessage(@NotNull String message, @NotNull SentryLevel level) Captures the message.default @NotNull SentryIdcaptureMessage(@NotNull String message, @NotNull SentryLevel level, @Nullable Scope scope) Captures the message.default voidcaptureSession(@NotNull Session session) Captures a session.voidcaptureSession(@NotNull Session session, @Nullable Hint hint) Captures a session.default @NotNull SentryIdcaptureTransaction(@NotNull SentryTransaction transaction) Captures a transaction without scope nor hint.default @NotNull SentryIdcaptureTransaction(@NotNull SentryTransaction transaction, @Nullable Scope scope, @Nullable Hint hint) Captures a transaction.default @NotNull SentryIdcaptureTransaction(@NotNull SentryTransaction transaction, @Nullable TraceContext traceContext) Captures a transaction without scope nor hint.default @NotNull SentryIdcaptureTransaction(@NotNull SentryTransaction transaction, @Nullable TraceContext traceContext, @Nullable Scope scope, @Nullable Hint hint) Captures a transaction.@NotNull SentryIdcaptureTransaction(@NotNull SentryTransaction transaction, @Nullable TraceContext traceContext, @Nullable Scope scope, @Nullable Hint hint, @Nullable ProfilingTraceData profilingTraceData) Captures a transaction.voidcaptureUserFeedback(@NotNull UserFeedback userFeedback) Captures a manually created user feedback and sends it to Sentry.voidclose()Flushes out the queue for up to timeout seconds and disable the client.voidflush(long timeoutMillis) Flushes events queued up, but keeps the client enabled.booleanWhether the client is enabled or not
-
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 Scope 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. -
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 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 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 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 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 Scope 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 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
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 Scope scope, @Nullable @Nullable Hint hint) Captures a transaction.- Parameters:
transaction- theITransactionto 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 Scope scope, @Nullable @Nullable Hint hint) Captures a transaction.- Parameters:
transaction- theITransactionto 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 Scope scope, @Nullable @Nullable Hint hint, @Nullable @Nullable ProfilingTraceData profilingTraceData) Captures a transaction.- Parameters:
transaction- theITransactionto 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- theITransactionto 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- theITransactionto send- Returns:
- The Id (SentryId object) of the event
-
captureCheckIn
-