Sha256: 2a6329887c2dda8dee18e2c2cbbc2415ac9a09ec72013f78a47164afe2bdecad

Contents?: true

Size: 647 Bytes

Versions: 32

Compression:

Stored size: 647 Bytes

Contents

require 'ddtrace/contrib/dalli/ext'

module Datadog
  module Contrib
    module Dalli
      # Quantize contains dalli-specic quantization tools.
      module Quantize
        module_function

        def format_command(operation, args)
          placeholder = "#{operation} BLOB (OMITTED)"
          command = [operation, *args].join(' ').strip
          command = Utils.utf8_encode(command, binary: true, placeholder: placeholder)
          Utils.truncate(command, Ext::QUANTIZE_MAX_CMD_LENGTH)
        rescue => e
          Tracer.log.debug("Error sanitizing Dalli operation: #{e}")
          placeholder
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
ls-trace-0.1.2 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.30.1 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.30.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.29.1 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.26.1 lib/ddtrace/contrib/dalli/quantize.rb
ls-trace-0.1.1 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.29.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.28.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.27.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.26.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.25.1 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.25.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.24.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.23.3 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.23.2 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.23.1 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.23.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.22.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.21.2 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.21.1 lib/ddtrace/contrib/dalli/quantize.rb