[ 
https://issues.apache.org/jira/browse/KAFKA-12469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17897760#comment-17897760
 ] 

Apoorv Mittal commented on KAFKA-12469:
---------------------------------------

[~junrao] I also looked at this patch you mentioned 
[https://reviews.apache.org/r/30321/diff/2/] and trunk code today, I do see 
toScope() method (now in java). But the `getScope()` method from Yammer metrics 
seems not being utilized anywhere directly (some other reporters might use 
that). But for JMX and Telemetry reporters we utilize MBean name. The Mbean 
name has been populated without "." replacement.

So I think we should have consitency within Mbean itself as current Jira points 
difference of topic name in Mbean itself.

> The topic names in the metrics do not retain their format when extracting 
> through JMX.
> --------------------------------------------------------------------------------------
>
>                 Key: KAFKA-12469
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12469
>             Project: Kafka
>          Issue Type: Bug
>          Components: consumer, metrics
>            Reporter: Rafał Chmielewski
>            Assignee: Apoorv Mittal
>            Priority: Major
>         Attachments: JConsole - Kafka Client.png, Screenshot 2024-11-12 at 
> 21.35.59.png, image-2024-11-12-21-32-55-180.png
>
>
> I have topic names that have a period in the name:
> product.order
>  product.offering.price
>  
> However, for the metrics issued by JMX by a program that is a consumer of 
> Kafka messages, the dots are replaced with an underscore:
> kafka.consumer<type=consumer-fetch-manager-metrics, 
> client-id=consumer-export-4, topic=product_offering_price, 
> partition=1><>records-lead
>  
> This creates a problem if I want to calculate the customer's lag in relation 
> to the number of messages on Kafka.
>  
> But for the producer, this problem doesn't occur:
> kafka.producer<type=producer-topic-metrics, 
> client-id=bss.data.verification.pi_1, 
> topic=product.offering.price><>record-send-total
>  
> As a consumer I use Akka Alpakka. But I think it's using Apache library to 
> connect to Kafka and report metrics via JMX.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to