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.



73
74
75
# File 'lib/skylight/core/normalizers.rb', line 73

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.



77
78
79
# File 'lib/skylight/core/normalizers.rb', line 77

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.



81
82
83
# File 'lib/skylight/core/normalizers.rb', line 81

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.



85
86
87
# File 'lib/skylight/core/normalizers.rb', line 85

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.



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

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