Logstash metrics filter not working after logstash 2.2.0 upgrade

I have an existing logstash config that reads data from topbeat and outputs data to kafka(config below). I have added the metrics filter to get the throughput of documents processed. After upgrading to logstash 2.2.0 ,I am not seeing any output in stdout from metrics filter.This only started happening after upgrading to logstash-2.2.0.

input {
beats {
port => 5044
}
}

filter {
if [type] == "process" {
if [proc][username] == "root" and [proc][cpu][total_p] < 0.1 and [proc][mem][rss] < 1000000 {
drop{}
}else{
metrics {
meter => "documents"
add_tag => "metric"
flush_interval => 60
}
}
}
}

output {
if "metric" in [tags] {
stdout {
codec => line { format => "1m rate| %{@timestamp} | %{[documents][rate_1m]} 5m rate: %{[documents][rate_5m]} ( %{[documents][count]} ) "}
}
}else {
kafka {
topic_id => "topbeat-stage"
acks => "all"
}
}
}

hi, have you managed to fix that?

I have also issue with metrics but on 2.2.0 and 2.2.2, and do not know how to fix it

Type doesn't work anymore.
https://www.elastic.co/guide/en/logstash/master/breaking-changes.html use
add_tag or add_field.

according to the documentation, Configuration files with these settings present are invalid and prevent Logstash from starting.

Why is my logstash configuration starting succesfully then ? Not only I am seeing it start , it is also succesfully aplying the logic that is encapuslated in the [tags] construct

With filters there is the possibility that a "type" field is present in
your log payload which would make the value type valid from a validation
prospective.

Due to some performance issue I have to revert from LS 2.3.3 to 2.2.0 and get the same problem with metrics plugin.

Below is my test config for LS 2.2.0

input {
      generator {
        type => "generated"
      }
    }

filter {
    metrics {
      meter => "events"
      add_tag => "metric"
    }
}

output {
  # only emit events with the 'metric' tag
  if "metric" in [tags] {
    file {
		path => "C:/metrics.txt"
	    codec => json
    }
  } else {
    file {        
        path => "C:/out.txt"
    }
  }
}

What I see is that metrics.txt is created only if I stop LS. Same config works fine on LS 2.3.x