Class: Hermes::DistributedTrace::Mapper
- Inherits:
-
Object
- Object
- Hermes::DistributedTrace::Mapper
- Defined in:
- lib/hermes/distributed_trace/mapper.rb
Instance Method Summary collapse
- #call(attributes) ⇒ Object
-
#initialize(params_filter: Hermes::DependenciesContainer["logger_params_filter"]) ⇒ Mapper
constructor
A new instance of Mapper.
Constructor Details
#initialize(params_filter: Hermes::DependenciesContainer["logger_params_filter"]) ⇒ Mapper
Returns a new instance of Mapper.
7 8 9 |
# File 'lib/hermes/distributed_trace/mapper.rb', line 7 def initialize(params_filter: Hermes::DependenciesContainer["logger_params_filter"]) @params_filter = params_filter end |
Instance Method Details
#call(attributes) ⇒ Object
11 12 13 14 15 |
# File 'lib/hermes/distributed_trace/mapper.rb', line 11 def call(attributes) attributes.deep_dup.tap do |attributes_copy| attributes_copy.each { |key, value| params_filter.call(key, value) } end end |