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

wu-sheng pushed a commit to branch alarm-layer-single
in repository https://gitbox.apache.org/repos/asf/skywalking-query-protocol.git

commit ae640c8b28a5cbb196385cd390c33224b5f010d3
Author: Wu Sheng <[email protected]>
AuthorDate: Mon May 18 20:28:54 2026 +0800

    alarm: collapse queryAlarms layers filter to single layer
    
    AlarmRecord persists a single layer column (the first entry of the
    entity's resolved layer list), so the symmetric filter shape on
    AlarmQueryCondition is also a single layer rather than a list. Drop
    the [String!] wrapper; clients that previously passed an array now
    pass the one value they care about.
    
    Also update the getAlarm @deprecated reason to match.
---
 alarm.graphqls | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/alarm.graphqls b/alarm.graphqls
index a40ea02..0d075c2 100644
--- a/alarm.graphqls
+++ b/alarm.graphqls
@@ -69,12 +69,12 @@ input AlarmQueryCondition {
     # behavior.
     entities: [Entity!]
 
-    # Filter on the underlying entity's layer. A service observed under
-    # multiple normal layers (e.g., GENERAL + K8S_SERVICE) matches when any
-    # one of them is in the list. See
+    # Filter on the underlying entity's layer. An alarm record is persisted
+    # with a single layer (the first one in the entity's resolved layer
+    # list); this filter matches that single value exactly. See
     # 
https://github.com/apache/skywalking/blob/master/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/Layer.java
     # for the canonical layer list.
-    layers: [String!]
+    layer: String
 
     # Filter by the alarm rule(s) that fired the alarm.
     ruleNames: [String!]
@@ -95,7 +95,7 @@ extend type Query {
     # and bundles every filter under a single input type so future additions
     # land without a method-signature change.
     getAlarm(duration: Duration!, scope: Scope, keyword: String, paging: 
Pagination!, tags: [AlarmTag]): Alarms
-        @deprecated(reason: "Use queryAlarms(condition) instead. getAlarm only 
exposes scope + keyword + tags filters; queryAlarms additionally supports 
entities (Entity-typed, multi-select) / ruleNames / layers and uses a single 
input type for future extensibility.")
+        @deprecated(reason: "Use queryAlarms(condition) instead. getAlarm only 
exposes scope + keyword + tags filters; queryAlarms additionally supports 
entities (Entity-typed, multi-select) / ruleNames / layer and uses a single 
input type for future extensibility.")
 
     # Query alarm records with the comprehensive filter set. Combine entity
     # (Entity-typed, multi-select), layer, rule-name, keyword, and tag filters

Reply via email to