Class: Deimos::Metrics::Provider

Inherits:
Object
  • Object
show all
Defined in:
lib/deimos/metrics/provider.rb

Overview

Base class for all metrics providers.

Direct Known Subclasses

Datadog

Instance Method Summary collapse

Instance Method Details

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

Send an counter increment metric

Parameters:

  • metric_name (String)

    The name of the counter metric

  • options (Hash) (defaults to: {})

    Any additional options, e.g. :tags

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/deimos/metrics/provider.rb', line 17

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

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

Send an counter increment metric

Parameters:

  • metric_name (String)

    The name of the counter metric

  • options (Hash) (defaults to: {})

    Any additional options, e.g. :tags

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/deimos/metrics/provider.rb', line 24

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

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

Send an counter increment metric

Parameters:

  • metric_name (String)

    The name of the counter metric

  • options (Hash) (defaults to: {})

    Any additional options, e.g. :tags

Raises:

  • (NotImplementedError)


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

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

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

Time a yielded block, and send a timer metric

Parameters:

  • metric_name (String)

    The name of the metric

  • options (Hash) (defaults to: {})

    Any additional options, e.g. :tags

Raises:

  • (NotImplementedError)


31
32
33
# File 'lib/deimos/metrics/provider.rb', line 31

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