Report stats to both statsd and prometheus
Go to file
OpenDev Sysadmins 614af38d5a OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:51:59 +00:00
doc Add initial code 2018-11-30 15:40:47 -06:00
promstat Add initial code 2018-11-30 15:40:47 -06:00
releasenotes Add initial code 2018-11-30 15:40:47 -06:00
.gitignore Add initial code 2018-11-30 15:40:47 -06:00
.gitreview OpenDev Migration Patch 2019-04-19 19:51:59 +00:00
.mailmap Add initial code 2018-11-30 15:40:47 -06:00
.stestr.conf Add initial code 2018-11-30 15:40:47 -06:00
.zuul.yaml Add initial code 2018-11-30 15:40:47 -06:00
CONTRIBUTING.rst Add initial code 2018-11-30 15:40:47 -06:00
HACKING.rst Add initial code 2018-11-30 15:40:47 -06:00
LICENSE Add initial code 2018-11-30 15:40:47 -06:00
README.rst Add initial code 2018-11-30 15:40:47 -06:00
requirements.txt Add initial code 2018-11-30 15:40:47 -06:00
setup.cfg Change openstack-dev to openstack-discuss 2018-12-04 14:58:09 +00:00
setup.py Add initial code 2018-11-30 15:40:47 -06:00
test-requirements.txt Add initial code 2018-11-30 15:40:47 -06:00
tox.ini Add initial code 2018-11-30 15:40:47 -06:00

README.rst

promstat

Library for reporting stats to both statsd and prometheus.

statsd and prometheus are both popular metrics collecting systems, but they operate quite differently from each other. promstat is a wrapper abstraction library around the statsd and prometheus clients that allows instrumenting code once so that operators can integrate with either system.

prometheus has a more structured reporting system, so the calling semantics of prometheus_client are used. Each metric reporter has an additional field, template which is a statsd metric name template to be used for the statsd reporting.

promstat does not have a global Registry like prometheus_client defaults to using. If you want to use the global Registry object with promstat, pass prometheus_client.REGISTRY to the registry parameter of the PromStat constructor.