-
Notifications
You must be signed in to change notification settings - Fork 847
Description
Describe your environment
OS: All
Python version: All
Package version: All
Redis-py version: >= 6.x
What happened?
The redis instrumentor currently builds the span metadata for pipelines starting from the command_stack attribute in the Pipeline and ClusterPipeline objects.
see here
In redis-py 6 the cluster pipeline has been refactored, and although the command_stack attribute has been maintained in the ClusterPipeline object (see here) it is not updated anymore with the commands added to the pipeline. As a result, spans for the cluster pipeline in redis > 6 will always have an empty list of commands.
The commands are now appended to the AbstractStategy class (see here and here) which is inherited by the PipelineStrategy class.
The instrumentation will probably need a different set of functions to handle the cluster pipeline.
Steps to Reproduce
- Install redis-py > 6.x
- Enable redis instrumentation
- Examine traces created
Expected Result
ClusterPipeline span attribute DB_STATEMENT contains at least one command and db.redis.pipeline_length is > 0
Actual Result
For all ClusterPipelines span attribute DB_STATEMENT is empty and db.redis.pipeline_length is 0
Additional context
No response
Would you like to implement a fix?
Yes
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.