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.11.8.beta.2 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.8.beta.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.8.beta.0 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.7 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.7.beta.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.6 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.6.beta.0 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.5 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.4 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.4.beta.0 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.3 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.2 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.0 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.0.beta.2 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.0.beta.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.10.6 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.10.5 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.10.4 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.10.3 lib/appsignal/aggregator/middleware/delete_blanks.rb