You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: trace_middleware.rb
    path of file: ./repos/dd-trace-rb/lib/datadog/tracing/contrib/redis
    
    the code of the file until where you have to start completion: require_relative '../patcher'
require_relative 'ext'
require_relative 'quantize'
require_relative 'tags'

module Datadog
  module Tracing
    module Contrib
      module Redis
        # Instrumentation for Redis 5+
        module TraceMiddleware
          # Instruments {RedisClient::ConnectionMixin#call}.
          def call(command, redis_config)
       
    
            def call_pipelined(client, commands, service_name, command_args)
              Tracing.trace(Redis::Ext::SPAN_COMMAND, type: Redis::Ext::TYPE, service: service_name) do |span|
                raw_command = get_pipeline_commands(commands, true)
                span.resource = command_args ? raw_command : get_pipeline_commands(commands, false)

                span.set_metric Contrib::Redis::Ext::METRIC_PIPELINE_LEN, commands.length

                Contrib::Redis::Tags.set_common_tags(client, span, raw_command)

                yield
              end
            end