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 29 def initialize(config) @config = config end
Private Instance Methods
keyword_field(value)
click to toggle source
# File lib/elastic_apm/transport/serializers.rb, line 41 def keyword_field(value) Util.truncate(value) end
keyword_object(hash)
click to toggle source
# File lib/elastic_apm/transport/serializers.rb, line 45 def keyword_object(hash) return unless hash hash.each do |k, v| hash[k] = case v when Hash then keyword_object(v) else keyword_field(v) end end end
mixed_object(hash)
click to toggle source
# File lib/elastic_apm/transport/serializers.rb, line 57 def mixed_object(hash) return unless hash hash.each do |k, v| hash[k] = v.is_a?(String) ? keyword_field(v) : v end end
ms(micros)
click to toggle source
# File lib/elastic_apm/transport/serializers.rb, line 37 def ms(micros) micros.to_f / 1_000 end