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/06/10 03:37:42 UTC

[GitHub] [skywalking] xdRight opened a new issue #7093: Is this an error example in the document?

xdRight opened a new issue #7093:
URL: https://github.com/apache/skywalking/issues/7093


   **When I follow the example from document to add the OAL to the /config/oal/core.oal**
   ![image](https://user-images.githubusercontent.com/34833891/121459005-098b1f80-c9dd-11eb-8cab-a54f12cfa6d0.png)
   ```
   2021-06-09 22:32:37,500 - org.apache.skywalking.oal.rt.OALRuntime - 420 [main] ERROR [] - Can't generate method doEndpointAbnormal for EndpointDispatcher.
   javassist.CannotCompileException: [source error] syntax error near "rce.get*())
   
   );
   
   org"
   	at javassist.CtNewMethod.make(CtNewMethod.java:84) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.CtNewMethod.make(CtNewMethod.java:50) ~[javassist-3.25.0-GA.jar:?]
   	at org.apache.skywalking.oal.rt.OALRuntime.generateDispatcherClass(OALRuntime.java:418) [oal-rt-8.5.0.jar:8.5.0]
   	at org.apache.skywalking.oal.rt.OALRuntime.generateClassAtRuntime(OALRuntime.java:197) [oal-rt-8.5.0.jar:8.5.0]
   	at org.apache.skywalking.oal.rt.OALRuntime.start(OALRuntime.java:166) [oal-rt-8.5.0.jar:8.5.0]
   	at org.apache.skywalking.oap.server.core.oal.rt.OALEngineLoaderService.load(OALEngineLoaderService.java:65) [server-core-8.5.0.jar:8.5.0]
   	at org.apache.skywalking.oap.server.analyzer.provider.AnalyzerModuleProvider.start(AnalyzerModuleProvider.java:116) [agent-analyzer-8.5.0.jar:8.5.0]
   	at org.apache.skywalking.oap.server.library.module.BootstrapFlow.start(BootstrapFlow.java:49) [library-module-8.5.0.jar:8.5.0]
   	at org.apache.skywalking.oap.server.library.module.ModuleManager.init(ModuleManager.java:60) [library-module-8.5.0.jar:8.5.0]
   	at org.apache.skywalking.oap.server.starter.OAPServerBootstrap.start(OAPServerBootstrap.java:43) [server-bootstrap-8.5.0.jar:8.5.0]
   	at org.apache.skywalking.oap.server.starter.OAPServerStartUp.main(OAPServerStartUp.java:26) [server-starter-8.5.0.jar:8.5.0]
   Caused by: javassist.compiler.SyntaxError: syntax error near "rce.get*())
   
   );
   
   org"
   	at javassist.compiler.Parser.parsePrimaryExpr(Parser.java:1268) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parsePostfix(Parser.java:1045) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseUnaryExpr(Parser.java:900) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseBinaryExpr(Parser.java:790) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseConditionalExpr(Parser.java:735) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseExpression(Parser.java:715) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parsePrimaryExpr(Parser.java:1257) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parsePostfix(Parser.java:1045) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseCast(Parser.java:933) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseUnaryExpr(Parser.java:898) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.binaryExpr2(Parser.java:821) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseBinaryExpr(Parser.java:796) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseConditionalExpr(Parser.java:735) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseExpression(Parser.java:715) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parsePrimaryExpr(Parser.java:1257) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parsePostfix(Parser.java:1045) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseCast(Parser.java:933) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseUnaryExpr(Parser.java:898) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseCast(Parser.java:921) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseUnaryExpr(Parser.java:898) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseBinaryExpr(Parser.java:790) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseConditionalExpr(Parser.java:735) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseExpression(Parser.java:715) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseArgumentList(Parser.java:1340) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseMethodCall(Parser.java:1192) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parsePostfix(Parser.java:1050) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseUnaryExpr(Parser.java:900) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseBinaryExpr(Parser.java:790) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseConditionalExpr(Parser.java:735) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseExpression(Parser.java:715) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseDeclarationOrExpression(Parser.java:608) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseStatement(Parser.java:295) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseBlock(Parser.java:307) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Parser.parseMethod2(Parser.java:172) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Javac.compileMethod(Javac.java:156) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.compiler.Javac.compile(Javac.java:102) ~[javassist-3.25.0-GA.jar:?]
   	at javassist.CtNewMethod.make(CtNewMethod.java:79) ~[javassist-3.25.0-GA.jar:?]
   	... 10 more
   2021-06-09 22:32:37,504 - org.apache.skywalking.oal.rt.OALRuntime - 424 [main] ERROR [] - Method body as following
   private void doEndpointAbnormal(org.apache.skywalking.oap.server.core.source.Endpoint source) {
   org.apache.skywalking.oap.server.core.source.oal.rt.metrics.EndpointAbnormalMetrics metrics = new org.apache.skywalking.oap.server.core.source.oal.rt.metrics.EndpointAbnormalMetrics();
   
           if (!new org.apache.skywalking.oap.server.core.analysis.metrics.expression.InMatch().match(source.getResponseCode(), new long[]{404,500,503})) {
           return;
           }
   
   metrics.setTimeBucket(source.getTimeBucket());
       metrics.setEntityId(source.getEntityId());
       metrics.setServiceId(source.getServiceId());
   metrics.combine(
           (long)(source.get*())
   
   );
   
   org.apache.skywalking.oap.server.core.analysis.worker.MetricsStreamProcessor.getInstance().in(metrics);
   }
   ```
   After I modified the `sum` to `count`, it works well.
   
   ### Question
   Is this an error example in the document?
   
   I use skywalking 8.5.0, centos 7 and jdk8
   


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

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



[GitHub] [skywalking] wu-sheng commented on issue #7093: Is this an error example in the document?

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


   Yes, this is a doc issue. It should be `count`, could you send a pull request to fix the master branch and others on `website-docs/*` branches?


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

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



[GitHub] [skywalking] xdRight commented on issue #7093: Is this an error example in the document?

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


   I will try.


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

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



[GitHub] [skywalking] wu-sheng closed issue #7093: Is this an error example in the document?

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


   


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

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