This is an automated email from the ASF dual-hosted git repository.

wankai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 95c03d5260 MQE: trim the label values condition for the labeled 
metrics query to enhance the readability. (#13674)
95c03d5260 is described below

commit 95c03d52602a1ca5c62365aa7219919cab1cc8e9
Author: Wan Kai <[email protected]>
AuthorDate: Tue Jan 20 15:09:00 2026 +0800

    MQE: trim the label values condition for the labeled metrics query to 
enhance the readability. (#13674)
---
 docs/en/changes/changes.md                                           | 1 +
 .../skywalking/oap/server/core/storage/query/IMetricsQueryDAO.java   | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index b8b3b52049..07d88d36ad 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -25,6 +25,7 @@
 * MQE: fix multiple labeled metric query and ensure no results are returned if 
no label value combinations match.
 * Fix `BrowserErrorLog` BanyanDB storage query order.
 * `BanyanDB Client`: Property query support `Order By`.
+* MQE: trim the label values condition for the labeled metrics query to 
enhance the readability.
 
 #### UI
 * Fix the missing icon in new native trace view.
diff --git 
a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/query/IMetricsQueryDAO.java
 
b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/query/IMetricsQueryDAO.java
index 9cf56f723a..3c190307d7 100644
--- 
a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/query/IMetricsQueryDAO.java
+++ 
b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/query/IMetricsQueryDAO.java
@@ -18,7 +18,9 @@
 
 package org.apache.skywalking.oap.server.core.storage.query;
 
+import com.google.common.base.Splitter;
 import com.google.common.base.Strings;
+import com.google.common.collect.Iterables;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -271,7 +273,8 @@ public interface IMetricsQueryDAO extends DAO {
                 String labelName = keyValue.getKey();
                 String labelValue = keyValue.getValue();
                 if (StringUtil.isNotBlank(labelValue)) {
-                    String[] subValues = labelValue.split(separator);
+                    String[] subValues = Iterables.toArray(
+                        
Splitter.on(separator).omitEmptyStrings().trimResults().split(labelValue), 
String.class);
                     for (String subValue : subValues) {
                         labelIndex.computeIfAbsent(labelName, key -> new 
ArrayList<>()).add(subValue);
                     }

Reply via email to