…sureName have been done, or if there is no sourceRegex configured.
Unlike in version 1.7.x, the globalPrefix is being applied to the metric name before it is run through the sourceRegex to pull out the source and discard the matching substring from the metric name. So instead of the sourceRegex being matched against the original statsd metric name, it's being matched against the metric name with the prefix added on the beginning, which causes unexpected results.
I've changed it so that the globalPrefix is applied at the same point the sanitizeName function is applied. I.e., those are the last things that happen to the metric name before it is set on the measure object.
…sureName have been done, or if there is no
sourceRegex
configured.Unlike in version 1.7.x, the
globalPrefix
is being applied to the metric name before it is run through thesourceRegex
to pull out thesource
and discard the matching substring from the metric name. So instead of thesourceRegex
being matched against the original statsd metric name, it's being matched against the metric name with the prefix added on the beginning, which causes unexpected results.I've changed it so that the
globalPrefix
is applied at the same point thesanitizeName
function is applied. I.e., those are the last things that happen to the metric name before it is set on themeasure
object.