Sha256: 1363d0670367213705f8308cf12c918115926b2842276b0464ba9ebbe0b0f41b

Contents?: true

Size: 344 Bytes

Versions: 90

Compression:

Stored size: 344 Bytes

Contents

module Appsignal
  class Aggregator
    module Middleware
      class DeleteBlanks
        def call(event)
          event.payload.each do |key, value|
            if value.respond_to?(:empty?) ? value.empty? : !value
              event.payload.delete(key)
            end
          end
          yield
        end
      end
    end
  end
end

Version data entries

90 entries across 90 versions & 1 rubygems

Version Path
appsignal-0.8.7 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.7.alpha.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.6 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.6.beta.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.6.beta.0 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.5 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.4 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.4.beta.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.4.beta.0 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.3 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.3.beta.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.3.beta.0 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.2 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.1.beta.4 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.1.beta.3 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.1.beta.2 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.1.beta.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.1.beta.0 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.0 lib/appsignal/aggregator/middleware/delete_blanks.rb