Skip to content

Add tagging to publish() of StatsDPublisher

Neill Whillans requested to merge neill/global_tagging into master

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • Metrics
  • Documentation update(s)

If not required, please explain in brief why not.

Description

This request aims to add tagging to publish() of StatsDPublisher using a string passed to it via createMetricsConfig() from MetricsConfigurator. This string would contain the tags, and formatted for a particular StatsD implementation [Influx, Graphite, Dog].

The formatted string, for the different Statsd formats would like, for example:

Influx:   ",foo=bar,baz=zoo"
Graphite: ";foo=bar;baz=zoo"
Dog:      "|#foo=bar,baz=zoo"

Changes proposed in this merge request:

  • Updates MetricsConfigType to handle a metric tag string
  • Adds the ability to tag metrics with provided string, in publish() of StatsDPublisher
  • addTags() to insert the formatted tag string into the existing metric, depending on format

Validation

Issues addressed

Closes / Resolves / Addresses (delete as appropriate) issue <e.g. repo-name#x>

Edited by Neill Whillans

Merge request reports