Skip to content

Commit

Permalink
Fix tornado master tests & instrument redis 4.3.5 (#695)
Browse files Browse the repository at this point in the history
* 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 <84813886+lrafeei@users.noreply.github.com>
Co-authored-by: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
  • Loading branch information
3 people committed Nov 28, 2022
1 parent eead7a7 commit 60a5d68
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions newrelic/hooks/datastore_redis.py
Expand Up @@ -66,6 +66,8 @@
"blpop",
"brpop",
"brpoplpush",
"byrank",
"byrevrank",
"bzmpop",
"bzpopmax",
"bzpopmin",
Expand Down Expand Up @@ -289,6 +291,7 @@
"quit",
"randomkey",
"range",
"rank",
"readonly",
"readwrite",
"rename",
Expand All @@ -299,6 +302,7 @@
"resp",
"restore",
"revrange",
"revrank",
"role",
"rpop",
"rpoplpush",
Expand Down Expand Up @@ -376,6 +380,7 @@
"time",
"toggle",
"touch",
"trimmed_mean",
"ttl",
"type",
"unlink",
Expand Down Expand Up @@ -528,7 +533,15 @@ def _nr_Connection_send_command_wrapper_(wrapped, instance, args, kwargs):

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

with DatastoreTrace(product="Redis", target=None, operation=operation, host=host, port_path_or_id=port_path_or_id, database_name=db, source=wrapped):
with DatastoreTrace(
product="Redis",
target=None,
operation=operation,
host=host,
port_path_or_id=port_path_or_id,
database_name=db,
source=wrapped,
):
return wrapped(*args, **kwargs)


Expand Down Expand Up @@ -574,7 +587,7 @@ def instrument_redis_commands_bf_commands(module):
_instrument_redis_commands_module(module, "CMSCommands")
_instrument_redis_commands_module(module, "TDigestCommands")
_instrument_redis_commands_module(module, "TOPKCommands")


def _instrument_redis_commands_module(module, class_name):
for name in _redis_client_methods:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Expand Up @@ -153,7 +153,7 @@ envlist =
python-logger_loguru-{py37,py38,py39,py310,py311,pypy37}-logurulatest,
python-logger_loguru-py39-loguru{06,05,04,03},
libcurl-framework_tornado-{py37,py38,py39,py310,py311,pypy37}-tornado0600,
libcurl-framework_tornado-{py37,py38,py39,py310,py311}-tornadomaster,
libcurl-framework_tornado-{py38,py39,py310,py311}-tornadomaster,
rabbitmq-messagebroker_pika-{py27,py37,py38,py39,pypy,pypy37}-pika0.13,
rabbitmq-messagebroker_pika-{py37,py38,py39,py310,py311,pypy37}-pikalatest,
kafka-messagebroker_confluentkafka-{py27,py37,py38,py39,py310,py311}-confluentkafkalatest,
Expand Down

0 comments on commit 60a5d68

Please sign in to comment.