Releases: statsig-io/ruby-sdk
v1.29.0-beta.1 - User persistent storage adapter for sticky experiments
Added an option to provide a custom storage adapter for user-persisted values IUserPersistentStorage. This allows the SDK the persist values for users in active experiments, in otherwords, run experiments with sticky bucketing.
Ruby gems pre-release version: https://rubygems.org/gems/statsig/versions/1.29.0.pre.beta.1
Warning
This is an experimental feature that may be subject to change.
Example usage
class DummyPersistentStorageAdapter < Statsig::Interfaces::IUserPersistentStorage
attr_accessor :store
def initialize
@store = {}
end
def load(key)
return nil unless @store&.key?(key)
@store[key]
end
def save(key, data)
@store[key] = data
end
end
...
Statsig.initialize(
'secret-key',
StatsigOptions.new(
user_persistent_storage: DummyPersistentStorageAdapter.new
)
)
user = StatsigUser.new({ 'userID' => 'test-123' })
exp = Statsig.get_experiment( # User gets saved to persisted storage
user,
'active_experiment',
Statsig::GetExperimentOptions.new(
user_persisted_values: Statsig.get_user_persisted_values(user, 'userID')
)
)
puts exp.group_name # 'Control'
exp = Statsig.get_experiment( # User evaluates using values from persisted storage
StatsigUser.new({'userID' => 'unknown'}),
'active_experiment',
Statsig::GetExperimentOptions.new(
user_persisted_values: Statsig.get_user_persisted_values(user, 'userID')
)
)
puts exp.group_name # 'Control'v1.28.0 - Filter segments from client_initialize_response
- Filter segments from the
client_initialize_responsewhich have since been removed from/initializeas a. optimization - Add
user_hashtoclient_initialize_responsefor bootstrap validation
Included In This Release
- d5b108b kenny-statsig
- Merge pull request #245 from statsig-io/filter-segments
- 4a33aeb Kenny Yi
- remove segments from secondary exposures
- 6ed87e3 kenny-statsig
- Merge pull request #244 from statsig-io/client-init-tests
- 7654a7e Kenny Yi
- re-enable client init tests
- 6c94e94 sroyal-statsig
- Merge pull request #243 from statsig-io/nest-hash-sort
- 6c63325 sroyal-statsig
- Nested Hash Sort
- e2f8786 sroyal-statsig
- Merge pull request #242 from statsig-io/bootstrap-user-hash
- c7c8286 sroyal-statsig
- update
- 4d4f1a8 sroyal-statsig
- Bootstrap User Hash
Full Changelog: v1.27.0...v1.28.0
v1.27.0 - Manual sync API
- Option to disable background syncing and expose an API to sync manually
- Add sampling for internal diagnostics
- Internally capture stack overflows
Full Changelog: v1.26.0...v1.27.0
v1.26.0 - Network connection pool & updates to client_initialize_response
- Connection pool for HTTP client to fix concurrency in log event requests.
- Add group name id type to get_client_initialize_response. And the ability to get a client initialize response for a target app. Add support for custom djb2 hashing.
- Fixed internal SDK exception logging for errors raised inside a background thread.
v1.25.2 - Diagnostics for core API & custom API for DCS
- Custom api option for DCS
- Diagnostics for core API
Full Changelog: v1.25.1...v1.25.2
v1.25.1 - Fix SDK version in statsig metadata
Updated the SDK version in statsig_metadata
v1.25.0 - Optimize initialize & Option to override retry limit & backoff
- Async initialize CountryLookup
- Async initialize UA parser
- Options for custom retry limit & retry backoff for post logs
- Updated default logger threadpool size
- Fix several test flakiness
v1.24.6 - Several bug fixes & optimizations
- Limit max thread pool used for posting log events
- Reduce retry count to prevent server overloading & option to configure this
- Validate user for get_client_initialize_response
- Optimize UA parser
v1.24.5 - Fix increment syntax
The previous version (1.24.4) was using incorrect syntax for integer increment causing a runtime error when handling exposure deduping.
v1.24.4 - Save id lists as String type
ID lists are saved to the adapter as a Ruby String type instead of HTTP::Response