lib/yabeda/dsl.rb
# Block for grouping and simplifying configuration of related metrics
Block for grouping and simplifying configuration of related metrics
Block for grouping and simplifying configuration of related metrics
def register(metric)
        name = [metric.group, metric.name].compact.join("_")
        ::Yabeda.define_singleton_method(name) { metric }
        ::Yabeda.metrics[name] = metric
        ::Yabeda.adapters.each do |_, adapter|
          adapter.register!(metric)
        end
        metric
      end
def register ( metric ) name = [ metric . group , metric . name ] . compact . join ( "_" ) :: Yabeda . define_singleton_method ( name ) { metric } :: Yabeda . metrics [ name ] = metric :: Yabeda . adapters . each do | _ , adapter | adapter . register! ( metric ) end metric end
Block for grouping and simplifying configuration of related metrics
Block for grouping and simplifying configuration of related metrics
metric
<not_specific>