Browse Source

ref(rules): Log after zadd (#71040)

Add a log to confirm we're writing project ids to Redis with the data we
expect.
Colleen O'Rourke 10 months ago
parent
commit
a8df7ac10c
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/sentry/buffer/redis.py

+ 6 - 1
src/sentry/buffer/redis.py

@@ -248,7 +248,12 @@ class RedisBuffer(Buffer):
         return pipe.execute()[0]
 
     def push_to_sorted_set(self, key: str, value: list[int] | int) -> None:
-        self._execute_redis_operation(key, RedisOperation.SORTED_SET_ADD, {value: time()})
+        value_dict = {value: time()}
+        self._execute_redis_operation(key, RedisOperation.SORTED_SET_ADD, value_dict)
+        logger.info(
+            "redis_buffer.push_to_sorted_set",
+            extra={"key_name": key, "value": json.dumps(value_dict)},
+        )
 
     def get_sorted_set(self, key: str, min: float, max: float) -> list[tuple[int, datetime]]:
         redis_set = self._execute_redis_operation(