Releases: statsig-io/java-server-sdk
v1.2.0 - Adds exposure logging disabled APIs and layer overrides
Introduces the following new APIs
/**
* Stores a local layer override
*
* @param layerName the layer to override
* @param value the json value to override the config to
*/
overrideLayer(layerName: String, value: Map<String, Any>)
/**
* Removes the given gate override
*
* @param gateName
*/
removeGateOverride(gateName: String)
/**
* Removes the given config override
*
* @param configName
*/
removeConfigOverride(configName: String) {
if (checkInitialized()) {
statsigServer.removeConfigOverride(configName)
}
}
/**
* Removes the given layer override
*
* @param layerName
*/
removeLayerOverride(layerName: String)
Exposure Logging Disabled APIs
/**
* Get the boolean result of a gate, evaluated against a given user.
* Does not trigger an exposure event.
*
* @param user A StatsigUser object used for evaluation
* @param gateName The name of the gate being evaluated
*/
suspend fun checkGateWithExposureLoggingDisabled(user: StatsigUser, gateName: String): Boolean
// same, but java api
checkGateWithExposureLoggingDisabledAsync(user: StatsigUser, gateName: String): CompletableFuture<Boolean>
getConfigWithExposureLoggingDisabledAsync(
user: StatsigUser,
dynamicConfigName: String
): CompletableFuture<DynamicConfig> {
To trigger an exposure, call the non exposure logging disabled API, or use the manuallyLogGateExposure
manuallyLogConfigExposure
APIs
NOTE: layer exposure logging disabled checks and experiment exposure logging disabled checks already existed in the java server sdk
v1.1.0 - allow userID or customIDs, fix rulesUpdatedCallback for java clients,
-
Create a StatsigUser object with either a user ID or set of customIDs - see https://docs.statsig.com/messages/serverRequiredUserID for why these are required
-
updates the
rulesUpdatedCallback
signature to support java clients without leaking kotlinUnit
type -
No longer throw on uninitialized to clean up the API signature. Will log and return default values.
-
fully remove the
getLayerWithCustomExposureLogging
APIs deprecated in 1.0.0
v1.0.0 - moving to mavenCentral and deprecating apis
Removed getExperimentInLayerForUser
and getLayerWithCustomExposureLogging
APIs
The library will now only be available on mavenCentral.
To install the SDK, set the maven central repository
repositories {
mavenCentral()
}
and add the dependency:
implementation 'com.statsig:serversdk:1.0.0'
You can find the most up to date versions here: https://central.sonatype.dev/artifact/com.statsig/serversdk/1.0.0/versions
NOTE: you can remove maven { url 'https://jitpack.io' }
if statsig was the only library you got from jitpack
v0.19.3 - jitpack publish java 8 support
Merge pull request #11 from statsig-io/removemaven remove publish to maven central
v0.19.2 - support java 8
Merge pull request #108 from statsig-io/java8 Support java8
v0.19.1 - fix build for v0.19.0
Introduced several SDK internal optimizations, and a couple new options to configure rules and ids lists sync time.
Also exposed groupName in Layer and DynamicConfig classes
[Deprecated DO NOT USE] v1.18.1 - Expose override APIs to java
DO NOT USE THIS VERSION, the changes below are included in version 0.19.1+.
Add the static override APIs to Statsig to be accessible from java.
See also: https://github.com/statsig-io/java-server-sdk/releases/tag/v1.18.0
[Deprecated DO NOT USE] v1.18.0 - Add StatsigOptions.localMode. Add overrideGate/Config.
DO NOT USE THIS VERSION, the changes below are included in version 0.19.1+.
- Add
localMode
as an configurable option to StatsigOptions. When true, localMode means no network requests will be made. - Add overrideGate. For a given gate name, you can specify the return value.
- Add overrideConfig. For a given config name, you can specify the return value.
v0.17.0 - make some fields public on Layer object
Merge pull request #91 from statsig-io/make-layer-fields-public make some layer fields public
v0.16.2 - Fix bug with str_matches regex evaluation
Fix issue where str_matches was not correctly evaluating regular expressions passed down from the server.