go-redis icon indicating copy to clipboard operation
go-redis copied to clipboard

Redisotel should allow an option to not set the raw cmd as an attribute on spans

Open wildefires opened this issue 2 years ago • 0 comments

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

  1. Use otelredis
  2. notice that spans have the db statement attribute
  3. notice there's no way to disable it

Context (Environment)

Environment independent

Detailed Description

See top

Possible Implementation

#2194

wildefires avatar Aug 26 '22 02:08 wildefires