You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
The key has expired.
Breaking Changes
Timeouts: connect_timeout and read_timeout options renamed to connect_timeout_milliseconds and read_timeout_milliseconds to indicate the unit of measure (#80)
Cache: The ConfigCache behaviour has been changed to store and retrieve String.t() cache entries (was previously a map()). This matches the new generalized cache implementation that is consistent for all ConfigCat SDKs. In addition, the format of the cache keys has been changed to be consistent with the other platforms. With these changes, you can now implement your own ConfigCache implementation in persistent storage (e.g. Redis) and share the cache amongst multiple language implementations. (#89)
Removed get_variation_id/get_all_variation_ids: These functions have been removed in favour of the new get_value_details/get_all_value_details functions (see below). (#97)
Remove on_changed callback: Auto mode's on_changed callback has been removed. Use the new Hooks feature instead (see below). (#99)
One instance per SDK key: When using multiple ConfigCat instances, each instance must be configured with a different SDK key. You must access all of your flags and settings through a single ConfigCat instance. (#108)
Lazy cache policy: cache_expiry_seconds option has been renamed to cache_refresh_interval_seconds. (#110)
Added
Default User: You can now possible to specify a default user to use when no user is passed to the various get_* functions. You can pass the default_user option when starting ConfigCat, or you can use ConfigCat.set_default_user/1 and ConfigCat.clear_default_user/0 to change the default user at any time. By default, there is no default user. (#80)
Online/Offline mode: You can now take ConfigCat offline to keep it from making HTTP calls to the ConfigCat server. When offline, ConfigCat will operate using its most recent cached config. You can pass the offline option when starting ConfigCat or you can use ConfigCat.set_offline/0 and ConfigCat.set_online/0 to toggle between online and offline mode. You can query the current state with ConfigCat.offline?/0. By default, ConfigCat is online. (#81)
get_value_details/get_all_value_details: Adds new get_value_details and get_all_value_details functions that return EvaluationDetails structs containing information about flag evaluations, including the key and value, whether or not the default value was returned, the user, the variation, and any matched rules. See the documentation for more details. (#96, #97)
Hooks: The new Hooks feature allows you to supply callback functions that are called by ConfigCat when significant events occur. See the documentation for more information. (#99)
Logger metadata: All log messages include two additional pieces of information (when available) both in the log messages and as Logger metadata. The instance_id property matches the name property you specify when configuring multiple ConfigCat instances (defaults to Elixir.ConfigCat). The event_id property is a numeric error code that is common to all of the ConfigCat language SDKs. If you want to use the metadata properties, you'll need to configure your Logger backend to include them. (#100)
max_init_wait_time_seconds option: Auto mode now has a max_init_wait_time_seconds option. When ConfigCat first starts up, any calls to the get_* functions will wait for this many seconds for the initial config fetch to occur. If the fetch does not complete in time, the existing cached config (if any) will be used. Otherwise, the call will return the default value. Default: 5 seconds. (#102)
Module-based multiple instances: If you need to run multiple instances of ConfigCat, you can now use new module-based approach. See the documentation for more information. (#104)
Changed
Use latest fetch time and ETag: The new generalized cache format (see above) now includes the time at which the config was last fetched as well as the cache-control ETag. ConfigCat now uses that fetch time when determining whether or not to fetch in Lazy mode and when to start polling in Auto mode and uses the last-received ETag when fetching. When using the default ConfigCache implementation, this behaviour is the same as it always was. But if you're using a persistent ConfigCache implementation, this means that ConfigCat can avoid re-fetching a new config when it starts up if the existing cached config is new enough and on the first fetch, the server can send back a 304 response if appropriate. (#90, #94)
force_refresh return value: ConfigCat.force_refresh/0 now returns {:error, String.t()} when it fails rather than leaking errors from HTTPoison. The typespec for that function has been tightened up accordingly. (#101)
Reduced server round-trips: When multiple processes attempt to fetch the config while a fetch is already in progress, all of the requests will be satisfied by the result of the in-progress fetch. Previously, each request would be serialized and result in a new request to the server. (#103)
Consistent log messages: Log messages are now consistent with the other SDKs, including the new event_id codes described above. (#105)
Consolidated evaluation log: When evaluating a flag, a number of debug-level messages are logged. These messages are now collected together into a single log entry. (#107)
Fixed
Last fetch time: When the server returns a 304 error, the last fetch time is now updated so that the next fetch request is delayed until the appropriate time. (#101)
Errors in local_only mode: When using the :local_onlyflag overrides setting, some of the ConfigCat calls would fail with confusing error message. These calls are now handled cleanly, returning an appropriate result. (#105)