Module: Prometheus::Client

Defined in:
lib/prometheus/client/tracer.rb

Defined Under Namespace

Classes: Tracer

Class Method Summary collapse

Class Method Details

.trace(metric, labels = {}, &block) ⇒ Object

Delegate to the Tracer.



12
13
14
# File 'lib/prometheus/client/tracer.rb', line 12

def self.trace(metric, labels = {}, &block)
  tracer.trace(metric, labels, &block)
end

.tracerObject

Most people will want to use a global tracer instead of building their own, similar to how most will use the global metrics registry.



7
8
9
# File 'lib/prometheus/client/tracer.rb', line 7

def self.tracer
  @tracer ||= Tracer.new
end