tomsun28 commented on code in PR #3673:
URL: https://github.com/apache/hertzbeat/pull/3673#discussion_r2301583004
##########
hertzbeat-common/src/main/java/org/apache/hertzbeat/common/entity/alerter/AlertDefine.java:
##########
@@ -100,6 +100,11 @@ public class AlertDefine {
@Size(max = 100)
private String datasource;
+ @Schema(title = "Query Expression", example = "SELECT * FROM metrics WHERE
value > 90")
+ @Size(max = 2048)
+ @Column(length = 2048)
+ private String queryExpr;
+
Review Comment:
Why recommend using a single expression instead of two
- Ease of sharing and dissemination, similar to a PromQL threshold
expression or an expression like `{level="error"} |~ ".*(timeout|exception).*"`
or a sql, which makes it very convenient to share and propagate.
- Unified design, keeping it consistent with the design of other existing
types of expressions, where the expression itself includes both the data query
and the trigger condition. like the PromQL、Loki、ELK.
- For future unification of expressions, we can consider defining our own
unified expression rules for external use, and internally implement them based
on different dependencies.
- AI can better understand and generate expressions throught one expr.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]