Sha256: 402b1909265bc0b2b10eac9ff0c9fe0f08dded1409d1a6e70203f526250ece39

Contents?: true

Size: 658 Bytes

Versions: 2

Compression:

Stored size: 658 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
        chain.add Appsignal::Middleware::ActiveRecordSanitizer
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
appsignal-0.5.1 lib/appsignal/aggregator/post_processor.rb
appsignal-0.5.0 lib/appsignal/aggregator/post_processor.rb