Graphite backend: Applying the globalPrefix value in legacyNamespace mode #405
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.
It's useful to be able to specify a prefix for everything, even in legacyNamespace mode. This does that. It's a little hacky/dense, but the alternative is a lot of changes in many places, which will be a bigger diff and harder to be certain the impact is limited.
This is specifically useful for hooking up statsd to services like Hosted Graphite, but it should be more generally useful too.
I believe it also fixes a problem with the naming of the "global" prefix, where it's not actually "global". The naming implies it prefixes everything, but it only works in the new namespace mode.
Users using legacyNamespace with no globalPrefix won't be affected. Users not using legacyNamespace won't be affected. Users who are using legacyNamespace and who have a globalPrefix currently configured, but ignored, will be affected. This is likely to be a very small set of users who have tested not using the legacy namespace, but gone back to using it and not cleaned up their config. A message in the release notes should be sufficient to warn these users.