This is an automated email from the ASF dual-hosted git repository.
liuhan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-goapi.git
The following commit(s) were added to refs/heads/main by this push:
new a68ffc9 Bump up query protocol for alarm (#85)
a68ffc9 is described below
commit a68ffc997f463d3e675b684a2fb77c01b2d0e98c
Author: mrproliu <[email protected]>
AuthorDate: Tue Dec 31 10:43:38 2024 +0800
Bump up query protocol for alarm (#85)
---
dependencies.sh | 2 +-
query/schema.go | 28 ++++++++++++++++++----------
2 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/dependencies.sh b/dependencies.sh
index 6433f52..be271fa 100644
--- a/dependencies.sh
+++ b/dependencies.sh
@@ -18,7 +18,7 @@
# under the License.
export COLLECT_PROTOCOL_SHA=bd1f91f7e1cb4de9d9b5ccb71f36ce6b1c7c97f5
-export QUERY_PROTOCOL_SHA=092856bdfefd2353d134efade62c6421b4ef4854
+export QUERY_PROTOCOL_SHA=a9ed9eef09cf97256df9a33eab91fca1ba13096e
export ENVOY_SERVICE_PROTOCOL_SHA=533b32f1b390a3a88ec2008d0561e07c926d879a
export XDS_SERVICE_PROTOCOL_SHA=25de7278fc844d392d607214f36dbedf50f167ee
export PROTOC_VALIDATE_SHA=v0.6.1
diff --git a/query/schema.go b/query/schema.go
index 480ae4b..84261d6 100644
--- a/query/schema.go
+++ b/query/schema.go
@@ -9,12 +9,19 @@ import (
)
type AlarmMessage struct {
- StartTime int64 `json:"startTime"`
- Scope *Scope `json:"scope,omitempty"`
- ID string `json:"id"`
- Message string `json:"message"`
- Events []*Event `json:"events"`
- Tags []*KeyValue `json:"tags"`
+ StartTime int64 `json:"startTime"`
+ Scope *Scope `json:"scope,omitempty"`
+ ID string `json:"id"`
+ Name string `json:"name"`
+ Message string `json:"message"`
+ Events []*Event `json:"events"`
+ Tags []*KeyValue `json:"tags"`
+ Snapshot *AlarmSnapshot `json:"snapshot"`
+}
+
+type AlarmSnapshot struct {
+ Expression string `json:"expression"`
+ Metrics []*MQEMetric `json:"metrics"`
}
type AlarmTag struct {
@@ -22,10 +29,6 @@ type AlarmTag struct {
Value *string `json:"value,omitempty"`
}
-type AlarmTrend struct {
- NumOfAlarm []*int `json:"numOfAlarm"`
-}
-
type Alarms struct {
Msgs []*AlarmMessage `json:"msgs"`
}
@@ -583,6 +586,11 @@ type Logs struct {
DebuggingTrace *DebuggingTrace `json:"debuggingTrace,omitempty"`
}
+type MQEMetric struct {
+ Name string `json:"name"`
+ Results []*MQEValues `json:"results"`
+}
+
type MQEValue struct {
ID *string `json:"id,omitempty"`
Owner *Owner `json:"owner,omitempty"`