Prevent Graphite reporter from modifying user tags #2083
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
As noted in #2069, the recently added Graphite tag support doesn't work for most metric types due to the way that the Dropwizard reporter appends metric attributes (min, max, p95, etc).
A metric that is reported this way using the traditional format:
my.timer.host.foo.max
Is currently reported like this using the tag format:
my.timer;host=foo.max
dropwizard/metrics#1576 was recently merged on the reporter side, adding a new flag to the reporter which would cause it to report the example used above as
my.timer;host=foo;metricattribute=max
.What this PR does now
This PR adds a failing test to the end to end
GraphiteMeterRegistryTest
showing what the modified graphite output will eventually be.It may also serve as a discussion starter around if the upstream changes to the Dropwizard metrics library are appropriate, or if more changes are required/desirable (is a
metricattribute
tag? Does it need to be more configurable?).What this PR should do before merging
Pull in a Dropwizard metrics release containing dropwizard/metrics#1576 and ensure that the Graphite reporter is configured to use the tag format when appropriate.