Class: Skylight::Core::Normalizers::Container Private
- Inherits:
-
Object
- Object
- Skylight::Core::Normalizers::Container
- 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
-
#initialize(normalizers) ⇒ Container
constructor
private
A new instance of Container.
- #keys ⇒ Object private
- #normalize(trace, name, payload) ⇒ Object private
- #normalize_after(trace, span, name, payload) ⇒ Object private
- #normalizer_for(name) ⇒ Object private
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
#keys ⇒ 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.
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 |