splitclient-rb 8.1.1.pre.rc1-java → 8.1.1.pre.rc3-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65df520f1b7bf309939a0d76f812232de6301c19
4
- data.tar.gz: af088bd08046f2296332024e2d103f1c441aa70f
3
+ metadata.gz: 1b7267b451ab9817944e3b73014b045ede7a2bab
4
+ data.tar.gz: 24c5e8ac0e02222b5e84d1fb881df06c4cd2d881
5
5
  SHA512:
6
- metadata.gz: b82cefc43c9bf6723deae28fc239f7202dd2624e40186f177e59063df0a633087ec2f22c0866676bd538e155e2dc4e1c616c62d6c6fd19c10d47e0d6ca47e50b
7
- data.tar.gz: 5d335864f28a51d7a53bdca2b06547888cf56ab8a5846771d02b2906c1522f27077602da70164c8feb76605cb65933ad0d21c6309acf581460461198d1f10798
6
+ metadata.gz: 96bff12734a1b1a01df634285f70a0ee044efb2d3a1cb8c1adc7eb077de61acff6bfcfc1ddb0e1a40ae8ccd83ae77c8377b8e658f69fdf0ccd872b5a7819bff1
7
+ data.tar.gz: 5e1a4903c97ae774073108938fa979442543d983165e8c708335eed3b124af6351407e26bdfd3cb21049d8f1b66aa97bae3576f3f407c81945188220df28a08c
data/CHANGES.txt CHANGED
@@ -1,5 +1,10 @@
1
1
  CHANGES
2
2
 
3
+ 8.1.1 (Mar 17, 2023)
4
+ - Added retries with backoff when the sdk tries to connect to the Streaming service and it is not available.
5
+ - Updated the way that the sdk write mtks in redis.
6
+ - Fixed calculation of timeUntilReady in telemetry.
7
+
3
8
  8.1.0 (Oct 5, 2022)
4
9
  - Added a new impressions mode for the SDK called NONE , to be used in factory when there is no desire to capture impressions on an SDK factory to feed Split's analytics engine. Running NONE mode, the SDK will only capture unique keys evaluated for a particular feature flag instead of full blown impressions.
5
10
 
@@ -99,7 +99,7 @@ module SplitIoClient
99
99
  alias find_sets_by_prefix find_strings_by_prefix
100
100
 
101
101
  def add_to_set(key, val)
102
- @redis.sadd(key, val)
102
+ @redis.sadd?(key, val)
103
103
  end
104
104
 
105
105
  def delete_from_set(key, val)
@@ -12,14 +12,11 @@ module SplitIoClient
12
12
  end
13
13
 
14
14
  def record_uniques_key(uniques)
15
- return if uniques.nil? || uniques == {}
15
+ return if uniques.nil? || uniques.empty?
16
16
 
17
- size = 0
18
- uniques.each do |key, value|
19
- size = @adapter.add_to_queue(unique_keys_key, { f: key, ks: value.to_a }.to_json)
20
- end
17
+ size = @adapter.add_to_queue(unique_keys_key, uniques_formatter(uniques))
21
18
 
22
- @adapter.expire(unique_keys_key, EXPIRE_SECONDS) if uniques.length == size
19
+ @adapter.expire(unique_keys_key, EXPIRE_SECONDS) if uniques.length == size.last
23
20
  rescue StandardError => e
24
21
  @config.log_found_exception(__method__.to_s, e)
25
22
  end
@@ -47,6 +44,18 @@ module SplitIoClient
47
44
  @adapter.expire(impressions_count_key, EXPIRE_SECONDS) if impressions_count.size == hlen && (pipeline_result.sum - hlen) == total_count
48
45
  end
49
46
 
47
+ def uniques_formatter(uniques)
48
+ to_return = []
49
+ uniques.each do |key, value|
50
+ to_return << {
51
+ f: key,
52
+ ks: value.to_a
53
+ }.to_json
54
+ end
55
+
56
+ to_return
57
+ end
58
+
50
59
  def impressions_count_key
51
60
  "#{@config.redis_namespace}.impressions.count"
52
61
  end
@@ -117,7 +117,7 @@ module SplitIoClient
117
117
 
118
118
  @counter_refresh_rate = SplitConfig.default_counter_refresh_rate(@cache_adapter)
119
119
 
120
- @sdk_start_time = Time.now
120
+ @sdk_start_time = Time.now.to_f
121
121
 
122
122
  @on_demand_fetch_retry_delay_seconds = SplitConfig.default_on_demand_fetch_retry_delay_seconds
123
123
  @on_demand_fetch_max_retries = SplitConfig.default_on_demand_fetch_max_retries
@@ -13,9 +13,10 @@ module SplitIoClient
13
13
  # s: sdkUrl, e: eventsUrl, a: authUrl, st: streamUrl, t: telemetryUrl
14
14
  UrlOverrides = Struct.new(:s, :e, :a, :st, :t)
15
15
 
16
- # om: operationMode, se: streamingEnabled, st: storage, rr: refreshRate, uo: urlOverrides, iq: impressionsQueueSize,
17
- # eq: eventsQueueSize, im: impressionsMode, il: impressionListenerEnabled, hp: httpProxyDetected, af: activeFactories,
18
- # rf: redundantActiveFactories, tr: timeUntilSdkReady, bt: burTimeouts, nr: sdkNotReadyUsage, t: tags, i: integrations
16
+ # om: operationMode, st: storage, af: activeFactories, rf: redundantActiveFactories, t: tags, se: streamingEnabled,
17
+ # rr: refreshRate, uo: urlOverrides, iq: impressionsQueueSize, eq: eventsQueueSize, im: impressionsMode,
18
+ # il: impressionListenerEnabled, hp: httpProxyDetected, tr: timeUntilSdkReady, bt: burTimeouts,
19
+ # nr: sdkNotReadyUsage, i: integrations
19
20
  ConfigInit = Struct.new(:om, :st, :af, :rf, :t, :se, :rr, :uo, :iq, :eq, :im, :il, :hp, :tr, :bt, :nr, :i)
20
21
 
21
22
  # ls: lastSynchronization, ml: clientMethodLatencies, me: clientMethodExceptions, he: httpErros, hl: httpLatencies,
@@ -56,6 +56,7 @@ module SplitIoClient
56
56
 
57
57
  active_factories ||= SplitIoClient.split_factory_registry.active_factories
58
58
  redundant_active_factories ||= SplitIoClient.split_factory_registry.redundant_active_factories
59
+ time_until_ready ||= ((Time.now.to_f - @config.sdk_start_time) * 1000.0).to_i
59
60
 
60
61
  init_config = ConfigInit.new(mode,
61
62
  'memory',
@@ -70,7 +71,7 @@ module SplitIoClient
70
71
  impressions_mode,
71
72
  !@config.impression_listener.nil?,
72
73
  http_proxy_detected?,
73
- time_until_ready || Time.now.to_i - @config.sdk_start_time.to_i,
74
+ time_until_ready,
74
75
  @telemetry_init_consumer.bur_timeouts,
75
76
  @telemetry_init_consumer.non_ready_usages)
76
77
 
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '8.1.1.pre.rc1'
2
+ VERSION = '8.1.1.pre.rc3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splitclient-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.1.pre.rc1
4
+ version: 8.1.1.pre.rc3
5
5
  platform: java
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-15 00:00:00.000000000 Z
11
+ date: 2023-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement