Skip to content

Commit 95660cd

Browse files
committed
Fixed telemetry init format and applied latest patch code
1 parent 4e3448c commit 95660cd

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

CHANGES.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
9.2.2 (Dec 13, 2022)
2+
- Fixed RedisSenderAdapter instantiation to store mtk keys.
3+
4+
9.2.1 (Dec 2, 2022)
5+
- Changed redis record type for impressions counts from list using rpush to hashed key using hincrby.
6+
- Apply Timeout Exception when incorrect SDK API Key is used.
7+
- Changed potential initial fetching segment Warning to Debug in logging.
8+
9+
9.2.0 (Oct 14, 2022)
10+
- 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
11+
112
9.1.3 (July 25, 2022)
213
- Fixed synching missed segment(s) after receiving split update
314

splitio/client/factory.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,15 @@ def _start_status_updater(self):
152152
ready_updater.start()
153153
else:
154154
self._status = Status.READY
155-
#Push Config Telemetry into redis storage
156-
redundant_factory_count, active_factory_count = _get_active_and_redundant_count()
157-
self._telemetry_init_producer.record_active_and_redundant_factories(active_factory_count, redundant_factory_count)
155+
init_updater = threading.Thread(target=self._update_redis_init,
156+
name='RedisInitUpdater')
157+
init_updater.setDaemon(True)
158+
init_updater.start()
159+
160+
def _update_redis_init(self):
161+
"""Push Config Telemetry into redis storage"""
162+
redundant_factory_count, active_factory_count = _get_active_and_redundant_count()
163+
self._telemetry_init_producer.record_active_and_redundant_factories(active_factory_count, redundant_factory_count)
158164

159165
def _update_status_when_ready(self):
160166
"""Wait until the sdk is ready and update the status."""

splitio/storage/redis.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,16 @@ def record_config(self, config, extra_config):
617617
def record_active_and_redundant_factories(self, active_factory_count, redundant_factory_count):
618618
"""Record active and redundant factories."""
619619
self._tel_config.record_active_and_redundant_factories(active_factory_count, redundant_factory_count)
620-
self._redis_client.record_init(self._tel_config.get_stats())
620+
self._redis_client.record_init(self._format_config_stats())
621+
622+
def _format_config_stats(self):
623+
config_stats = self._tel_config.get_stats()
624+
return json.dumps({
625+
'aF': config_stats['aF'],
626+
'rF': config_stats['rF'],
627+
'sT': config_stats['sT'],
628+
'oM': config_stats['oM']
629+
})
621630

622631
def add_latency_to_pipe(self, method, latency, pipe):
623632
"""

splitio/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '9.2.1'
1+
__version__ = '9.2.3-rc1'

0 commit comments

Comments
 (0)