Class: NexusSemanticLogger::SneakersMetrics

Inherits:
Sneakers::Metrics::StatsdMetrics
  • Object
show all
Defined in:
lib/nexus_semantic_logger/sneakers_metrics.rb

Instance Method Summary collapse

Constructor Details

#initialize(component_name) ⇒ SneakersMetrics

Returns a new instance of SneakersMetrics.



7
8
9
10
# File 'lib/nexus_semantic_logger/sneakers_metrics.rb', line 7

def initialize(component_name)
  @prefix = "nexus.#{component_name}."
  super(NexusSemanticLogger.metrics)
end

Instance Method Details

#increment(metric) ⇒ Object



12
13
14
# File 'lib/nexus_semantic_logger/sneakers_metrics.rb', line 12

def increment(metric)
  super("#{@prefix}#{metric}")
end

#timing(metric, &block) ⇒ Object



16
17
18
# File 'lib/nexus_semantic_logger/sneakers_metrics.rb', line 16

def timing(metric, &block)
  super("#{@prefix}#{metric}", &block)
end