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

Less restrictive Redis sanitization #822

Open
2 tasks
luismiramirez opened this issue Feb 16, 2022 · 1 comment
Open
2 tasks

Less restrictive Redis sanitization #822

luismiramirez opened this issue Feb 16, 2022 · 1 comment

Comments

@luismiramirez
Copy link
Member

luismiramirez commented Feb 16, 2022

We recently changed how MongoDB queries are sanitized to show more information to our users. (#819)

We can do the same to Redis commands. Currently, we are sanitizing the whole query and only showing the called command.

Example:

SET key value

SET ? ?

The idea is not to remove the command's first argument to know which keys are set up or retrieved.

sanitized_command =
if command[0] == :eval
"#{command[1]}#{" ?" * (command.size - 3)}"
else
"#{command[0]}#{" ?" * (command.size - 1)}"
end
Appsignal.instrument "query.redis", id, sanitized_command do
super
end

ToDo

  • Allow the first argument of Redis commands
  • Test properly with an alpha release to make sure we don't flood the DB with the new unique events
@tombruijn
Copy link
Member

First step: can we track which command is run, not just "eval".
Can we stop replacing keys with ? as well, but only replace values? Can we distinguish between them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants