You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/04/01 20:34:00 UTC

[GitHub] [pulsar-client-go] michaeljmarshall opened a new issue #500: Make Topic Level Prometheus Metrics Optional

michaeljmarshall opened a new issue #500:
URL: https://github.com/apache/pulsar-client-go/issues/500


   **Is your feature request related to a problem? Please describe.**
   In `0.4.0`, https://github.com/apache/pulsar-client-go/pull/410 introduced topic level prometheus metrics. When consuming from or publishing to many topics, this creates many metrics and can cause problems for applications and/or prometheus instances. In my case, I saw up to 900k metrics produced by a single client, which caused memory problems in my application and temporarily brought down my prometheus server.
   
   **Describe the solution you'd like**
   I would like to be able to enable or disable the topic level metrics. I think these topic level metrics should be disabled by default, since that was the previous behavior.
   
   **Describe alternatives you've considered**
   I looked into the code introduced in `0.4.0`, and I don't see any ways to prevent these metrics from being created currently.
   
   **Additional context**
   I like the metrics I get out of the client in `0.3.0`. I think it's great to have them out of the box.
   
   Also, the cardinality of metrics is preventing me from upgrading my go client from `0.3.0` to `0.4.0`.


-- 
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] [pulsar-client-go] michaeljmarshall commented on issue #500: Make Topic Level Prometheus Metrics Optional

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on issue #500:
URL: https://github.com/apache/pulsar-client-go/issues/500#issuecomment-823434139


   @wolfstudy - are you able to help provide insight into this feature request?


-- 
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] [pulsar-client-go] michaeljmarshall commented on issue #500: Make Topic Level Prometheus Metrics Optional

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on issue #500:
URL: https://github.com/apache/pulsar-client-go/issues/500#issuecomment-817087868


   @merlimat - I notice that you created the metrics in https://github.com/apache/pulsar-client-go/pull/410. Do you have any thoughts on adding this feature and if so, how hard it would be to implement? Thanks!


-- 
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] [pulsar-client-go] fistan684 commented on issue #500: Make Topic Level Prometheus Metrics Optional

Posted by GitBox <gi...@apache.org>.
fistan684 commented on issue #500:
URL: https://github.com/apache/pulsar-client-go/issues/500#issuecomment-906811782


   @wolfstudy Would be great to see this feature added. We use a lot of topics (30k) and we're still stuck using 0.3 at the moment until we can turn these off. Hoping it can stay in the 0.7 milestone.


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar-client-go] wolfstudy closed issue #500: Make Topic Level Prometheus Metrics Optional

Posted by GitBox <gi...@apache.org>.
wolfstudy closed issue #500:
URL: https://github.com/apache/pulsar-client-go/issues/500


   


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar-client-go] michaeljmarshall commented on issue #500: Make Topic Level Prometheus Metrics Optional

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on issue #500:
URL: https://github.com/apache/pulsar-client-go/issues/500#issuecomment-823475870


   @merlimat - no worries, thank you for your helpful response. That makes sense, and it'll be great to get it in `0.5.0`.


-- 
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] [pulsar-client-go] merlimat commented on issue #500: Make Topic Level Prometheus Metrics Optional

Posted by GitBox <gi...@apache.org>.
merlimat commented on issue #500:
URL: https://github.com/apache/pulsar-client-go/issues/500#issuecomment-823453420


   @michaeljmarshall Missed your comment earlier. I don't think it would be hard to add the configuration. 
   
   We'd just need some kind of enum setting in the `ClientOptions` to select the appropriate level of metric. 
   
   Right now the labels selected are: https://github.com/apache/pulsar-client-go/blob/ec40d795841b1d61f7cbb07fad08e3c587db8801/pulsar/internal/metrics.go#L24
   
   I believe, with just few adjustments it should be possible disable different labels. 
   Eg:  we could have an enum like : 
   
   ```go
   type MetricsCardinality int
   
   const (
   	Namespace MetricsCardinality = iota // Default value
   	Tenant
   	Topic
           None
   )
   ```


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