merged same samples to a single sample, with a unique name and set of labels.
@@ -28,8 +28,8 @@ public class PrometheusUtil {
List<MetricFamilySamples> metricFamilySamples = new ArrayList<>(packetsByService.size());
- packetsByService.forEach(((serviceId, packets) -> {
Map<String, List<Sample>> samples = new HashMap<>();
+ packetsByService.forEach(((serviceId, packets) -> {
var serviceName = Collector.sanitizeMetricName(serviceId.id);
for (var packet : packets) {
