Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Iterate batch points for OpenTelemetry output #244

Merged
merged 1 commit into from
Feb 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.spotify.ffwd.model.v2.Batch;
import com.spotify.ffwd.model.v2.Metric;
import com.spotify.ffwd.output.PluginSink;
import com.spotify.ffwd.util.BatchMetricConverter;
import eu.toolchain.async.AsyncFramework;
import eu.toolchain.async.AsyncFuture;
import io.grpc.ManagedChannel;
Expand Down Expand Up @@ -106,7 +107,10 @@ public void sendMetric(Metric metric) {

@Override
public void sendBatch(Batch batch) {
throw new RuntimeException("Batches are unsupported");
// TODO(hexedpackets): The batch point iteration is temporary.
// Multiple metrics can be more efficiently sent in a single protobuf
batch.getPoints().forEach(point ->
sendMetric(BatchMetricConverter.convertBatchMetric(batch, point)));
}

@Override
Expand Down