Skip to content

Commit

Permalink
LOGSTASH-174: filter properly on tags in statsd output
Browse files Browse the repository at this point in the history
  • Loading branch information
mleinart committed Sep 8, 2011
1 parent bb5605e commit fe69d5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/logstash/outputs/statsd.rb
Expand Up @@ -49,7 +49,7 @@ class LogStash::Outputs::Statsd < LogStash::Outputs::Base
# The sample rate for the metric
config :sample_rate, :validate => :number, :default => 1

# Only handle these tagged events
# Only handle events with all of these tags
# Optional.
config :tags, :validate => :array, :default => []

Expand All @@ -68,7 +68,7 @@ def register
public
def receive(event)
if !@tags.empty?
if (event.tags - @tags).size == 0
if (event.tags & @tags).size != @tags.size
return
end
end
Expand Down

0 comments on commit fe69d5c

Please sign in to comment.