Class: Skylight::Core::Normalizers::Container Private

Inherits:
Object
  • Object
show all
Defined in:
lib/skylight/core/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.

Instance Method Summary collapse

Constructor Details

#initialize(normalizers) ⇒ Container

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 Container.


71
72
73
# File 'lib/skylight/core/normalizers.rb', line 71

def initialize(normalizers)
  @normalizers = normalizers
end

Instance Method Details

#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.


75
76
77
# File 'lib/skylight/core/normalizers.rb', line 75

def keys
  @normalizers.keys
end

#normalize(trace, 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.


79
80
81
# File 'lib/skylight/core/normalizers.rb', line 79

def normalize(trace, name, payload)
  normalizer_for(name).normalize(trace, name, payload)
end

#normalize_after(trace, span, 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.


83
84
85
# File 'lib/skylight/core/normalizers.rb', line 83

def normalize_after(trace, span, name, payload)
  normalizer_for(name).normalize_after(trace, span, name, payload)
end

#normalizer_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.


87
88
89
90
91
92
# File 'lib/skylight/core/normalizers.rb', line 87

def normalizer_for(name)
  # We never expect to hit the default case since we only register listeners
  # for items that we know have normalizers. For now, though, we'll play it
  # safe and provide a fallback.
  @normalizers.fetch(name, DEFAULT)
end