mimaison commented on PR #18935:
URL: https://github.com/apache/kafka/pull/18935#issuecomment-2776351491

   I looked into this further and I'm wondering if it makes sense to add 
KIP-877 support to this plugin.
   
   `KafkaPrincipalBuilder` instances are created for each `KafkaChannel`. In 
practice it turns out that on the same listener we can create a new channel 
before the previous one is closed, so with the current proposal their metrics 
would collide. A fix is to add the `connection-id` to the tags as that uniquely 
identify a channel.
   
   Another complication is that instances of `KafkaPrincipalBuilder` are 
created by all our `Selector` instances, and we have quite a few, some with 
similar tags and many without any tags. We have broker to broker (replica 
fetchers, and transaction markers), broker to controller, data plane selectors 
on the server side. I'm starting to believe there may already be some metrics 
collisions as a few of these have no tags but because the internal metrics API 
is using "get or create" semantics we don't see it.
   
   In addition of these 2 reasons, `KafkaPrincipalBuilder` instances are closed 
when the channel is closed. This makes it pretty hard to reliably test all 
combinations.


-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to