Package 

Class Configuration.Builder

    • Constructor Detail

      • Configuration.Builder

        Configuration.Builder(String clientToken, String env, String variant, String service)
        Parameters:
        clientToken - your API key of type Client Token
        env - the environment name that will be sent with each event.
        variant - the variant of your application, which should be the value from your BuildConfig.FLAVOR constant if you have different flavors, empty string otherwise.
        service - the service name (if set to null, it'll be set to your application's package name, e.g.: com.example.
      • Configuration.Builder

        Configuration.Builder(String clientToken, String env, String variant)
        Parameters:
        clientToken - your API key of type Client Token
        env - the environment name that will be sent with each event.
        variant - the variant of your application, which should be the value from your BuildConfig.FLAVOR constant if you have different flavors, empty string otherwise.
      • Configuration.Builder

        Configuration.Builder(String clientToken, String env)
        Parameters:
        clientToken - your API key of type Client Token
        env - the environment name that will be sent with each event.
    • Method Detail

      • setUseDeveloperModeWhenDebuggable

         final Configuration.Builder setUseDeveloperModeWhenDebuggable(Boolean developerModeEnabled)

        Sets the Kubesense SDK to be more verbose when an application is set to debuggable. This is equivalent to setting: setSessionSampleRate(100) setBatchSize(BatchSize.SMALL) setUploadFrequency(UploadFrequency.FREQUENT) Kubesense.setVerbosity(Log.VERBOSE) These settings will override your configuration, but only when the application is debuggable

        Parameters:
        developerModeEnabled - Enable or disable extra debug info when an app is debuggable
      • setFirstPartyHosts

         final Configuration.Builder setFirstPartyHosts(List<String> hosts)

        Sets the list of first party hosts. Requests made to a URL with any one of these hosts (or any subdomain) will:

        • be considered a first party resource and categorised as such in your RUM dashboard;

        • be wrapped in a Span and have Kubesense trace id injected to get a full flame-graph in APM in case of OkHttp instrumentation usage.

        Parameters:
        hosts - a list of all the hosts that you own.
      • setFirstPartyHostsWithHeaderType

         final Configuration.Builder setFirstPartyHostsWithHeaderType(Map<String, Set<TracingHeaderType>> hostsWithHeaderType)

        Sets the list of first party hosts and specifies the type of HTTP headers used for distributed tracing. Requests made to a URL with any one of these hosts (or any subdomain) will:

        • be considered a first party resource and categorised as such in your RUM dashboard;

        • be wrapped in a Span and have trace id of the specified types injected to get a full flame-graph in APM. Multiple header types are supported for each host.

        Parameters:
        hostsWithHeaderType - a list of all the hosts that you own and the tracing headers to be used for each host.
      • setBatchSize

         final Configuration.Builder setBatchSize(BatchSize batchSize)

        Defines the batch size (impacts the size and number of requests performed by Kubesense).

        Parameters:
        batchSize - the desired batch size
      • setBatchProcessingLevel

         final Configuration.Builder setBatchProcessingLevel(BatchProcessingLevel batchProcessingLevel)

        Defines the Batch processing level, defining the maximum number of batches processed sequentially without a delay within one reading/uploading cycle.

        Parameters:
        batchProcessingLevel - the desired batch processing level.
      • setProxy

         final Configuration.Builder setProxy(Proxy proxy, Authenticator authenticator)

        Enables a custom proxy for uploading tracked data to Kubesense's intake.

        Parameters:
        proxy - the Proxy configuration
        authenticator - the optional Authenticator for the proxy
      • setCrashReportsEnabled

         final Configuration.Builder setCrashReportsEnabled(Boolean crashReportsEnabled)

        Allows to control if JVM crashes are tracked or not. Default value is true.

        Parameters:
        crashReportsEnabled - whether crashes are tracked and sent to Kubesense
      • setBackpressureStrategy

         final Configuration.Builder setBackpressureStrategy(BackPressureStrategy backpressureStrategy)

        Sets the strategy to handle scalability issues. Many operations (data processing, event I/O, …) are queued in background threads. This configuration lets one decide how to handle the edge case when the queue starts growing, which can lead to a lot of memory usage, delayed processing, and possibly OOM or ANR.

        Parameters:
        backpressureStrategy - the backpressure strategy (default strategy ignores new tasks if a queue reaches 1024 items)
      • setVersion

         final Configuration.Builder setVersion(String version)

        Sets the version name that will be used for all events sent to Kubesense. If not provided, the SDK will use the version from the application's package info.

        Parameters:
        version - the version name to use