go-redis
go-redis copied to clipboard
Redisotel should allow an option to not set the raw cmd as an attribute on spans
We've run into issues where big queries have caused services to OOM when trying to put them as span tags (in the datadog tracing world), see https://github.com/DataDog/dd-trace-go/issues/1022
Additionally, there's a security aspect to be considered as the query - with its params - could contain sensitive information that we wouldn't want to put into a plaintext storage (like span attributes).
As such, I think the redisotel package should allow an option to not use the command as an attribute
Expected Behavior
There should be a way to disable the command as an attribute.
Current Behavior
There is not a way to disable it.
Possible Solution
Allow an option to be provided at hook creation time to disable adding the attribute, see #2194
Steps to Reproduce
- Use otelredis
- notice that spans have the db statement attribute
- notice there's no way to disable it
Context (Environment)
Environment independent
Detailed Description
See top
Possible Implementation
#2194