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/05/18 15:53:10 UTC

[GitHub] [skywalking] gxthrj opened a new issue #6971: Bug: The prometheus metrics type is wrong in TextParse.java

gxthrj opened a new issue #6971:
URL: https://github.com/apache/skywalking/issues/6971


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [ ] Question or discussion
   - [x] Bug
   - [ ] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### Question
   - What do you want to know?
   IMHO , The Prometheus metrics type is wrong in TextParse.java
   `ctx.type` should be set in with the second word in `# TYPE`.
   https://github.com/apache/skywalking/blob/master/oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/prometheus/parser/TextParser.java#L96
   https://github.com/apache/skywalking/blob/master/oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/prometheus/parser/TextParser.java#L109
   
   ___
   ### Bug
   - Which version of SkyWalking, OS, and JRE?
   master
   


-- 
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 #6971: Bug: The prometheus metrics type is wrong in TextParse.java

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


   Type is set here, 
   
   https://github.com/apache/skywalking/blob/e7d6b5457bcbdac370a4a7912766510253ec7f4b/oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/prometheus/parser/Context.java#L55


-- 
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] hanahmily commented on issue #6971: Bug: The prometheus metrics type is wrong in TextParse.java

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


   
   > Got it , but the second question is [here](https://github.com/apache/skywalking/blob/master/oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/prometheus/parser/TextParser.java#L109), I think should set `ctx.type` instead of `ctx.name`.
   
   The `addAllowNames` set the type in the next line
   


-- 
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] gxthrj commented on issue #6971: Bug: The prometheus metrics type is wrong in TextParse.java

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


   > Please update the link to perm link.
   
   Updated


-- 
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] gxthrj closed issue #6971: Bug: The prometheus metrics type is wrong in TextParse.java

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


   


-- 
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] hanahmily commented on issue #6971: Bug: The prometheus metrics type is wrong in TextParse.java

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


   It's a bit tricky here, but defaulting to  "Gauge" in the "HELP" line is intentional. 
   
   Referring to Prometheus metric specification, if there's no  "TYPE" line, the metric will be parsed as "untyped". But MAL CAN'T handle such metrics, will complain about missing type. 
   
   Based on that, I default it to "Gauge". 


-- 
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 #6971: Bug: The prometheus metrics type is wrong in TextParse.java

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


   


-- 
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] gxthrj commented on issue #6971: Bug: The prometheus metrics type is wrong in TextParse.java

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


   Thanks, understand.


-- 
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] gxthrj commented on issue #6971: Bug: The prometheus metrics type is wrong in TextParse.java

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


   @hanahmily PTAL, if you have time.


-- 
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] gxthrj commented on issue #6971: Bug: The prometheus metrics type is wrong in TextParse.java

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


   > It's a bit tricky here, but defaulting to "Gauge" in the "HELP" line is intentional.
   > 
   > Referring to Prometheus metric specification, if there's no "TYPE" line, the metric will be parsed as "untyped". But MAL CAN'T handle such metrics, will complain about missing type.
   > 
   > Based on that, I default it to "Gauge".
   
   Got it , but the second question is [here](https://github.com/apache/skywalking/blob/master/oap-server/server-library/library-util/src/main/java/org/apache/skywalking/oap/server/library/util/prometheus/parser/TextParser.java#L109), I think should set `ctx.type` instead of `ctx.name`.


-- 
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 #6971: Bug: The prometheus metrics type is wrong in TextParse.java

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


   Please update the link to perm link.


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