Open chensunny opened 1 week ago
@chensunny, can you please share the response formats in case of alerts and dashboards?
@srikanthccv, can you please help me how to reproduce this issue based on the data in staging environment?
https://signoz.automizely.org/api/v1/testRule
another issue, it will test fail if there is a multiplication or a departure in formula
!!!
(B-A)/A
signoz.automizely.org/api/v1/testRule
another issue, it will test fail if there is a multiplication or a departure in
formula
!!!(B-A)/A
@chensunny please be a little more descriptive about the problem. It's not possible to understand what you mean by this.
can you please help me how to reproduce this issue based on the data in staging environment?
I will share loom video.
It's easy to reproduce this issue. Here's an example process to reproduce.
Then, you will find the F1 result is wrong.
Three reasons result in this issue.
First, the query should bev4/query_range
, v3/query_range is totally wrong if we calculate the week-over-week day-over-day data.
Add "version":"v4"
to alert rule should fix the issue in panel.
But it's not fixed in alert.
The second reason is that the query A will not prepare ShiftBy field. So A and B query will request same time range data.
Assign a correct ShiftBy
should the query issue.
For now. The issue issue is still not fixed.
The third reason is postProcess functions need to align timeshift A query result. Then the A and B query result can be calculated at same timestamp value.
timeShift functions value should updated to 86400
from "86400"
The PR https://github.com/SigNoz/signoz/pull/6209 can only fix the alert panel issue. But the alert with timeshift functions is still not good, because the timeshift is not calculated correctly when evaluating alert rule in backend.
The third reason is postProcess functions need to align timeshift A query result
But the alert with timeshift functions is still not good, because the timeshift is not calculated correctly when evaluating alert rule in backend
What do you mean by this? Please elaborate!
The third reason is postProcess functions need to align timeshift A query result
The default timeshift functions value is string. And ApplyFunctions
will take it as 0.
For example, the timeShift functions configs are as follow:
{"functions":[{"name":"timeShift","args":["604800"]}]}
The "604800" is not work for alert.
{"functions":[{"name":"timeShift","args":[604800]}]}
The int 604800 should work for alert.
But the alert with timeshift functions is still not good, because the timeshift is not calculated correctly when evaluating alert rule in backend
What do you mean by this? Please elaborate!
{"functions":[{"name":"timeShift","args":[604800]}]}
The query range API will process the timeShift function and calculate the time shift value and assign to ShiftBy. According to the ShiftBy value, the start and end time of the query will be re-calculated.
But when running alert rule, The ShiftBy is always 0. Because the timeShift function is never executed.
So A and B query will get same result even their timeShift functions configs are different.
You are correct. We will fix that bug as well.
Bug description
Please describe.
If this affects the front-end, screenshots would be of great help.
Alert has issues when use time shift & formula likes. it works well in Dashboard but wrong is alert.
Expected behavior
How to reproduce
Version information
Additional context
I think because Dashboard use v4 api and Alert use v3 API (edited) Can you change the alert to V4 API??
Thank you for your bug report – we love squashing them!