diff --git a/docs/api.rst b/docs/api.rst index c68183d..48554ee 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -49,6 +49,9 @@ Statsd Implementation .. autoclass:: sprockets.mixins.metrics.statsd.StatsdMixin :members: +.. autoclass:: sprockets.mixins.metrics.statsd.StatsDCollector + :members: + Testing Helpers --------------- *So who actually tests that their metrics are emitted as they expect?* diff --git a/sprockets/mixins/metrics/statsd.py b/sprockets/mixins/metrics/statsd.py index d71fa2b..8556d41 100644 --- a/sprockets/mixins/metrics/statsd.py +++ b/sprockets/mixins/metrics/statsd.py @@ -86,10 +86,9 @@ class StatsdMixin: class StatsDCollector: """Collects and submits stats to StatsD. - This class should be constructed using the - :meth:`~sprockets.mixins.statsd.install` method. When installed, - it is attached to the :class:`~tornado.web.Application` instance - for your web application. + This class should be constructed using the :func:`.install` function. + When installed, it is attached to the :class:`~tornado.web.Application` + instance for your web application. :param str host: The StatsD host :param str port: The StatsD port @@ -201,16 +200,16 @@ def install(application, **kwargs): :param tornado.web.Application application: the application to install the collector into. :param kwargs: keyword parameters to pass to the - :class:`StatsDCollector` initializer. + :class:`.StatsDCollector` initializer. :returns: :data:`True` if the client was installed successfully, or :data:`False` otherwise. - **host** The StatsD host. If host is not specified, the ``STATSD_HOST`` environment variable, or default `127.0.0.1`, - will be pass into the :class:`StatsDCollector`. + will be pass into the :class:`.StatsDCollector`. - **port** The StatsD port. If port is not specified, the ``STATSD_PORT`` environment variable, or default `8125`, - will be pass into the :class:`StatsDCollector`. + will be pass into the :class:`.StatsDCollector`. - **namespace** The StatsD bucket to write metrics into. """