You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "wankai123 (via GitHub)" <gi...@apache.org> on 2025/02/10 07:28:05 UTC

[PR] Bseline: Support query baseline with MQE and use in the Alarm Rule. [skywalking]

wankai123 opened a new pull request, #13024:
URL: https://github.com/apache/skywalking/pull/13024

   - [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
   - [X] Update the documentation to include this new feature.
   - [X] Tests(including UT, IT, E2E) are added to verify the new feature.
   - [ ] If it's UI related, attach the screenshots below.
   
   - [ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #<issue number>.
   - [X] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).
   


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Baseline: Support query baseline with MQE and use in the Alarm Rule. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #13024:
URL: https://github.com/apache/skywalking/pull/13024#discussion_r1948641108


##########
docs/en/api/metrics-query-expression.md:
##########
@@ -494,6 +494,34 @@ metric{label1='a', label2='2c'}
 metric{label1='a', label2='2a'}
 ```
 
+### Baseline Operation
+Baseline Operation takes an expression and gets the baseline predicted values of the input metric.
+
+Expression:
+```text
+baseline(Expression, <baseline_type>)
+```
+
+- `baseline_type` is the type of the baseline predicted value. The type can be `value`, `upper`, `lower`.
+
+for example:
+If we want to get the baseline predicted `upper` values of the `service_resp_time` metric, we can use the following expression:
+```text
+baseline(service_resp_time, upper)
+```
+
+**Notice**:
+- This feature is required to enable the `baseline module` and deploy a baseline service. And the baseline service should implement the protocol of the [baseline.proto](../../../oap-server/metrics-baseline/src/main/proto/baseline.proto).
+Otherwise, the result will be empty.
+- The baseline operation is only supported by the metrics that support the baseline data, which defined in the baseline service.
+If the metric not supported or has no baseline data, the result will be empty.

Review Comment:
   ```suggestion
   Otherwise, the result will be empty, which means there is no baseline or predicated value.
   ```



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Baseline: Support query baseline with MQE and use in the Alarm Rule. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #13024:
URL: https://github.com/apache/skywalking/pull/13024


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Baseline: Support query baseline with MQE and use in the Alarm Rule. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #13024:
URL: https://github.com/apache/skywalking/pull/13024#discussion_r1948685177


##########
docs/en/api/metrics-query-expression.md:
##########
@@ -494,6 +494,34 @@ metric{label1='a', label2='2c'}
 metric{label1='a', label2='2a'}
 ```
 
+### Baseline Operation
+Baseline Operation takes an expression and gets the baseline predicted values of the input metric.
+
+Expression:
+```text
+baseline(Expression, <baseline_type>)
+```
+
+- `baseline_type` is the type of the baseline predicted value. The type can be `value`, `upper`, `lower`.
+
+for example:
+If we want to get the baseline predicted `upper` values of the `service_resp_time` metric, we can use the following expression:
+```text
+baseline(service_resp_time, upper)
+```
+
+**Notice**:
+- This feature is required to enable the `baseline module` and deploy a baseline service. And the baseline service should implement the protocol of the [baseline.proto](../../../oap-server/metrics-baseline/src/main/proto/baseline.proto).
+Otherwise, the result will be empty.
+- The baseline operation requires the relative metrics declared through baseline service.
+Otherwise, the result will be empty, which means there is no baseline or predicated value.
+- For now, the time bucket step of the predicted value is `HOUR`. 
+And the metric values provided within this baseline are at a minute-level granularity. 

Review Comment:
   ```suggestion
   And the predicated values provided within this baseline are at a minute-level granularity. 
   ```



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Baseline: Support query baseline with MQE and use in the Alarm Rule. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #13024:
URL: https://github.com/apache/skywalking/pull/13024#discussion_r1948702093


##########
docs/en/api/metrics-query-expression.md:
##########
@@ -494,6 +494,34 @@ metric{label1='a', label2='2c'}
 metric{label1='a', label2='2a'}
 ```
 
+### Baseline Operation
+Baseline Operation takes an expression and gets the baseline predicted values of the input metric.
+
+Expression:
+```text
+baseline(Expression, <baseline_type>)
+```
+
+- `baseline_type` is the type of the baseline predicted value. The type can be `value`, `upper`, `lower`.
+
+for example:
+If we want to get the baseline predicted `upper` values of the `service_resp_time` metric, we can use the following expression:
+```text
+baseline(service_resp_time, upper)
+```
+
+**Notice**:
+- This feature is required to enable the `baseline module` and deploy a baseline service. And the baseline service should implement the protocol of the [baseline.proto](../../../oap-server/metrics-baseline/src/main/proto/baseline.proto).
+Otherwise, the result will be empty.
+- The baseline operation requires the relative metrics declared through baseline service.
+Otherwise, the result will be empty, which means there is no baseline or predicated value.
+- For now, the time bucket step of the predicted value is `HOUR`. 

Review Comment:
   ```suggestion
   - For now, the predictions aim to every hour.
   ```



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Baseline: Support query baseline with MQE and use in the Alarm Rule. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on PR #13024:
URL: https://github.com/apache/skywalking/pull/13024#issuecomment-2647771793

   Later, an OSS implementation will be here, https://github.com/SkyAPM/SkyPredictor


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Baseline: Support query baseline with MQE and use in the Alarm Rule. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #13024:
URL: https://github.com/apache/skywalking/pull/13024#discussion_r1948761463


##########
docs/en/api/metrics-query-expression.md:
##########
@@ -494,6 +494,34 @@ metric{label1='a', label2='2c'}
 metric{label1='a', label2='2a'}
 ```
 
+### Baseline Operation
+Baseline Operation takes an expression and gets the baseline predicted values of the input metric.
+
+Expression:
+```text
+baseline(Expression, <baseline_type>)
+```
+
+- `baseline_type` is the type of the baseline predicted value. The type can be `value`, `upper`, `lower`.
+
+for example:
+If we want to get the baseline predicted `upper` values of the `service_resp_time` metric, we can use the following expression:
+```text
+baseline(service_resp_time, upper)
+```
+
+**Notice**:
+- This feature is required to enable the `baseline module` and deploy a baseline service. And the baseline service should implement the protocol of the [baseline.proto](../../../oap-server/metrics-baseline/src/main/proto/baseline.proto).
+Otherwise, the result will be empty.
+- The baseline operation requires the relative metrics declared through baseline service.
+Otherwise, the result will be empty, which means there is no baseline or predicated value.
+- For now, the predictions aim to every hour.
+And the predicated values provided within this baseline are at a minute-level granularity. 
+For example, it includes metrics such as the number of visits per minute. So if the query step is `MINUTE` and duration is in a same hour, the returned value will be same in every minute.

Review Comment:
   ```suggestion
   And the predicated values provided within this baseline are at a minute-level granularity. 
   As a result, for CPM(calls per minute), when the query step is `MINUTE` and duration is in a full hour, the returned values are same in every minute of this whole hour.
   ```
   
   I adjust the description a little.
   



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Baseline: Support query baseline with MQE and use in the Alarm Rule. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #13024:
URL: https://github.com/apache/skywalking/pull/13024#discussion_r1948637002


##########
docs/en/api/metrics-query-expression.md:
##########
@@ -494,6 +494,34 @@ metric{label1='a', label2='2c'}
 metric{label1='a', label2='2a'}
 ```
 
+### Baseline Operation
+Baseline Operation takes an expression and gets the baseline predicted values of the input metric.
+
+Expression:
+```text
+baseline(Expression, <baseline_type>)
+```
+
+- `baseline_type` is the type of the baseline predicted value. The type can be `value`, `upper`, `lower`.
+
+for example:
+If we want to get the baseline predicted `upper` values of the `service_resp_time` metric, we can use the following expression:
+```text
+baseline(service_resp_time, upper)
+```
+
+**Notice**:
+- This feature is required to enable the `baseline module` and deploy a baseline service. And the baseline service should implement the protocol of the [baseline.proto](../../../oap-server/metrics-baseline/src/main/proto/baseline.proto).
+Otherwise, the result will be empty.
+- The baseline operation is only supported by the metrics that support the baseline data, which defined in the baseline service.

Review Comment:
   ```suggestion
   - The baseline operation requires the relative metrics declared through baseline service.
   ```



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Bseline: Support query baseline with MQE and use in the Alarm Rule. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #13024:
URL: https://github.com/apache/skywalking/pull/13024#discussion_r1948536868


##########
docs/en/api/metrics-query-expression.md:
##########
@@ -494,6 +494,34 @@ metric{label1='a', label2='2c'}
 metric{label1='a', label2='2a'}
 ```
 
+### Baseline Operation
+Baseline Operation takes an expression and gets the baseline predict values of the input metric.

Review Comment:
   And there are several in the following docs.



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Bseline: Support query baseline with MQE and use in the Alarm Rule. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #13024:
URL: https://github.com/apache/skywalking/pull/13024#discussion_r1948536357


##########
docs/en/api/metrics-query-expression.md:
##########
@@ -494,6 +494,34 @@ metric{label1='a', label2='2c'}
 metric{label1='a', label2='2a'}
 ```
 
+### Baseline Operation
+Baseline Operation takes an expression and gets the baseline predict values of the input metric.

Review Comment:
   ```suggestion
   Baseline Operation takes an expression and gets the baseline predicted values of the input metric.
   ```



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org