class ElasticAPM::Transport::Serializers::Serializer

@api private

Attributes

config[R]

Public Class Methods

new(config) click to toggle source
# File lib/elastic_apm/transport/serializers.rb, line 13
def initialize(config)
  @config = config
end

Private Instance Methods

keyword_field(value) click to toggle source
# File lib/elastic_apm/transport/serializers.rb, line 25
def keyword_field(value)
  Util.truncate(value)
end
keyword_object(hash) click to toggle source
# File lib/elastic_apm/transport/serializers.rb, line 29
def keyword_object(hash)
  return unless hash

  hash.tap do |h|
    h.each { |k, v| hash[k] = keyword_field(v) }
  end
end
ms(micros) click to toggle source
# File lib/elastic_apm/transport/serializers.rb, line 21
def ms(micros)
  micros.to_f / 1_000
end