Fix potential heap overflow when generating StatsD metric

Fixes a potential heap overflow when generating the name of a StatsD metric.

If the metric value is greater than 8 characters, it will overflow the `line` buffer.