You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/09/23 02:25:33 UTC

[GitHub] [skywalking] zhyyu opened a new issue #7773: browser oal app error rate inaccurate

zhyyu opened a new issue #7773:
URL: https://github.com/apache/skywalking/issues/7773


   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) 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%.
   ![image](https://user-images.githubusercontent.com/22634485/134445085-645504fc-fbac-4f6c-9fe2-6d9a2aff561a.png)
   ![image](https://user-images.githubusercontent.com/22634485/134445115-c508dcb8-5651-41ab-bec3-c73fcca96575.png)
   
   and when the errors count were two times to normal pv, the app error rate was 200%, the correct shoud be 66%.
   ![image](https://user-images.githubusercontent.com/22634485/134445365-4c201e9f-4cd8-40d2-bbdc-88beea3575a0.png)
   
   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 1, 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
   
   1. In one minutes, only produce errorLogs, and then there will be only error count, but error rate to zero.
   2. 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?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925475276


   > browser_app_error_rate = from(BrowserAppTraffic.*).rate(trafficCategory == BrowserAppTrafficCategory.FIRST_ERROR,trafficCategory == BrowserAppTrafficCategory.NORMAL);
   
   This is the OAL script, it says `error count / correct count`. If this is not expected, then this is a bug. We should use `percent` to replace.


-- 
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



[GitHub] [skywalking] Fine0830 commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925473369


    I remember it's `error rate = js error count / all`. It's right? @arugal 


-- 
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



[GitHub] [skywalking] Fine0830 commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925597419


   I guess here is a single page case, and it didn't handle PV like this(https://github.com/apache/skywalking-client-js#spa-page). If so, the pages PV will be left out.


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925479549


   > browser_app_error_rate = from(BrowserAppTraffic.*).rate(trafficCategory == BrowserAppTrafficCategory.FIRST_ERROR,trafficCategory == BrowserAppTrafficCategory.NORMAL);
   browser_app_error_sum = from(BrowserAppTraffic.count).filter(trafficCategory != BrowserAppTrafficCategory.NORMAL).sum();
   
   @arugal If I compare these too, then `trafficCategory != BrowserAppTrafficCategory.NORMAL` must filter the correct access. In the first case, `trafficCategory == BrowserAppTrafficCategory.NORMAL` is not all of traffic. Please correct me if I am wrong.


-- 
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



[GitHub] [skywalking] Fine0830 commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925466849


   The error rate is JS error rate, and the error count includes JS errors and other types.


-- 
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



[GitHub] [skywalking] zhyyu closed issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
zhyyu closed issue #7773:
URL: https://github.com/apache/skywalking/issues/7773


   


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925483732


   > when the errors count were two times to normal pv
   
   The key point is here, this should not happen. @zhyyu Could you check your env, and find out why?


-- 
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



[GitHub] [skywalking] arugal commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
arugal commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925475985


   I think the current rate logic is correct, the numerator is the count of [firstReportedError](https://github.com/apache/skywalking-data-collect-protocol/blob/master/browser/BrowserPerf.proto#L100), and the denominator is the count of [BrowserPerfData](https://github.com/apache/skywalking-data-collect-protocol/blob/master/browser/BrowserPerf.proto#L42).


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-961548066


   No further update in 2 months.


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925526122


   @zhyyu I was confused by the same thing, but after digging deeper, the `BrowserAppTraffic` are generated by 2 sources.
   
   * org.apache.skywalking.oap.server.receiver.browser.provider.parser.performance.listener.SourceBuilder
   * org.apache.skywalking.oap.server.receiver.browser.provider.parser.errorlog.listener.SourceBuilder
   
   Performance's builder should generate `status==normal` for all pages, and errorlog's builder reports `status== FIRST_ERROR`


-- 
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



[GitHub] [skywalking] zhyyu commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
zhyyu commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925524931


   Well, the `skywalking-client-js` version is 0.6.0. I found sometimes, the rate will be 100.54% which over 100%; So I copy the params and curl it make two manual situation(1. in one minute there are all errors, 2. in one minute error are two times to normal).
   
   My question is that current error rate is (error / normal), it confuses me a lot. I think common error rate definition should be (error / all) like this `browser_app_error_rate = from(BrowserAppTraffic.*).rate(trafficCategory != BrowserAppTrafficCategory.NORMAL,trafficCategory != null);`
   
   @arugal @Fine0830 @wu-sheng 
   


-- 
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



[GitHub] [skywalking] arugal commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
arugal commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925484402


   @zhyyu Which version of `skywalking-client-js` are you using ?


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-961548066


   No further update in 2 months.


-- 
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



[GitHub] [skywalking] wu-sheng closed issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #7773:
URL: https://github.com/apache/skywalking/issues/7773


   


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925482827


   @zhyyu Could you check the raw data?  Is there a case, a single page reports error twice?
   
   @Fine0830 Every PV, there should be 0 or 1(firstReportedError=true) error.


-- 
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



[GitHub] [skywalking] arugal edited a comment on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
arugal edited a comment on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925478411


   @Fine0830  We should check whether [skywalk-client-js](https://github.com/apache/skywalking-client-js) handle `firstReportedError` correctly ?


-- 
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



[GitHub] [skywalking] zhyyu commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
zhyyu commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925477662


   um mistake operator... how to reopen it... I think current logic is very misleading.


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925526573


   If the result is incorrect, I want to check, when page occurs error, whether
   1. `performance` data gets reported
   2. `errorlog` data only includes one and only one `FIRST_ERROR` status record.


-- 
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



[GitHub] [skywalking] wu-sheng closed issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #7773:
URL: https://github.com/apache/skywalking/issues/7773


   


-- 
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



[GitHub] [skywalking] wu-sheng closed issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #7773:
URL: https://github.com/apache/skywalking/issues/7773


   


-- 
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



[GitHub] [skywalking] arugal commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
arugal commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925478411


   @Fine0830  We should check whether [skywalk-client-js](https://github.com/apache/skywalking-client-js) handle firstReportedError correctly ?


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-961548066


   No further update in 2 months.


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925467930


   > I think the current rule is `error count / correct count`, @zhyyu is asking for `percent` function, which is `error count / all`.
   
   @Fine0830 @arugal which one do you design for?


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925467322


   I think the current rule is `error count / correct count`, @zhyyu is asking for `percent` function, which is `error count / all`.


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925476946


   `isDenominator` is true only when `trafficCategory == BrowserAppTrafficCategory.NORMAL`. So, some `BrowserAppTraffic` doesn't count as denominator.


-- 
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



[GitHub] [skywalking] Fine0830 commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925480684


   > @Fine0830 We should check whether [skywalk-client-js](https://github.com/apache/skywalking-client-js) handle `firstReportedError` correctly ?
   
   Uh.... I believe it is correct. If there is an incorrect scene, please let me know.
   


-- 
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



[GitHub] [skywalking] zhyyu commented on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
zhyyu commented on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925477110


   > I think the current rate logic is correct, the numerator is the count of [firstReportedError](https://github.com/apache/skywalking-data-collect-protocol/blob/master/browser/BrowserPerf.proto#L100), and the denominator is the count of [BrowserPerfData](https://github.com/apache/skywalking-data-collect-protocol/blob/master/browser/BrowserPerf.proto#L42).
   
   


-- 
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



[GitHub] [skywalking] zhyyu removed a comment on issue #7773: browser oal app error rate inaccurate

Posted by GitBox <gi...@apache.org>.
zhyyu removed a comment on issue #7773:
URL: https://github.com/apache/skywalking/issues/7773#issuecomment-925477110


   > I think the current rate logic is correct, the numerator is the count of [firstReportedError](https://github.com/apache/skywalking-data-collect-protocol/blob/master/browser/BrowserPerf.proto#L100), and the denominator is the count of [BrowserPerfData](https://github.com/apache/skywalking-data-collect-protocol/blob/master/browser/BrowserPerf.proto#L42).
   
   


-- 
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