Staging instance, all changes can be removed at any time

Skip to content

Add a statsd client module

prometheus-statsd-exporter uses the datadog format for its tags, so base our client on their Python code, with the following modifications:

  • Removed python < 3.5 compat code
  • trimmed the imports down to be a single module
  • adjust some options:
    • drop unix socket connection option
    • add environment variable support for setting the statsd host and port (pulled the idea from the main python statsd module)
    • only send timer metrics in milliseconds (that's what prometheus-statsd-exporter expects)
    • drop DataDog-specific metric types (that are unsupported in prometheus-statsd-exporter)
  • made the tags a dict instead of a list (prometheus-statsd-exporter only supports tags with a value, mirroring prometheus)
  • improve unit test coverage
  • documentation cleanup

Test Plan

tox


Migrated from D858 (view on Phabricator)

Merge request reports

Loading