in remote/src/main/java/com/spotify/metrics/remote/SemanticAggregatorMetricBuilder.java [188:210]
public RemoteHistogram newMetric(
final MetricId id,
final List<String> shardKey,
final Remote remote) {
final Map<String, String> allAttributes =
SemanticAggregator.buildAttributes(id, "histogram");
final String shard =
Sharder.buildShardKey(shardKey, allAttributes);
return new RemoteHistogram() {
@Override
public ListenableFuture<Integer> update(long value) {
return remote.post(
"/",
shard,
SemanticAggregator.buildDocument(
Long.toString(value),
id.getKey(),
allAttributes));
}
};
}