public class SentryOptions
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
SentryOptions.BeforeBreadcrumbCallback
The BeforeBreadcrumb callback
|
static interface |
SentryOptions.BeforeSendCallback
The BeforeSend callback
|
Constructor and Description |
---|
SentryOptions()
SentryOptions ctor It adds and set default things
|
Modifier and Type | Method and Description |
---|---|
void |
addEventProcessor(@NotNull EventProcessor eventProcessor)
Adds an event processor
|
void |
addInAppExclude(@NotNull java.lang.String exclude)
Adds an inApp exclude
|
void |
addInAppInclude(@NotNull java.lang.String include)
Adds an inApp include
|
void |
addIntegration(@NotNull Integration integration)
Adds an integration
|
@Nullable SentryOptions.BeforeBreadcrumbCallback |
getBeforeBreadcrumb()
Returns the beforeBreadcrumb callback
|
@Nullable SentryOptions.BeforeSendCallback |
getBeforeSend()
Returns the BeforeSend callback
|
@Nullable java.lang.String |
getCacheDirPath()
Returns the cache dir.
|
int |
getCacheDirSize()
Returns the cache dir.
|
int |
getConnectionTimeoutMillis()
Returns the connection timeout in milliseconds.
|
@NotNull SentryLevel |
getDiagnosticLevel()
Returns the minimum LogLevel
|
@Nullable java.lang.String |
getDist()
Sets the distribution
|
java.lang.String |
getDistinctId()
Returns the distinct Id
|
@Nullable java.lang.String |
getDsn()
Returns the DSN
|
@Nullable java.lang.String |
getEnvironment()
Returns the environment
|
@NotNull java.util.List<EventProcessor> |
getEventProcessors()
Returns the list of event processors
|
long |
getFlushTimeoutMillis()
Returns the flush timeout in millis
|
@NotNull java.util.List<java.lang.String> |
getInAppExcludes()
the list of inApp excludes
|
@NotNull java.util.List<java.lang.String> |
getInAppIncludes()
Returns the inApp includes list
|
@NotNull java.util.List<Integration> |
getIntegrations()
Returns the list of integrations
|
@NotNull ILogger |
getLogger()
Returns the Logger interface
|
int |
getMaxBreadcrumbs()
Returns the max Breadcrumbs Default is 100
|
@Nullable java.lang.String |
getOutboxPath()
Returns the outbox path if cacheDirPath is set
|
@Nullable java.net.Proxy |
getProxy()
Returns the proxy if set
|
int |
getReadTimeoutMillis()
Returns the read timeout in milliseconds
|
@Nullable java.lang.String |
getRelease()
Returns the release
|
@Nullable java.lang.Double |
getSampleRate()
Returns the sample rate Default is null (disabled)
|
@Nullable java.lang.String |
getSentryClientName()
Returns the Sentry client name
|
@NotNull ISerializer |
getSerializer()
Returns the Serializer interface
|
@Nullable java.lang.String |
getServerName()
Gets the default server name to be used in Sentry events.
|
int |
getSessionsDirSize()
Returns the sessions dir size
|
@Nullable java.lang.String |
getSessionsPath()
Returns the sessions path if cacheDirPath is set
|
long |
getSessionTrackingIntervalMillis()
Returns the session tracking interval in millis
|
long |
getShutdownTimeout()
Returns the shutdown timeout in Millis
|
@Nullable ITransport |
getTransport()
Returns the Transport interface
|
@Nullable ITransportGate |
getTransportGate()
Returns the TransportGate interface
|
boolean |
isAttachStacktrace()
Checks if the AttachStacktrace is enabled or not
|
boolean |
isAttachThreads()
Checks if the AttachThreads is enabled or not
|
boolean |
isBypassSecurity()
Returns whether to ignore TLS errors
|
boolean |
isDebug()
Check if debug mode is ON Default is OFF
|
boolean |
isEnableNdk()
Check if NDK is ON or OFF Default is ON
|
boolean |
isEnableSessionTracking()
Returns if the automatic session tracking is enabled or not
|
boolean |
isEnableUncaughtExceptionHandler()
Checks if the default UncaughtExceptionHandlerIntegration is enabled or not.
|
void |
setAttachStacktrace(boolean attachStacktrace)
Sets the attachStacktrace to enabled or disabled
|
void |
setAttachThreads(boolean attachThreads)
Sets the attachThreads to enabled or disabled
|
void |
setBeforeBreadcrumb(@Nullable SentryOptions.BeforeBreadcrumbCallback beforeBreadcrumb)
Sets the beforeBreadcrumb callback
|
void |
setBeforeSend(@Nullable SentryOptions.BeforeSendCallback beforeSend)
Sets the beforeSend callback
|
void |
setBypassSecurity(boolean bypassSecurity)
Sets whether to ignore TLS errors
|
void |
setCacheDirPath(@Nullable java.lang.String cacheDirPath)
Sets the cache dir.
|
void |
setCacheDirSize(int cacheDirSize)
Sets the cache dir.
|
void |
setConnectionTimeoutMillis(int connectionTimeoutMillis)
Sets the connection timeout in milliseconds.
|
void |
setDebug(boolean debug)
Sets the debug mode to ON or OFF Default is OFF
|
void |
setDiagnosticLevel(@Nullable SentryLevel diagnosticLevel)
Sets the minimum LogLevel if null, it uses the default min.
|
void |
setDist(@Nullable java.lang.String dist)
Sets the distribution
|
void |
setDistinctId(java.lang.String distinctId)
Sets the distinct Id
|
void |
setDsn(@Nullable java.lang.String dsn)
Sets the DSN
|
void |
setEnableNdk(boolean enableNdk)
Sets NDK to ON or OFF
|
void |
setEnableSessionTracking(boolean enableSessionTracking)
Enable or disable the automatic session tracking
|
void |
setEnableUncaughtExceptionHandler(boolean enableUncaughtExceptionHandler)
Enable or disable the default UncaughtExceptionHandlerIntegration.
|
void |
setEnvironment(@Nullable java.lang.String environment)
Sets the environment
|
void |
setFlushTimeoutMillis(long flushTimeoutMillis)
Sets the flush timeout in millis
|
void |
setLogger(@Nullable ILogger logger)
Sets the Logger interface if null, logger will be NoOp
|
void |
setMaxBreadcrumbs(int maxBreadcrumbs)
Sets the max breadcrumbs Default is 100
|
void |
setProxy(@Nullable java.net.Proxy proxy)
Sets the proxy
|
void |
setReadTimeoutMillis(int readTimeoutMillis)
Sets the read timeout in milliseconds
|
void |
setRelease(@Nullable java.lang.String release)
Sets the release
|
void |
setSampleRate(java.lang.Double sampleRate)
Sets the sampleRate Can be anything between 0.01 and 1.0 or null (default), to disable it.
|
void |
setSentryClientName(@Nullable java.lang.String sentryClientName)
Sets the Sentry client name
|
void |
setSerializer(@Nullable ISerializer serializer)
Sets the Serializer interface if null, Serializer will be NoOp
|
void |
setServerName(@Nullable java.lang.String serverName)
Sets the default server name to be used in Sentry events.
|
void |
setSessionsDirSize(int sessionsDirSize)
Sets the sessions dir size
|
void |
setSessionTrackingIntervalMillis(long sessionTrackingIntervalMillis)
Sets the session tracking interval in millis
|
void |
setShutdownTimeout(long shutdownTimeoutMillis)
Sets the shutdown timeout in Millis Default is 2000 = 2s
|
void |
setTransport(@Nullable ITransport transport)
Sets the Transport interface
|
void |
setTransportGate(@Nullable ITransportGate transportGate)
Sets the TransportGate interface
|
public SentryOptions()
public void addEventProcessor(@NotNull @NotNull EventProcessor eventProcessor)
eventProcessor
- the event processor@NotNull public @NotNull java.util.List<EventProcessor> getEventProcessors()
public void addIntegration(@NotNull @NotNull Integration integration)
integration
- the integration@NotNull public @NotNull java.util.List<Integration> getIntegrations()
@Nullable public @Nullable java.lang.String getDsn()
public void setDsn(@Nullable @Nullable java.lang.String dsn)
dsn
- the DSNpublic boolean isDebug()
public void setDebug(boolean debug)
debug
- true if ON or false otherwise@NotNull public @NotNull ILogger getLogger()
public void setLogger(@Nullable @Nullable ILogger logger)
logger
- the logger interface@NotNull public @NotNull SentryLevel getDiagnosticLevel()
public void setDiagnosticLevel(@Nullable @Nullable SentryLevel diagnosticLevel)
diagnosticLevel
- the log level@NotNull public @NotNull ISerializer getSerializer()
public void setSerializer(@Nullable @Nullable ISerializer serializer)
serializer
- the serializerpublic boolean isEnableNdk()
public void setEnableNdk(boolean enableNdk)
enableNdk
- true if ON or false otherwisepublic long getShutdownTimeout()
public void setShutdownTimeout(long shutdownTimeoutMillis)
shutdownTimeoutMillis
- the shutdown timeout in millis@Nullable public @Nullable java.lang.String getSentryClientName()
public void setSentryClientName(@Nullable @Nullable java.lang.String sentryClientName)
sentryClientName
- the Sentry client name@Nullable public @Nullable SentryOptions.BeforeSendCallback getBeforeSend()
public void setBeforeSend(@Nullable @Nullable SentryOptions.BeforeSendCallback beforeSend)
beforeSend
- the beforeSend callback@Nullable public @Nullable SentryOptions.BeforeBreadcrumbCallback getBeforeBreadcrumb()
public void setBeforeBreadcrumb(@Nullable @Nullable SentryOptions.BeforeBreadcrumbCallback beforeBreadcrumb)
beforeBreadcrumb
- the beforeBreadcrumb callback@Nullable public @Nullable java.lang.String getCacheDirPath()
@Nullable public @Nullable java.lang.String getOutboxPath()
@Nullable public @Nullable java.lang.String getSessionsPath()
public void setCacheDirPath(@Nullable @Nullable java.lang.String cacheDirPath)
cacheDirPath
- the cache dir. pathpublic int getCacheDirSize()
public void setCacheDirSize(int cacheDirSize)
cacheDirSize
- the cache dir. sizepublic int getMaxBreadcrumbs()
public void setMaxBreadcrumbs(int maxBreadcrumbs)
maxBreadcrumbs
- the max breadcrumbs@Nullable public @Nullable java.lang.String getRelease()
public void setRelease(@Nullable @Nullable java.lang.String release)
release
- the release@Nullable public @Nullable java.lang.String getEnvironment()
public void setEnvironment(@Nullable @Nullable java.lang.String environment)
environment
- the environment@Nullable public @Nullable java.net.Proxy getProxy()
public void setProxy(@Nullable @Nullable java.net.Proxy proxy)
proxy
- the proxy@Nullable public @Nullable java.lang.Double getSampleRate()
public void setSampleRate(java.lang.Double sampleRate)
sampleRate
- the sample rate@NotNull public @NotNull java.util.List<java.lang.String> getInAppExcludes()
public void addInAppExclude(@NotNull @NotNull java.lang.String exclude)
exclude
- the inApp exclude module/package@NotNull public @NotNull java.util.List<java.lang.String> getInAppIncludes()
public void addInAppInclude(@NotNull @NotNull java.lang.String include)
include
- the inApp include module/package@Nullable public @Nullable ITransport getTransport()
public void setTransport(@Nullable @Nullable ITransport transport)
transport
- the transport@Nullable public @Nullable java.lang.String getDist()
public void setDist(@Nullable @Nullable java.lang.String dist)
dist
- the distribution@Nullable public @Nullable ITransportGate getTransportGate()
public void setTransportGate(@Nullable @Nullable ITransportGate transportGate)
transportGate
- the transport gatepublic boolean isAttachStacktrace()
public void setAttachStacktrace(boolean attachStacktrace)
attachStacktrace
- true if enabled or false otherwisepublic boolean isAttachThreads()
public void setAttachThreads(boolean attachThreads)
attachThreads
- true if enabled or false otherwisepublic boolean isEnableSessionTracking()
public void setEnableSessionTracking(boolean enableSessionTracking)
enableSessionTracking
- true if enabled or false otherwise@Nullable public @Nullable java.lang.String getServerName()
public void setServerName(@Nullable @Nullable java.lang.String serverName)
serverName
- the default server name or null if none should be usedpublic int getSessionsDirSize()
public void setSessionsDirSize(int sessionsDirSize)
sessionsDirSize
- the sessions dir sizepublic long getSessionTrackingIntervalMillis()
public void setSessionTrackingIntervalMillis(long sessionTrackingIntervalMillis)
sessionTrackingIntervalMillis
- the interval in millis@ApiStatus.Internal public java.lang.String getDistinctId()
@ApiStatus.Internal public void setDistinctId(java.lang.String distinctId)
distinctId
- the distinct Idpublic long getFlushTimeoutMillis()
public void setFlushTimeoutMillis(long flushTimeoutMillis)
flushTimeoutMillis
- the timeout in millispublic boolean isEnableUncaughtExceptionHandler()
public void setEnableUncaughtExceptionHandler(boolean enableUncaughtExceptionHandler)
enableUncaughtExceptionHandler
- true if enabled or false otherwise.public int getConnectionTimeoutMillis()
public void setConnectionTimeoutMillis(int connectionTimeoutMillis)
connectionTimeoutMillis
- the connectionTimeoutMillispublic int getReadTimeoutMillis()
public void setReadTimeoutMillis(int readTimeoutMillis)
readTimeoutMillis
- the readTimeoutMillispublic boolean isBypassSecurity()
public void setBypassSecurity(boolean bypassSecurity)
bypassSecurity
- the bypassSecurity