Optional assignmentConfiguration for automatically tracking assignment events after an evaluation.
Optional bootstrap?: Record<string, FlagConfig>Bootstrap the client with a pre-fetched flag configurations.
Useful if you are managing the flag configurations separately.
Optional cohortOptional debug?: booleanuse this.logLevel Set to true to log some extra information to the console. When set to true, it overrides LogLevel to Debug.
Optional flagThe interval in milliseconds to poll the amplitude server for flag config updates. These rules stored in memory and used when calling evaluate() to perform local evaluation.
Default: 30000 (30 seconds)
Optional httpThe agent used to send http requests.
Optional instanceInstance names support difference singleton isntance configurations for the same api key.
Optional logSet the base log level output for the ExperimentClient. Defaults to LogLevel.Error
Optional loggerConfigures a logger for warnings and errors generated by the SDK. The logger can be any object that conforms to the LoggerProvider interface.
Optional serverThe server endpoint from which to request flags. For hitting the EU data center, use serverZone. Setting this value will override serverZone defaults.
Optional serverSelect the Amplitude data center to get flags and variants from, us or eu.
Optional streamTo use with streaming. The timeout for a single attempt of establishing a valid stream of flag configs. The time starts at making request and ends when received the initial flag configs.
Optional streamThe stream server endpoint from which to stream data.
Optional streamTo use streaming API or polling. With streaming, flag config updates are received immediately, no polling is necessary. If stream fails for any reason, it will fallback to polling automatically. Default will be false, using poller.
Configuration for the LocalEvaluationClient