You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/03/24 03:52:29 UTC

[GitHub] [bookkeeper] Shoothzj opened a new pull request #3137: fix duplicate typeline for prometheus type

Shoothzj opened a new pull request #3137:
URL: https://github.com/apache/bookkeeper/pull/3137


   Fixes #3136 
   
   Descriptions of the changes in this PR:
   
   ### Motivation
   
   fix duplicate typeline for prometheus type
   
   ### Changes
   
   remember the prometheus type, record in set, incase print again
   
   Master Issue: #3136 
   


-- 
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: issues-unsubscribe@bookkeeper.apache.org

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



[GitHub] [bookkeeper] Shoothzj commented on pull request #3137: fix duplicate typeline for prometheus type

Posted by GitBox <gi...@apache.org>.
Shoothzj commented on pull request #3137:
URL: https://github.com/apache/bookkeeper/pull/3137#issuecomment-1079576797


   @eolivelli @dlg99 PTAL


-- 
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: issues-unsubscribe@bookkeeper.apache.org

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



[GitHub] [bookkeeper] Shoothzj commented on pull request #3137: fix duplicate typeline for prometheus type

Posted by GitBox <gi...@apache.org>.
Shoothzj commented on pull request #3137:
URL: https://github.com/apache/bookkeeper/pull/3137#issuecomment-1079933204


   @eolivelli PTAL again thanks, I refractor `PrometheusTextFormatUtil` to `PrometheusTextFormat` to make it can serve two concurrent calls.
   
   For an alternate approach, I can add HashSet params to every method in `PrometheusTextFormatUtil`. I think that the former is better.


-- 
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: issues-unsubscribe@bookkeeper.apache.org

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



[GitHub] [bookkeeper] Shoothzj commented on a change in pull request #3137: fix duplicate typeline for prometheus type

Posted by GitBox <gi...@apache.org>.
Shoothzj commented on a change in pull request #3137:
URL: https://github.com/apache/bookkeeper/pull/3137#discussion_r835907333



##########
File path: bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/prometheus/PrometheusMetricsProvider.java
##########
@@ -172,6 +172,7 @@ public StatsLogger getStatsLogger(String scope) {
 
     @Override
     public void writeAllMetrics(Writer writer) throws IOException {
+        PrometheusTextFormatUtil.reset();

Review comment:
       @eolivelli you are right, we don't know what will happen. Let me push a fix.




-- 
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: issues-unsubscribe@bookkeeper.apache.org

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



[GitHub] [bookkeeper] eolivelli commented on a change in pull request #3137: fix duplicate typeline for prometheus type

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #3137:
URL: https://github.com/apache/bookkeeper/pull/3137#discussion_r835901727



##########
File path: bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/prometheus/PrometheusMetricsProvider.java
##########
@@ -172,6 +172,7 @@ public StatsLogger getStatsLogger(String scope) {
 
     @Override
     public void writeAllMetrics(Writer writer) throws IOException {
+        PrometheusTextFormatUtil.reset();

Review comment:
       This is a sign of something going wrong.
   
   What happens with two concurrent calls to this method?




-- 
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: issues-unsubscribe@bookkeeper.apache.org

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



[GitHub] [bookkeeper] eolivelli merged pull request #3137: fix duplicate typeline for prometheus type

Posted by GitBox <gi...@apache.org>.
eolivelli merged pull request #3137:
URL: https://github.com/apache/bookkeeper/pull/3137


   


-- 
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: issues-unsubscribe@bookkeeper.apache.org

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