*/
@Override
public void record(final String name, final long value,
final String xtratag) {
final IncomingDataPoint dp = new IncomingDataPoint();
dp.setMetric(prefix + "." + name);
dp.setTimestamp(System.currentTimeMillis() / 1000L);
dp.setValue(Long.toString(value));
String tagk = "";
if (xtratag != null) {
if (xtratag.indexOf('=') != xtratag.lastIndexOf('=')) {
throw new IllegalArgumentException("invalid xtratag: " + xtratag
+ " (multiple '=' signs), name=" + name + ", value=" + value);
} else if (xtratag.indexOf('=') < 0) {
throw new IllegalArgumentException("invalid xtratag: " + xtratag
+ " (missing '=' signs), name=" + name + ", value=" + value);
}
final String[] pair = xtratag.split("=");
tagk = pair[0];
addExtraTag(tagk, pair[1]);
}
addHostTag(canonical);
final HashMap<String, String> tags =
new HashMap<String, String>(extratags);
dp.setTags(tags);
dps.add(dp);
if (!tagk.isEmpty()) {
clearExtraTag(tagk);
}