Sha256: fa52b153c28cc1eed1b5a7b088133f08909ea1a1654cbf912fa4a4796799a638

Contents?: true

Size: 651 Bytes

Versions: 21

Compression:

Stored size: 651 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
          Datadog.logger.debug("Error sanitizing Dalli operation: #{e}")
          placeholder
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
ddtrace-0.51.1 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.51.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.50.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.49.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.48.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.47.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.46.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.45.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.44.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.43.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.42.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.41.0 lib/ddtrace/contrib/dalli/quantize.rb
ls-trace-0.2.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.40.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.39.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.38.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.37.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.36.0 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.35.2 lib/ddtrace/contrib/dalli/quantize.rb
ddtrace-0.35.1 lib/ddtrace/contrib/dalli/quantize.rb