Package 

Class FlagsConfiguration.Builder

    • Constructor Detail

      • FlagsConfiguration.Builder

        FlagsConfiguration.Builder()
    • Method Detail

      • trackExposures

         final FlagsConfiguration.Builder trackExposures(Boolean enabled)

        Sets whether exposures should be logged to the dedicated exposures intake endpoint. This is enabled by default.

        Parameters:
        enabled - Whether to enable exposure logging.
      • trackEvaluations

         final FlagsConfiguration.Builder trackEvaluations(Boolean enabled)

        Sets whether evaluations should be logged to the dedicated evaluations intake endpoint.

        Evaluation logging captures aggregated metrics about all flag evaluations, including frequency, default values, and errors. This is enabled by default.

        Parameters:
        enabled - Whether to enable evaluation logging (default: true).
      • useCustomExposureEndpoint

         final FlagsConfiguration.Builder useCustomExposureEndpoint(String endpoint)

        Sets a custom endpoint URL for sending exposure events.

        By default, exposure events are sent to the standard OpenObserve intake endpoint. Use this method to override the endpoint URL for testing or proxy purposes.

        Parameters:
        endpoint - The custom endpoint URL to use for exposure event uploads.
      • useCustomEvaluationEndpoint

         final FlagsConfiguration.Builder useCustomEvaluationEndpoint(String endpoint)

        Sets a custom endpoint URL for sending evaluation events.

        By default, evaluation events are sent to the standard OpenObserve intake endpoint. Use this method to override the endpoint URL for testing or proxy purposes.

        Parameters:
        endpoint - The custom endpoint URL to use for evaluation event uploads.
      • evaluationFlushInterval

         final FlagsConfiguration.Builder evaluationFlushInterval(Long intervalMs)

        Sets the flush interval for aggregated evaluation events.

        Evaluation events are aggregated and flushed periodically. Values outside the valid range (1-60 seconds) will be coerced to the nearest bound.

        Parameters:
        intervalMs - The flush interval in milliseconds (default: 10,000ms = 10 seconds).
      • useCustomFlagEndpoint

         final FlagsConfiguration.Builder useCustomFlagEndpoint(String endpoint)

        Sets a custom endpoint URL for fetching precomputed flag assignments. If not called, flag assignments will be fetched from OpenObserve's default endpoint.

        Parameters:
        endpoint - The full endpoint URL, e.g., https://o2-flags-proxy.example.com/flags.
      • rumIntegrationEnabled

         final FlagsConfiguration.Builder rumIntegrationEnabled(Boolean enabled)

        Sets whether RUM evaluation logging is enabled. This adds the result of evaluating a feature flag to the view. Enabled by default.

        Parameters:
        enabled - whether flag evaluations are added to views in RUM.
      • gracefulModeEnabled

         final FlagsConfiguration.Builder gracefulModeEnabled(Boolean enabled)

        Configures error handling behavior in debug builds.

        Controls how the SDK responds to misuse errors like duplicate client creation or accessing non-existent clients.

        This setting has no impact on release builds. Release builds will always fail "gracefully".

        • Debug (gracefulModeEnabled == false): Crashes immediately to catch errors early

        • Debug (gracefulModeEnabled == true): Logs to Android Logcat at ERROR level

        • Release: Always uses graceful mode regardless of this setting

        Parameters:
        enabled - Whether to enable graceful mode in debug builds (default: true)