Class: Deimos::Metrics::Provider

Inherits:
Object
  • Object
show all
Defined in:
lib/deimos/metrics/provider.rb,
sig/defs.rbs

Overview

Base class for all metrics providers.

Direct Known Subclasses

Datadog, Mock

Instance Method Summary collapse

Instance Method Details

#gauge(metric_name, count, options = {}) ⇒ void

This method returns an undefined value.

Send an counter increment metric

@param metric_name — The name of the counter metric

@param count

@param options — Any additional options, e.g. :tags

Parameters:

  • metric_name (String)
  • count (Integer)
  • options (::Hash[untyped, untyped]) (defaults to: {})


20
21
22
# File 'lib/deimos/metrics/provider.rb', line 20

def gauge(metric_name, count, options={})
  raise NotImplementedError
end

#histogram(metric_name, count, options = {}) ⇒ void

This method returns an undefined value.

Send an counter increment metric

@param metric_name — The name of the counter metric

@param count

@param options — Any additional options, e.g. :tags

Parameters:

  • metric_name (String)
  • count (Integer)
  • options (::Hash[untyped, untyped]) (defaults to: {})


29
30
31
# File 'lib/deimos/metrics/provider.rb', line 29

def histogram(metric_name, count, options={})
  raise NotImplementedError
end

#increment(metric_name, options = {}) ⇒ void

This method returns an undefined value.

Send an counter increment metric

@param metric_name — The name of the counter metric

@param options — Any additional options, e.g. :tags

Parameters:

  • metric_name (String)
  • options (::Hash[untyped, untyped]) (defaults to: {})


11
12
13
# File 'lib/deimos/metrics/provider.rb', line 11

def increment(metric_name, options={})
  raise NotImplementedError
end

#time(metric_name, options = {}) ⇒ void

This method returns an undefined value.

Time a yielded block, and send a timer metric

@param metric_name — The name of the metric

@param options — Any additional options, e.g. :tags

Parameters:

  • metric_name (String)
  • options (::Hash[untyped, untyped]) (defaults to: {})


37
38
39
# File 'lib/deimos/metrics/provider.rb', line 37

def time(metric_name, options={})
  raise NotImplementedError
end