Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix regexp

  • Loading branch information...
commit 07fa533b06c68af76a82015d1139d11ae9924e51 1 parent 1745db6
@wvanbergen wvanbergen authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/statsd/instrument.rb
View
2  lib/statsd/instrument.rb
@@ -211,7 +211,7 @@ def self.generate_packet(k, v, op, sample_rate = default_sample_rate, tags = nil
command << "|@#{sample_rate}" if sample_rate < 1 || (self.implementation == :statsite && sample_rate > 1)
if tags
raise ArgumentError, "Tags are only supported on Datadog" unless self.implementation == :datadog
- raise ArgumentError, "Tags not prperly formatted." unless tags.all? { |t| t =~ /\A([\w-]+:)?[\w-]+\z/ }
+ raise ArgumentError, "Tags not properly formatted." unless tags.all? { |t| t =~ /\A[\w\.-]+(?:\:[\w\.-]+)?\z/ }
command << "|##{tags.join(',')}"
end
Please sign in to comment.
Something went wrong with that request. Please try again.