You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the sample code above but also for other commands we see pattens like SET the-key-we-used ? json-dump. Where the-key-we-used represents the contents of the key variable and json-dump the json.dumps output. These are logged to APM spans in the db.statement tag.
What is the result that you expected?
For databases like MySQL or Elasticsearch, dd-trace-py strips information and replaces it with a ?. It does not do this for redis by default. We did not configure resource_only_command for Redis. The description of that configuration option states:
The span resource will only include the command executed. To include all arguments in the span resource, set this value to False.
This option can also be set with the DD_REDIS_RESOURCE_ONLY_COMMAND environment variable.
Default: True
I would expect this to only log the Redis command, i.e. SET. In our case we still see all the arguments and we don't want that.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this, @hberntsen. As far as I can tell, this is missing functionality as opposed to broken funcitonality. The DD_REDIS_RESOURCE_ONLY_COMMAND is intended to only affect the span.resource attribute.
Summary of problem
The redis integration does not filter parameters of the executed commands.
Which version of dd-trace-py are you using?
2.10.4
Which version of pip are you using?
pip 24.1.2
Which libraries and their versions are you using?
redis 4.6.0
How can we reproduce your problem?
Execute the set redis command asynchronously in Python using the redis library. For example:
We also see this with other Redis commands.
What is the result that you get?
With the sample code above but also for other commands we see pattens like
SET the-key-we-used ? json-dump
. Wherethe-key-we-used
represents the contents of the key variable andjson-dump
thejson.dumps
output. These are logged to APM spans in thedb.statement
tag.What is the result that you expected?
For databases like MySQL or Elasticsearch, dd-trace-py strips information and replaces it with a
?
. It does not do this for redis by default. We did not configureresource_only_command
for Redis. The description of that configuration option states:I would expect this to only log the Redis command, i.e.
SET
. In our case we still see all the arguments and we don't want that.The text was updated successfully, but these errors were encountered: