Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tornado master tests & instrument redis 4.3.5 #695

Merged
merged 4 commits into from Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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