Package io.sentry

Class SentryClient

    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Description copied from interface: ISentryClient
        Whether the client is enabled or not
        Specified by:
        isEnabled in interface ISentryClient
        Returns:
        true if its enabled or false otherwise.
      • captureEvent

        @NotNull
        public @NotNull SentryId captureEvent​(@NotNull
                                              @NotNull SentryEvent event,
                                              @Nullable
                                              @Nullable Scope scope,
                                              @Nullable
                                              @Nullable java.lang.Object hint)
        Description copied from interface: ISentryClient
        Capture the event
        Specified by:
        captureEvent in interface ISentryClient
        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.
      • captureUserFeedback

        public void captureUserFeedback​(@NotNull
                                        @NotNull UserFeedback userFeedback)
        Description copied from interface: ISentryClient
        Captures a manually created user feedback and sends it to Sentry.
        Specified by:
        captureUserFeedback in interface ISentryClient
        Parameters:
        userFeedback - The user feedback to send to Sentry.
      • captureSession

        @Internal
        public void captureSession​(@NotNull
                                   @NotNull Session session,
                                   @Nullable
                                   @Nullable java.lang.Object hint)
        Description copied from interface: ISentryClient
        Captures a session. This method transform a session to an envelope and forwards to captureEnvelope
        Specified by:
        captureSession in interface ISentryClient
        Parameters:
        session - the Session
        hint - SDK specific but provides high level information about the origin of the event
      • captureEnvelope

        @Internal
        @NotNull
        public @NotNull SentryId captureEnvelope​(@NotNull
                                                 @NotNull SentryEnvelope envelope,
                                                 @Nullable
                                                 @Nullable java.lang.Object hint)
        Description copied from interface: ISentryClient
        Captures an envelope.
        Specified by:
        captureEnvelope in interface ISentryClient
        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
      • captureTransaction

        @NotNull
        public @NotNull SentryId captureTransaction​(@NotNull
                                                    @NotNull SentryTransaction transaction,
                                                    @Nullable
                                                    @Nullable TraceState traceState,
                                                    @Nullable
                                                    @Nullable Scope scope,
                                                    @Nullable
                                                    @Nullable java.lang.Object hint)
        Description copied from interface: ISentryClient
        Captures a transaction.
        Specified by:
        captureTransaction in interface ISentryClient
        Parameters:
        transaction - the ITransaction to send
        traceState - the trace state
        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

        public void close()
        Description copied from interface: ISentryClient
        Flushes out the queue for up to timeout seconds and disable the client.
        Specified by:
        close in interface ISentryClient
      • flush

        public void flush​(long timeoutMillis)
        Description copied from interface: ISentryClient
        Flushes events queued up, but keeps the client enabled. Not implemented yet.
        Specified by:
        flush in interface ISentryClient
        Parameters:
        timeoutMillis - time in milliseconds