Skip to content

Releases: statsig-io/ruby-sdk

v1.29.0-beta.1 - User persistent storage adapter for sticky experiments

11 Nov 00:45
49f94fd

Choose a tag to compare

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

03 Nov 22:33
49f94fd

Choose a tag to compare

  • Filter segments from the client_initialize_response which have since been removed from /initialize as a. optimization
  • Add user_hash to client_initialize_response for 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

25 Aug 21:16
5950e4c

Choose a tag to compare

  • 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

27 Jul 03:24
0aabbbc

Choose a tag to compare

  • 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

21 Jun 17:33
562a3b9

Choose a tag to compare

  • 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

01 Jun 18:47
0dcdafb

Choose a tag to compare

Updated the SDK version in statsig_metadata

v1.25.0 - Optimize initialize & Option to override retry limit & backoff

25 May 20:19
429512f

Choose a tag to compare

  • 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

11 May 20:44
7f1271e

Choose a tag to compare

  • 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

03 Apr 22:12
8f79852

Choose a tag to compare

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

30 Mar 20:53

Choose a tag to compare

ID lists are saved to the adapter as a Ruby String type instead of HTTP::Response