Releases: statsig-io/java-server-sdk
v0.15.0 - [internal] Adds error boundary and concurrency tests
Internal updates:
Adds test cases for using the SDK in multiple threads
Adds error boundary to catch exceptions, log to statsig, and return default values to handle potential failures
Fixes the not_in_segment_list condition (which is currently unused, but could be used in the future)
v0.14.2 - bootstrap options and getLayer API with custom logging
You can now bootstrap the java server SDK with a previous set of rules for you gates and configs via two new options in StatsigOptions
:
bootstrapValues: String?
rulesUpdatedCallback: ((rules: String) -> Unit)?
bootstrapValues
- a string that represents all rules for all feature gates, dynamic configs and experiments. It can be provided to bootstrap the Statsig server SDK at initialization in case your server runs into network issue or Statsig server is down temporarily.
rulesUpdatedCallback
- a callback function that's called whenever we have an update for the rules; it's called with a logical timestamp and a JSON string (used as is for bootstrapValues mentioned above).
Also added a new API getLayerWithCustomExposureLogging
to for customers to get a Layer object without automatic exposure loggings. The onExposure
parameter on the function allows you to pass your own handler to handle exposure loggings.
v0.14.0 - Add support for StatsigOptions.bootstrapValues
Merge pull request #72 from statsig-io/v0.14.0 v0.14.0
v0.13.1 - temporarily expose value field on Layer object
this is a temporary release only, do not depend on this field being available for future releases
v0.13.0 - add API getLayerWithExposureLoggingDisabled
This is a temporary API that will be removed in a later release, do NOT depend on it!
v0.12.0 - Add Support for Layers
Release Notes
- Introduces getLayer API to Statsig, adding the ability to get values via a Layer configuration set on the Statsig Console. See docs.statsig.com/layers
- Fixes a bug in
DynamicConfig.getDouble
- Improved the logic to sync id lists
Bug Insights - Unsafe Type Casting
We use GSON for parsing of JSON objects. By default, GSON treats all numbers as Double types. We had some unsafe casts in the SDK that convert Int as Double, if hit, it would have thrown a ClassCastException.
Impacted Versions: v0.11.0 and below
The SDK has been updated to correctly converts these values to the desired type.
v0.11.0 - 2 API changes related to experiment
- Added a new API
getExperimentWithExposureLoggingDisabled
. This does the same thing withgetExperiment
, except for that it does not log an exposure for the user. - Added logic to
getExperimentInLayerForUser
so that it takes overrides into account.
v0.10.0 - add API getExperimentInLayerForUser
- Added a new API
getExperimentInLayerForUser(user: StatsigUser, layerName: String, disableExposure: Boolean = false): DynamicConfig
, which returns aDynamicConfig
object representing the experiment's config that the user is in within the specified layer. - If the user is NOT allocated to any experiment, then the
getName()
function on theDynamicConfig
object will be an empty String. - by default this function will log an exposure for the experiment the user is in. This can be disabled by setting the 3rd parameter
disableExposure
to true. - The API is also available as
getExperimentInLayerForUserAsync
for Java.
v0.9.2 - support for ID lists and more
- added support for ID lists, see here on how to create one
- added a new
getExposureMetadata()
function toDynamicConfig
class for Statsig users to get metadata needed to log their own exposure events.
v0.8.2 group percentage to _getExperimentGroups API
We are changing the _getExperimentGroups
API due to customer request in this release. Instead of returning a Map<String, String>
, it now returns a Map<String, Map<String, Any>>
, where the value has 2 keys - "value" and "percent" - representing the name + values of the parameters (as a json string), and the split % for the group (as a Double).
Note that groups will include special groups like "Disabled", "Targeting" and "Layer Assignment", please ignore all these groups that are not your actual experiment groups as these are for internal evaluation purposes only.