Sha256: a90cd5331075edcfda883b69554a9f733f2e539608ae09b439fec2f0aae45bcf

Contents?: true

Size: 770 Bytes

Versions: 14

Compression:

Stored size: 770 Bytes

Contents

module Appsignal
  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::Middleware::DeleteBlanks
        chain.add Appsignal::Middleware::ActionViewSanitizer
        if defined?(ActiveRecord)
          require 'appsignal/middleware/active_record_sanitizer'
          chain.add Appsignal::Middleware::ActiveRecordSanitizer
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
appsignal-0.6.7 lib/appsignal/aggregator/post_processor.rb
appsignal-0.6.6 lib/appsignal/aggregator/post_processor.rb
appsignal-0.6.5 lib/appsignal/aggregator/post_processor.rb
appsignal-0.6.4 lib/appsignal/aggregator/post_processor.rb
appsignal-0.6.3 lib/appsignal/aggregator/post_processor.rb
appsignal-0.6.3.beta.3 lib/appsignal/aggregator/post_processor.rb
appsignal-0.6.3.beta.2 lib/appsignal/aggregator/post_processor.rb
appsignal-0.6.3.beta.1 lib/appsignal/aggregator/post_processor.rb
appsignal-0.6.2 lib/appsignal/aggregator/post_processor.rb
appsignal-0.6.1 lib/appsignal/aggregator/post_processor.rb
appsignal-0.6.0.beta.2 lib/appsignal/aggregator/post_processor.rb
appsignal-0.6.0.beta.1 lib/appsignal/aggregator/post_processor.rb
appsignal-0.5.5 lib/appsignal/aggregator/post_processor.rb
appsignal-0.5.3 lib/appsignal/aggregator/post_processor.rb