Sha256: d86ccb4fceec4c9f639d79f596755b50440c16d76c489e3d048bc1dd952d5221

Contents?: true

Size: 866 Bytes

Versions: 90

Compression:

Stored size: 866 Bytes

Contents

module Appsignal
  class Aggregator
    class PostProcessor
      attr_reader :transactions

      def initialize(transactions)
        @transactions = transactions
      end

      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

      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
    end
  end
end

Version data entries

90 entries across 90 versions & 1 rubygems

Version Path
appsignal-0.11.18 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.17 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.16 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.15 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.14 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.14.beta.1 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.13 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.13.beta.4 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.13.beta.3 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.13.beta.2 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.13.beta.1 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.13.beta.0 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.12 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.11 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.10 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.10.beta.2 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.10.beta.1 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.9 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.8.beta.4 lib/appsignal/aggregator/post_processor.rb
appsignal-0.11.8.beta.3 lib/appsignal/aggregator/post_processor.rb