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 14 def initialize(config) @config = config end
Private Instance Methods
keyword_field(value)
click to toggle source
# File lib/elastic_apm/transport/serializers.rb, line 26 def keyword_field(value) Util.truncate(value) end
keyword_object(hash)
click to toggle source
# File lib/elastic_apm/transport/serializers.rb, line 30 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 22 def ms(micros) micros.to_f / 1_000 end