Class: ElasticAPM::Normalizers::Collection Private

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic_apm/normalizers.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Classes: SkipNormalizer

Instance Method Summary collapse

Constructor Details

#initialize(normalizers) ⇒ Collection

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Collection.



41
42
43
44
# File 'lib/elastic_apm/normalizers.rb', line 41

def initialize(normalizers)
  @normalizers = normalizers
  @default = SkipNormalizer.new
end

Instance Method Details

#for(name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



46
47
48
# File 'lib/elastic_apm/normalizers.rb', line 46

def for(name)
  @normalizers.fetch(name) { @default }
end

#keysObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



50
51
52
# File 'lib/elastic_apm/normalizers.rb', line 50

def keys
  @normalizers.keys
end

#normalize(transaction, name, payload) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



54
55
56
# File 'lib/elastic_apm/normalizers.rb', line 54

def normalize(transaction, name, payload)
  self.for(name).normalize(transaction, name, payload)
end