class Watchman::MetricName
Public Class Methods
construct(base_name, prefix, tags)
click to toggle source
# File lib/watchman/metric_name.rb, line 3 def self.construct(base_name, prefix, tags) new(base_name, prefix, tags).construct end
new(base_name, prefix = nil, tags)
click to toggle source
# File lib/watchman/metric_name.rb, line 7 def initialize(base_name, prefix = nil, tags) @base_name = base_name @prefix = prefix @tags = tags || [] end
Public Instance Methods
construct()
click to toggle source
# File lib/watchman/metric_name.rb, line 13 def construct full_name = [] full_name << "tagged" if tagged? full_name << @prefix if @prefix full_name << formated_tags if tagged? full_name << @base_name full_name.join(".") end
tagged?()
click to toggle source
# File lib/watchman/metric_name.rb, line 32 def tagged? @tags.size > 0 end