add namespace and instance variable to carbon key #6959
In environments with multiple pdns instances the predefined keys limit the way to distinguish between each of these instances. With namespace and instance made variable it is now possible to add the team, location, instance name or role into the metric name and therefore group them together for example with the database.
The documentation was updated for what is implemented at the moment. Everything is kept backwards compatible to avoid problems for current users upgrading.
The carbon key had the option to overwrite the hostname with a custom one. But it was not possible to change either the instance or namespace, which makes it harder to use in environments where multiple powerdns instances are used for different purposes. With this commit it is now possible to change the namespace and instance part of the carbon key string. This makes it possible to differentiate at more points or even group them easier together with other metrics, for example the database used by pdns.
dnsdist provides a couple metrics through the carbon system, which were not variable enough to be used in larger environments. With this commit two more variables are introduced, namespace and instance, to make it easier to group metrics in different groups.
pieterlexis left a comment
Thanks for this! I have indicated some style/syntax issues. Another issue is that the