jerrypeng opened a new pull request #10208:
URL: https://github.com/apache/pulsar/pull/10208


   
   ### Motivation
   
   Due to the recent change to Pulsar Function local run in threaded mode that 
exposed metrics via a metrics server:
   
   https://github.com/apache/pulsar/pull/10156
   
   running multiple instances in threaded mode with metrics server turned on 
created a situation where instances attempted to register the same metric 
multiple times causing an exception with text
   
   ```Collector already registered that provides name ...```
   
   The above PR also started up a metrics server per threaded instance on a 
different port which is also not ideal.  Ideally, all metrics for all instances 
are exposed via single port and metrics server.
   
   ### Modifications
   
   Change the metrics code in functions/sources/sinks to allow registering 
metrics that already been registered. When that occurs, the existing metric 
will be returned from the register 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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to