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.10.2 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.10.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.10.0 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.9.6 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.9.5 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.10.0.beta.0 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.9.4 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.9.3 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.9.2 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.9.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.9.0 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.15 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.9.0.beta.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.9.0.alpha.1 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.14 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.13 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.12 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.11 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.10 lib/appsignal/aggregator/middleware/delete_blanks.rb
appsignal-0.8.8 lib/appsignal/aggregator/middleware/delete_blanks.rb