wu-sheng opened a new pull request, #155: URL: https://github.com/apache/skywalking-query-protocol/pull/155
## Summary Adds layer awareness to the alarm query surface. - New required field `AlarmMessage.layers: [String!]!` — the layer(s) the alarmed entity belonged to at the time the alarm was raised. A service can be observed under multiple layers simultaneously (e.g., `GENERAL` + `MESH`); each entry records one layer. - New optional argument `getAlarm(... , layers: [String!], ...)` — filter alarms whose underlying entity belongs to **any** of the given layers (set union, OR semantics). Empty / omitted = no layer filter applied (current behavior). Both fields use `String` to match the rest of the protocol (`Service.layers`, `listServices(layer: String)`) — the layer value space is free-form, with the canonical list documented at https://github.com/apache/skywalking/blob/master/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/Layer.java. ## Backward compatibility - `AlarmMessage.layers` is non-null on the wire. For pre-upgrade alarm records (no layer recorded on disk), the OAP backend will return an empty list — clients that don't request the field stay unaffected. - `getAlarm`'s new argument is optional. Existing queries continue to work. ## Companion PRs The OAP backend implementation (alarm record model + persistence + storage DAOs for BanyanDB / ES / JDBC) will land in a separate apache/skywalking PR that pins this submodule SHA once this merges. The resolver wiring (`AlarmQuery#getAlarm`) is part of the same OAP PR. ## Test plan - [ ] OAP backend PR builds against this commit - [ ] e2e: `getAlarm(layers: ["general"])` returns the matching alarm records 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
