From 2a031dae776eeab2b268da2e25b0a1e39e1b1b30 Mon Sep 17 00:00:00 2001 From: Gao Hongtao Date: Sun, 26 Jul 2020 11:19:22 +0800 Subject: [PATCH] Fix histogram labels are absent (#5173) --- .../oap/server/library/util/prometheus/parser/Context.java | 1 + 1 file changed, 1 insertion(+) diff --git a/oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/prometheus/parser/Context.java b/oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/prometheus/parser/Context.java index ef4c4b505..d0482fea8 100644 --- a/oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/prometheus/parser/Context.java +++ b/oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/prometheus/parser/Context.java @@ -116,6 +116,7 @@ public class Context { Histogram.HistogramBuilder hBuilder = Histogram.builder(); hBuilder.name(name).timestamp(now); samples.forEach(textSample -> { + hBuilder.labels(textSample.getLabels()); if (textSample.getName().endsWith("_count")) { hBuilder.sampleCount((long) convertStringToDouble(textSample.getValue())); } else if (textSample.getName().endsWith("_sum")) {