Monasca-Statsd based Metrics

Monasca-Statsd based Metrics

metrics Base

Monasca-Statsd based metrics

Based on metrics-and-stats blueprint

Usage examples:

from designate.metrics import metrics

@metrics.timed('dot.separated.name')
def your_function():
    pass

with metrics.time('dot.separated.name'):
    pass

# Increment and decrement a counter.
metrics.counter(name='foo.bar').increment()
metrics.counter(name='foo.bar') -= 10
class designate.metrics.Metrics[source]

Bases: object

__dict__ = dict_proxy({'init': <function init>, '__dict__': <attribute '__dict__' of 'Metrics' objects>, '__init__': <function __init__>, 'counter': <function counter>, '__weakref__': <attribute '__weakref__' of 'Metrics' objects>, 'timer': <function timer>, '__module__': 'designate.metrics', 'gauge': <function gauge>, 'timed': <property object>, '__doc__': None})
__init__()[source]

Initialize Monasca-Statsd client with its default configuration. Do not start sending metrics yet.

__module__ = 'designate.metrics'
__weakref__

list of weak references to the object (if defined)

counter(*a, **kw)[source]
gauge(*a, **kw)[source]
init()[source]

Setup client connection or disable metrics based on configuration. This is called once the cfg.CONF is ready.

timed
timer()[source]
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.