skywalking: browser oal app error rate inaccurate
Search before asking
- I had searched in the issues and found no similar issues.
Apache SkyWalking Component
OAP server (apache/skywalking)
What happened
when there were all errors in one minute, the app error rate was 0%, the correct should be 100%.

and when the errors count were two times to normal pv, the app error rate was 200%, the correct shoud be 66%.

I checked the oal script and found that
browser_app_error_rate = from(BrowserAppTraffic.*).rate(trafficCategory == BrowserAppTrafficCategory.FIRST_ERROR,trafficCategory == BrowserAppTrafficCategory.NORMAL);
and corresponding the oal generated dispatcher is
private void doBrowserAppErrorRate(BrowserAppTraffic var1) {
BrowserAppErrorRateMetrics var2 = new BrowserAppErrorRateMetrics();
var2.setTimeBucket(var1.getTimeBucket());
var2.setEntityId(var1.getEntityId());
var2.combine((new EqualMatch()).match(var1.getTrafficCategory(), BrowserAppTrafficCategory.FIRST_ERROR), (new EqualMatch()).match(var1.getTrafficCategory(), BrowserAppTrafficCategory.NORMAL));
MetricsStreamProcessor.getInstance().in(var2);
}
I think the second parameter should be constant true, so that RateMetrics can work right, the browser app error rate will be less equal than 100%, and will not be 0 when there are all errors.
What you expected to happen
I expect 100% error rate when there are all errors in one minute; and expect error rate not over 100%.
How to reproduce
- In one minutes, only produce errorLogs, and then there will be only error count, but error rate to zero.
- In one minutes, produce errorLogs two times to normal perfData, and then the error rate will be 200%.
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project’s Code of Conduct
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (19 by maintainers)
@zhyyu I was confused by the same thing, but after digging deeper, the
BrowserAppTrafficare generated by 2 sources.Performance’s builder should generate
status==normalfor all pages, and errorlog’s builder reportsstatus== FIRST_ERROR