Package io.sentry

Interface ISentryClient

All Known Implementing Classes:
SentryClient

public interface ISentryClient
Sentry Client interface
  • 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 event
      scope - 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

      @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 IScope scope)
      Captures the event.
      Parameters:
      event - the event
      scope - 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 event
      hint - 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

      @NotNull default @NotNull SentryId captureException(@NotNull @NotNull 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 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 event
      scope - 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
    • 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 Hint 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 event
      session - 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 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

      @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 IScope scope, @Nullable @Nullable Hint hint)
      Captures a transaction.
      Parameters:
      transaction - the ITransaction to send
      scope - 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 - the ITransaction to send
      scope - 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 - the ITransaction to send
      traceContext - the trace context
      scope - An optional scope to be applied to the event.
      hint - SDK specific but provides high level information about the origin of the event
      profilingTraceData - 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 - the ITransaction to send
      traceContext - 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 - the ITransaction to send
      Returns:
      The Id (SentryId object) of the event
    • captureCheckIn

      @NotNull @Experimental @NotNull SentryId captureCheckIn(@NotNull @NotNull CheckIn checkIn, @Nullable @Nullable IScope scope, @Nullable @Nullable Hint hint)
    • getRateLimiter

      @Internal @Nullable @Nullable RateLimiter getRateLimiter()
    • isHealthy

      @Internal default boolean isHealthy()
    • getMetricsAggregator

      @Internal @NotNull @NotNull IMetricsAggregator getMetricsAggregator()