Package io.sentry
Class SentryClient
java.lang.Object
io.sentry.SentryClient
- All Implemented Interfaces:
ISentryClient
-
Method Summary
Modifier and TypeMethodDescription@NotNull SentryIdcaptureEnvelope(@NotNull SentryEnvelope envelope, @Nullable Hint hint) Captures an envelope.@NotNull SentryIdcaptureEvent(@NotNull SentryEvent event, @Nullable Scope scope, @Nullable Hint hint) Capture the eventvoidcaptureSession(@NotNull Session session, @Nullable Hint hint) Captures a session.@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 notMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.sentry.ISentryClient
captureEnvelope, captureEvent, captureEvent, captureEvent, captureException, captureException, captureException, captureException, captureMessage, captureMessage, captureSession, captureTransaction, captureTransaction, captureTransaction, captureTransaction
-
Method Details
-
isEnabled
public boolean isEnabled()Description copied from interface:ISentryClientWhether the client is enabled or not- Specified by:
isEnabledin interfaceISentryClient- Returns:
- true if its enabled or false otherwise.
-
captureEvent
@NotNull public @NotNull SentryId captureEvent(@NotNull @NotNull SentryEvent event, @Nullable @Nullable Scope scope, @Nullable @Nullable Hint hint) Description copied from interface:ISentryClientCapture the event- Specified by:
captureEventin interfaceISentryClient- 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.
-
captureUserFeedback
Description copied from interface:ISentryClientCaptures a manually created user feedback and sends it to Sentry.- Specified by:
captureUserFeedbackin interfaceISentryClient- Parameters:
userFeedback- The user feedback to send to Sentry.
-
captureSession
@Internal public void captureSession(@NotNull @NotNull Session session, @Nullable @Nullable Hint hint) Description copied from interface:ISentryClientCaptures a session. This method transform a session to an envelope and forwards to captureEnvelope- Specified by:
captureSessionin interfaceISentryClient- Parameters:
session- the Sessionhint- 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 Hint hint) Description copied from interface:ISentryClientCaptures an envelope.- Specified by:
captureEnvelopein interfaceISentryClient- 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 TraceContext traceContext, @Nullable @Nullable Scope scope, @Nullable @Nullable Hint hint, @Nullable @Nullable ProfilingTraceData profilingTraceData) Description copied from interface:ISentryClientCaptures a transaction.- Specified by:
captureTransactionin interfaceISentryClient- 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
-
close
public void close()Description copied from interface:ISentryClientFlushes out the queue for up to timeout seconds and disable the client.- Specified by:
closein interfaceISentryClient
-
flush
public void flush(long timeoutMillis) Description copied from interface:ISentryClientFlushes events queued up, but keeps the client enabled. Not implemented yet.- Specified by:
flushin interfaceISentryClient- Parameters:
timeoutMillis- time in milliseconds
-