Skip to content

Commit 60a5d68

Browse files
hmstepaneklrafeeiTimPansino
authored
Fix tornado master tests & instrument redis 4.3.5 (#695)
* Remove 3.7 testing of tornado master tornadomaster dropped support for 3.7 * Instrument new redis 4.3.5 client methods Co-authored-by: Lalleh Rafeei <[email protected]> Co-authored-by: Timothy Pansino <[email protected]>
1 parent eead7a7 commit 60a5d68

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

newrelic/hooks/datastore_redis.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
"blpop",
6767
"brpop",
6868
"brpoplpush",
69+
"byrank",
70+
"byrevrank",
6971
"bzmpop",
7072
"bzpopmax",
7173
"bzpopmin",
@@ -289,6 +291,7 @@
289291
"quit",
290292
"randomkey",
291293
"range",
294+
"rank",
292295
"readonly",
293296
"readwrite",
294297
"rename",
@@ -299,6 +302,7 @@
299302
"resp",
300303
"restore",
301304
"revrange",
305+
"revrank",
302306
"role",
303307
"rpop",
304308
"rpoplpush",
@@ -376,6 +380,7 @@
376380
"time",
377381
"toggle",
378382
"touch",
383+
"trimmed_mean",
379384
"ttl",
380385
"type",
381386
"unlink",
@@ -528,7 +533,15 @@ def _nr_Connection_send_command_wrapper_(wrapped, instance, args, kwargs):
528533

529534
operation = _redis_operation_re.sub("_", operation)
530535

531-
with DatastoreTrace(product="Redis", target=None, operation=operation, host=host, port_path_or_id=port_path_or_id, database_name=db, source=wrapped):
536+
with DatastoreTrace(
537+
product="Redis",
538+
target=None,
539+
operation=operation,
540+
host=host,
541+
port_path_or_id=port_path_or_id,
542+
database_name=db,
543+
source=wrapped,
544+
):
532545
return wrapped(*args, **kwargs)
533546

534547

@@ -574,7 +587,7 @@ def instrument_redis_commands_bf_commands(module):
574587
_instrument_redis_commands_module(module, "CMSCommands")
575588
_instrument_redis_commands_module(module, "TDigestCommands")
576589
_instrument_redis_commands_module(module, "TOPKCommands")
577-
590+
578591

579592
def _instrument_redis_commands_module(module, class_name):
580593
for name in _redis_client_methods:

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ envlist =
153153
python-logger_loguru-{py37,py38,py39,py310,py311,pypy37}-logurulatest,
154154
python-logger_loguru-py39-loguru{06,05,04,03},
155155
libcurl-framework_tornado-{py37,py38,py39,py310,py311,pypy37}-tornado0600,
156-
libcurl-framework_tornado-{py37,py38,py39,py310,py311}-tornadomaster,
156+
libcurl-framework_tornado-{py38,py39,py310,py311}-tornadomaster,
157157
rabbitmq-messagebroker_pika-{py27,py37,py38,py39,pypy,pypy37}-pika0.13,
158158
rabbitmq-messagebroker_pika-{py37,py38,py39,py310,py311,pypy37}-pikalatest,
159159
kafka-messagebroker_confluentkafka-{py27,py37,py38,py39,py310,py311}-confluentkafkalatest,

0 commit comments

Comments
 (0)