lhotari commented on issue #25212:
URL: https://github.com/apache/pulsar/issues/25212#issuecomment-3851525338

   > I'm wondering how to deal with `MemoryBufferStats` in multiple Pulsar 
clients? Should they also be shared across multiple clients? I think 
`MemoryBufferStats` and `MemoryLimitController` should have a one-to-one 
relationship, but I'm not sure if my understanding is correct.
   
   Yes, that's correct. 
`org.apache.pulsar.client.impl.PulsarClientSharedResourcesImpl` would also have 
to hold the `MemoryBufferStats` instance. 
   
   > I'm not very familiar with OpenTelemetry, seems all the 
`MemoryBufferStats` instances use the same meter name in the master branch? 
Would that be a problem?
   
   I don't think it's a problem, however it would require allowing to pass a 
`org.apache.pulsar.client.impl.metrics.InstrumentProvider` instance to the 
PulsarClientSharedResources builder so that the `MemoryBufferStats` could be 
configured appropriately. Right now the situation seems to be that there 
doesn't seem to be a way to distinguish values when there are multiple Pulsar 
client instances in a single JVM. I'd assume that there should be a way to 
configure common Otel attributes in InstrumentProvider, but that's missing. 
Since it's missing, I think that the concern could be ignored initially and 
just ensuring that the instrument provider given to PulsarClientSharedResources 
builder would be used. I think that the instrument provider instance should 
also be set to the pulsar client builder unless it's already been set.
   
   
   
   


-- 
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: [email protected]

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

Reply via email to