Class TrackingPluginConfig

java.lang.Object
growthbook.sdk.java.plugin.tracking.TrackingPluginConfig

public final class TrackingPluginConfig extends Object
Configuration for GrowthBookTrackingPlugin. Defaults mirror the GrowthBook Go SDK: POST {ingestorHost}/events, batch size 100, flush every 10 seconds.

Settings with defaults are exposed only through their resolved*() accessors so callers always read the effective value; the raw nullable fields are intentionally not exposed.

  • Field Details

    • DEFAULT_INGESTOR_HOST

      public static final String DEFAULT_INGESTOR_HOST
      See Also:
    • DEFAULT_BATCH_SIZE

      public static final int DEFAULT_BATCH_SIZE
      See Also:
    • MAX_BATCH_SIZE

      public static final int MAX_BATCH_SIZE
      See Also:
    • DEFAULT_BATCH_TIMEOUT

      public static final Duration DEFAULT_BATCH_TIMEOUT
    • DEFAULT_CLOSE_TIMEOUT

      public static final Duration DEFAULT_CLOSE_TIMEOUT
  • Method Details

    • resolvedIngestorHost

      public String resolvedIngestorHost()
    • resolvedBatchSize

      public int resolvedBatchSize()
    • resolvedBatchTimeout

      public Duration resolvedBatchTimeout()
    • resolvedCloseTimeout

      public Duration resolvedCloseTimeout()
    • builder

    • getClientKey

      @Nullable public String getClientKey()
      Client key (SDK connection key). If blank the plugin becomes a no-op — it will not make HTTP requests but GrowthBookTrackingPlugin.close() still completes cleanly.
    • getHttpClient

      @Nullable public okhttp3.OkHttpClient getHttpClient()
      Optional HTTP client override. Defaults to a fresh OkHttpClient.
    • getFlushExecutor

      @Nullable public Executor getFlushExecutor()
      Optional executor used to POST batches off the caller thread. Defaults to a single-thread daemon executor created by the plugin.