2021-03-06 14:50:04 +00:00
|
|
|
sprockets-statsd
|
|
|
|
================
|
|
|
|
|
|
|
|
.. include:: ../README.rst
|
|
|
|
|
2021-04-12 12:08:07 +00:00
|
|
|
Tornado configuration
|
|
|
|
=====================
|
|
|
|
The Tornado statsd connection is configured by the ``statsd`` application settings key. The default values can be set
|
|
|
|
by the following environment variables.
|
2021-03-09 20:06:23 +00:00
|
|
|
|
|
|
|
.. envvar:: STATSD_HOST
|
|
|
|
|
|
|
|
The host or IP address of the StatsD server to send metrics to.
|
|
|
|
|
|
|
|
.. envvar:: STATSD_PORT
|
|
|
|
|
|
|
|
The TCP port number that the StatsD server is listening on. This defaults to 8125 if it is not configured.
|
|
|
|
|
2021-03-24 02:01:02 +00:00
|
|
|
.. envvar:: STATSD_PREFIX
|
|
|
|
|
2021-03-24 10:48:25 +00:00
|
|
|
Optional prefix to use for metric paths. See the documentation for :class:`~sprockets_statsd.tornado.Application`
|
|
|
|
for addition notes on setting the path prefix when using the Tornado helpers.
|
2021-03-24 02:01:02 +00:00
|
|
|
|
2021-03-21 21:45:23 +00:00
|
|
|
.. envvar:: STATSD_PROTOCOL
|
|
|
|
|
|
|
|
The IP protocol to use when connecting to the StatsD server. You can specify either "tcp" or "udp". The
|
|
|
|
default is "tcp" if it not not configured.
|
|
|
|
|
2021-04-12 12:08:07 +00:00
|
|
|
.. envvar:: STATSD_ENABLED
|
|
|
|
|
|
|
|
Define this variable and set it to a *falsy* value to **disable** the Tornado integration. If you omit
|
|
|
|
this variable, then the connector is enabled. The following values are considered *truthy*:
|
|
|
|
|
|
|
|
- non-zero integer
|
|
|
|
- case-insensitive match of ``yes``, ``true``, ``t``, or ``on``
|
|
|
|
|
|
|
|
All other values are considered *falsy*. You only want to define this environment variables when you
|
|
|
|
want to explicitly disable an otherwise installed and configured connection.
|
|
|
|
|
2021-03-24 10:48:25 +00:00
|
|
|
If you are using the Tornado helper clases, then you can fine tune the metric payloads and the connector by
|
|
|
|
setting additional values in the ``statsd`` key of :attr:`tornado.web.Application.settings`. See the
|
|
|
|
:class:`sprockets_statsd.tornado.Application` class documentation for a description of the supported settings.
|
2021-03-09 20:06:23 +00:00
|
|
|
|
2021-03-08 12:27:40 +00:00
|
|
|
Reference
|
|
|
|
=========
|
|
|
|
|
2021-03-19 22:19:03 +00:00
|
|
|
.. autoclass:: sprockets_statsd.statsd.Connector
|
|
|
|
:members:
|
2021-07-18 15:15:28 +00:00
|
|
|
:inherited-members: incr, decr, gauge, timer, timing
|
2021-03-19 22:19:03 +00:00
|
|
|
|
2021-03-24 10:48:25 +00:00
|
|
|
Tornado helpers
|
|
|
|
---------------
|
|
|
|
.. autoclass:: sprockets_statsd.tornado.Application
|
2021-03-09 20:06:23 +00:00
|
|
|
:members:
|
|
|
|
|
2021-03-24 10:48:25 +00:00
|
|
|
.. autoclass:: sprockets_statsd.tornado.RequestHandler
|
2021-03-09 20:06:23 +00:00
|
|
|
:members:
|
|
|
|
|
|
|
|
Internals
|
2021-03-08 12:27:40 +00:00
|
|
|
---------
|
2021-04-12 12:08:07 +00:00
|
|
|
.. autoclass:: sprockets_statsd.statsd.AbstractConnector
|
|
|
|
:members:
|
|
|
|
|
2021-03-19 22:19:03 +00:00
|
|
|
.. autoclass:: sprockets_statsd.statsd.Processor
|
2021-03-08 12:27:40 +00:00
|
|
|
:members:
|
|
|
|
|
2021-07-18 15:15:28 +00:00
|
|
|
.. autoclass:: sprockets_statsd.statsd.Timer
|
|
|
|
:members:
|
|
|
|
|
2021-03-19 22:19:03 +00:00
|
|
|
.. autoclass:: sprockets_statsd.statsd.StatsdProtocol
|
|
|
|
:members:
|
|
|
|
|
|
|
|
.. autoclass:: sprockets_statsd.statsd.TCPProtocol
|
2021-03-08 12:27:40 +00:00
|
|
|
:members:
|
|
|
|
|
2021-03-06 14:50:04 +00:00
|
|
|
Release history
|
|
|
|
===============
|
|
|
|
|
|
|
|
.. include:: ../CHANGELOG.rst
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 2
|