On my Java application I\'m populating a metric with NewRelic Agent:
NewRelic.getAgent().getMetricAggregator().incrementCounter("nameMetric", value)