Class: Appsignal::Aggregator::PostProcessor
- Inherits:
-
Object
- Object
- Appsignal::Aggregator::PostProcessor
- Defined in:
- lib/appsignal/aggregator/post_processor.rb
Instance Attribute Summary collapse
-
#transactions ⇒ Object
readonly
Returns the value of attribute transactions.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(transactions) ⇒ PostProcessor
constructor
A new instance of PostProcessor.
- #post_processed_queue! ⇒ Object
Constructor Details
#initialize(transactions) ⇒ PostProcessor
Returns a new instance of PostProcessor.
6 7 8 |
# File 'lib/appsignal/aggregator/post_processor.rb', line 6 def initialize(transactions) @transactions = transactions end |
Instance Attribute Details
#transactions ⇒ Object (readonly)
Returns the value of attribute transactions.
4 5 6 |
# File 'lib/appsignal/aggregator/post_processor.rb', line 4 def transactions @transactions end |
Class Method Details
.default_middleware ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/appsignal/aggregator/post_processor.rb', line 19 def self.default_middleware Middleware::Chain.new do |chain| chain.add Appsignal::Aggregator::Middleware::DeleteBlanks if defined?(::ActionView) chain.add Appsignal::Aggregator::Middleware::ActionViewSanitizer end if defined?(::ActiveRecord) chain.add Appsignal::Aggregator::Middleware::ActiveRecordSanitizer end end end |
Instance Method Details
#post_processed_queue! ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/appsignal/aggregator/post_processor.rb', line 10 def post_processed_queue! transactions.map do |transaction| transaction.events.each do |event| Appsignal.post_processing_middleware.invoke(event) end transaction.to_hash end end |