Skip to content

Less restrictive Redis sanitization #822

@luismiramirez

Description

@luismiramirez

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn improvement to an existing feature.supportProblems or questions reported by customers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions