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.18 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.17 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.16 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.15 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.14 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.14.beta.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.13 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.13.beta.4 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.13.beta.3 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.13.beta.2 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.13.beta.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.13.beta.0 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.12 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.11 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.10 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.10.beta.2 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.10.beta.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.9 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.8.beta.4 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.11.8.beta.3 lib/appsignal/aggregator/middleware/delete_blanks.rb