Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-09 Thread via GitHub


apoorvmittal10 commented on PR #21046:
URL: https://github.com/apache/kafka/pull/21046#issuecomment-3634271695

   Cherry-picked to 4.2 as well.


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



Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-09 Thread via GitHub


apoorvmittal10 merged PR #21046:
URL: https://github.com/apache/kafka/pull/21046


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



Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-08 Thread via GitHub


JimmyWang6 commented on PR #21046:
URL: https://github.com/apache/kafka/pull/21046#issuecomment-3630708842

   The comment is fixed, as well as the updated KIP. Please review:)


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



Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-08 Thread via GitHub


JimmyWang6 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2601372062


##
docs/ops.html:
##
@@ -3992,6 +3980,358 @@ Share Group 
Monitoring
+  The following set of metrics are available for monitoring the share group:
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  TotalShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareFetchRequestsPerSec,topic=([-.\w]+)
+  The fetch request rate per second.
+
+
+  FailedShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareFetchRequestsPerSec,topic=([-.\w]+)
+  The share fetch request rate for requests that failed.
+
+
+  TotalShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The acknowledgement request rate per second.
+
+
+  FailedShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The share acknowledgement request rate for requests that failed.
+
+
+  RecordAcknowledgementsPerSec
+  
kafka.server:type=ShareGroupMetrics,name=RecordAcknowledgementsPerSec,ackType={Accept|Release|Reject|Renew}
+  The rate per second of records acknowledged per acknowledgement 
type.
+
+
+  PartitionLoadTimeMs
+  kafka.server:type=ShareGroupMetrics,name=PartitionLoadTimeMs
+  The time taken to load the share partitions.
+
+
+  RequestTopicPartitionsFetchRatio
+  
kafka.server:type=ShareGroupMetrics,name=RequestTopicPartitionsFetchRatio,group=([-.\w]+)
+  The ratio of topic-partitions acquired to the total number of 
topic-partitions in share fetch request.
+
+
+  TopicPartitionsAcquireTimeMs
+  
kafka.server:type=ShareGroupMetrics,name=TopicPartitionsAcquireTimeMs,group=([-.\w]+)
+  The time elapsed (in millisecond) to acquire any topic partition for 
fetch.
+
+
+  AcquisitionLockTimeoutPerSec
+  
kafka.server:type=SharePartitionMetrics,name=AcquisitionLockTimeoutPerSec,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The rate of acquisition locks for records which are not acknowledged 
within the timeout.
+
+
+  InFlightMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight messages for the share partition.
+
+
+  InFlightBatchCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight batches for the share partition.
+
+
+  InFlightBatchMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of messages in the in-flight batch.
+
+
+  FetchLockTimeMs
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockTimeMs,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The time elapsed (in milliseconds) while a share partition is held 
under lock for fetching messages.
+
+
+  FetchLockRatio
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockRatio,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The fraction of time that share partition is held under lock.
+
+
+  ShareSessionEvictionsPerSec
+  
kafka.server:type=ShareSessionCache,name=ShareSessionEvictionsPerSec
+  The share session eviction rate per second.
+
+
+  SharePartitionsCount
+  kafka.server:type=ShareSessionCache,name=SharePartitionsCount
+  The number of cached share partitions.
+
+
+  ShareSessionsCount
+  kafka.server:type=ShareSessionCache,name=ShareSessionsCount
+  The number of cached share sessions.
+
+
+  NumDelayedOperations (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=ShareFetch
+  The number of delayed operations for share fetch purgatory.
+
+
+  PurgatorySize (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=ShareFetch
+  The number of requests waiting in the share fetch purgatory. This is 
high if share consumers use a large value for fetch.wait.max.ms.
+
+
+  ExpiresPerSec
+  kafka.server:type=DelayedShareFetchMetrics,name=ExpiresPerSec
+  The expired delayed share fetch operation rate per second.
+
+
+  
+
+  Coordinator Metrics
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  group-count
+  
kafka.server:type=group-coordinator-metrics,name=group-count,protocol=share
+  The total number of share groups managed by group 

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-08 Thread via GitHub


JimmyWang6 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2600676456


##
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareFetchMetricsRegistry.java:
##
@@ -60,18 +60,18 @@ public ShareFetchMetricsRegistry(Set tags, String 
metricGrpPrefix) {
 
 this.fetchSizeMax = new MetricNameTemplate("fetch-size-max", groupName,
 "The maximum number of bytes fetched per request", tags);
-this.bytesFetchedRate = new MetricNameTemplate("bytes-consumed-rate", 
groupName,
+this.bytesFetchedRate = new MetricNameTemplate("bytes-fetched-rate", 
groupName,
 "The average number of bytes consumed per second", tags);
-this.bytesFetchedTotal = new 
MetricNameTemplate("bytes-consumed-total", groupName,
+this.bytesFetchedTotal = new MetricNameTemplate("bytes-fetched-total", 
groupName,
 "The total number of bytes consumed", tags);
 
 this.recordsPerRequestAvg = new 
MetricNameTemplate("records-per-request-avg", groupName,
 "The average number of records in each request", tags);
 this.recordsPerRequestMax = new 
MetricNameTemplate("records-per-request-max", groupName,
 "The maximum number of records in a request.", tags);
-this.recordsFetchedRate = new 
MetricNameTemplate("records-consumed-rate", groupName,
+this.recordsFetchedRate = new 
MetricNameTemplate("records-fetched-rate", groupName,
 "The average number of records consumed per second", tags);
-this.recordsFetchedTotal = new 
MetricNameTemplate("records-consumed-total", groupName,
+this.recordsFetchedTotal = new 
MetricNameTemplate("records-fetched-total", groupName,

Review Comment:
   Sure, removed.



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



Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-08 Thread via GitHub


JimmyWang6 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2600675671


##
docs/ops.html:
##
@@ -3992,6 +3980,358 @@ Share Group 
Monitoring
+  The following set of metrics are available for monitoring the share group:
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  TotalShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareFetchRequestsPerSec,topic=([-.\w]+)
+  The fetch request rate per second.
+
+
+  FailedShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareFetchRequestsPerSec,topic=([-.\w]+)
+  The share fetch request rate for requests that failed.
+
+
+  TotalShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The acknowledgement request rate per second.
+
+
+  FailedShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The share acknowledgement request rate for requests that failed.
+
+
+  RecordAcknowledgementsPerSec
+  
kafka.server:type=ShareGroupMetrics,name=RecordAcknowledgementsPerSec,ackType={Accept|Release|Reject|Renew}
+  The rate per second of records acknowledged per acknowledgement 
type.
+
+
+  PartitionLoadTimeMs
+  kafka.server:type=ShareGroupMetrics,name=PartitionLoadTimeMs
+  The time taken to load the share partitions.
+
+
+  RequestTopicPartitionsFetchRatio
+  
kafka.server:type=ShareGroupMetrics,name=RequestTopicPartitionsFetchRatio,group=([-.\w]+)
+  The ratio of topic-partitions acquired to the total number of 
topic-partitions in share fetch request.
+
+
+  TopicPartitionsAcquireTimeMs
+  
kafka.server:type=ShareGroupMetrics,name=TopicPartitionsAcquireTimeMs,group=([-.\w]+)
+  The time elapsed (in millisecond) to acquire any topic partition for 
fetch.
+
+
+  AcquisitionLockTimeoutPerSec
+  
kafka.server:type=SharePartitionMetrics,name=AcquisitionLockTimeoutPerSec,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The rate of acquisition locks for records which are not acknowledged 
within the timeout.
+
+
+  InFlightMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight messages for the share partition.
+
+
+  InFlightBatchCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight batches for the share partition.
+
+
+  InFlightBatchMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of messages in the in-flight batch.
+
+
+  FetchLockTimeMs
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockTimeMs,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The time elapsed (in milliseconds) while a share partition is held 
under lock for fetching messages.
+
+
+  FetchLockRatio
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockRatio,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The fraction of time that share partition is held under lock.
+
+
+  ShareSessionEvictionsPerSec
+  
kafka.server:type=ShareSessionCache,name=ShareSessionEvictionsPerSec
+  The share session eviction rate per second.
+
+
+  SharePartitionsCount
+  kafka.server:type=ShareSessionCache,name=SharePartitionsCount
+  The number of cached share partitions.
+
+
+  ShareSessionsCount
+  kafka.server:type=ShareSessionCache,name=ShareSessionsCount
+  The number of cached share sessions.
+
+
+  NumDelayedOperations (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=ShareFetch
+  The number of delayed operations for share fetch purgatory.
+
+
+  PurgatorySize (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=ShareFetch
+  The number of requests waiting in the share fetch purgatory. This is 
high if share consumers use a large value for fetch.wait.max.ms.
+
+
+  ExpiresPerSec
+  kafka.server:type=DelayedShareFetchMetrics,name=ExpiresPerSec
+  The expired delayed share fetch operation rate per second.
+
+
+  
+
+  Coordinator Metrics
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  group-count
+  
kafka.server:type=group-coordinator-metrics,name=group-count,protocol=share
+  The total number of share groups managed by group 

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-08 Thread via GitHub


chia7712 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2600554436


##
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareFetchMetricsRegistry.java:
##
@@ -60,18 +60,18 @@ public ShareFetchMetricsRegistry(Set tags, String 
metricGrpPrefix) {
 
 this.fetchSizeMax = new MetricNameTemplate("fetch-size-max", groupName,
 "The maximum number of bytes fetched per request", tags);
-this.bytesFetchedRate = new MetricNameTemplate("bytes-consumed-rate", 
groupName,
+this.bytesFetchedRate = new MetricNameTemplate("bytes-fetched-rate", 
groupName,
 "The average number of bytes consumed per second", tags);
-this.bytesFetchedTotal = new 
MetricNameTemplate("bytes-consumed-total", groupName,
+this.bytesFetchedTotal = new MetricNameTemplate("bytes-fetched-total", 
groupName,
 "The total number of bytes consumed", tags);
 
 this.recordsPerRequestAvg = new 
MetricNameTemplate("records-per-request-avg", groupName,
 "The average number of records in each request", tags);
 this.recordsPerRequestMax = new 
MetricNameTemplate("records-per-request-max", groupName,
 "The maximum number of records in a request.", tags);
-this.recordsFetchedRate = new 
MetricNameTemplate("records-consumed-rate", groupName,
+this.recordsFetchedRate = new 
MetricNameTemplate("records-fetched-rate", groupName,
 "The average number of records consumed per second", tags);
-this.recordsFetchedTotal = new 
MetricNameTemplate("records-consumed-total", groupName,
+this.recordsFetchedTotal = new 
MetricNameTemplate("records-fetched-total", groupName,

Review Comment:
   @JimmyWang6 would you mind removing those changes to keep the consistent 
metrics between consumer and share consumer?



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



Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-08 Thread via GitHub


apoorvmittal10 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2600392587


##
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareFetchMetricsRegistry.java:
##
@@ -60,18 +60,18 @@ public ShareFetchMetricsRegistry(Set tags, String 
metricGrpPrefix) {
 
 this.fetchSizeMax = new MetricNameTemplate("fetch-size-max", groupName,
 "The maximum number of bytes fetched per request", tags);
-this.bytesFetchedRate = new MetricNameTemplate("bytes-consumed-rate", 
groupName,
+this.bytesFetchedRate = new MetricNameTemplate("bytes-fetched-rate", 
groupName,
 "The average number of bytes consumed per second", tags);
-this.bytesFetchedTotal = new 
MetricNameTemplate("bytes-consumed-total", groupName,
+this.bytesFetchedTotal = new MetricNameTemplate("bytes-fetched-total", 
groupName,
 "The total number of bytes consumed", tags);
 
 this.recordsPerRequestAvg = new 
MetricNameTemplate("records-per-request-avg", groupName,
 "The average number of records in each request", tags);
 this.recordsPerRequestMax = new 
MetricNameTemplate("records-per-request-max", groupName,
 "The maximum number of records in a request.", tags);
-this.recordsFetchedRate = new 
MetricNameTemplate("records-consumed-rate", groupName,
+this.recordsFetchedRate = new 
MetricNameTemplate("records-fetched-rate", groupName,
 "The average number of records consumed per second", tags);
-this.recordsFetchedTotal = new 
MetricNameTemplate("records-consumed-total", groupName,
+this.recordsFetchedTotal = new 
MetricNameTemplate("records-fetched-total", groupName,

Review Comment:
   And these changes are not required, correct?



##
docs/ops.html:
##
@@ -3992,6 +3980,368 @@ Share Group 
Monitoring
+  The following set of metrics are available for monitoring the share group:
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  TotalShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareFetchRequestsPerSec,topic=([-.\w]+)
+  The fetch request rate per second.
+
+
+  FailedShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareFetchRequestsPerSec,topic=([-.\w]+)
+  The share fetch request rate for requests that failed.
+
+
+  TotalShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The acknowledgement request rate per second.
+
+
+  FailedShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The share acknowledgement request rate for requests that failed.
+
+
+  RecordAcknowledgementsPerSec
+  
kafka.server:type=ShareGroupMetrics,name=RecordAcknowledgementsPerSec,ackType={Accept|Release|Reject|Renew}
+  The rate per second of records acknowledged per acknowledgement 
type.
+
+
+  PartitionLoadTimeMs
+  kafka.server:type=ShareGroupMetrics,name=PartitionLoadTimeMs
+  The time taken to load the share partitions.
+
+
+  RequestTopicPartitionsFetchRatio
+  
kafka.server:type=ShareGroupMetrics,name=RequestTopicPartitionsFetchRatio,group=([-.\w]+)
+  The ratio of topic-partitions acquired to the total number of 
topic-partitions in share fetch request.
+
+
+  TopicPartitionsAcquireTimeMs
+  
kafka.server:type=ShareGroupMetrics,name=TopicPartitionsAcquireTimeMs,group=([-.\w]+)
+  The time elapsed (in millisecond) to acquire any topic partition for 
fetch.
+
+
+  AcquisitionLockTimeoutPerSec
+  
kafka.server:type=SharePartitionMetrics,name=AcquisitionLockTimeoutPerSec,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The rate of acquisition locks for records which are not acknowledged 
within the timeout.
+
+
+  InFlightMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight messages for the share partition.
+
+
+  InFlightBatchCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight batches for the share partition.
+
+
+  InFlightBatchMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of messages in the in-flight batch.
+
+
+  FetchLockTimeMs
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockTimeMs,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The time elapsed (in 

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-08 Thread via GitHub


apoorvmittal10 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2600380085


##
docs/ops.html:
##
@@ -3992,6 +3980,358 @@ Share Group 
Monitoring
+  The following set of metrics are available for monitoring the share group:
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  TotalShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareFetchRequestsPerSec,topic=([-.\w]+)
+  The fetch request rate per second.
+
+
+  FailedShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareFetchRequestsPerSec,topic=([-.\w]+)
+  The share fetch request rate for requests that failed.
+
+
+  TotalShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The acknowledgement request rate per second.
+
+
+  FailedShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The share acknowledgement request rate for requests that failed.
+
+
+  RecordAcknowledgementsPerSec
+  
kafka.server:type=ShareGroupMetrics,name=RecordAcknowledgementsPerSec,ackType={Accept|Release|Reject|Renew}
+  The rate per second of records acknowledged per acknowledgement 
type.
+
+
+  PartitionLoadTimeMs
+  kafka.server:type=ShareGroupMetrics,name=PartitionLoadTimeMs
+  The time taken to load the share partitions.
+
+
+  RequestTopicPartitionsFetchRatio
+  
kafka.server:type=ShareGroupMetrics,name=RequestTopicPartitionsFetchRatio,group=([-.\w]+)
+  The ratio of topic-partitions acquired to the total number of 
topic-partitions in share fetch request.
+
+
+  TopicPartitionsAcquireTimeMs
+  
kafka.server:type=ShareGroupMetrics,name=TopicPartitionsAcquireTimeMs,group=([-.\w]+)
+  The time elapsed (in millisecond) to acquire any topic partition for 
fetch.
+
+
+  AcquisitionLockTimeoutPerSec
+  
kafka.server:type=SharePartitionMetrics,name=AcquisitionLockTimeoutPerSec,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The rate of acquisition locks for records which are not acknowledged 
within the timeout.
+
+
+  InFlightMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight messages for the share partition.
+
+
+  InFlightBatchCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight batches for the share partition.
+
+
+  InFlightBatchMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of messages in the in-flight batch.
+
+
+  FetchLockTimeMs
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockTimeMs,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The time elapsed (in milliseconds) while a share partition is held 
under lock for fetching messages.
+
+
+  FetchLockRatio
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockRatio,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The fraction of time that share partition is held under lock.
+
+
+  ShareSessionEvictionsPerSec
+  
kafka.server:type=ShareSessionCache,name=ShareSessionEvictionsPerSec
+  The share session eviction rate per second.
+
+
+  SharePartitionsCount
+  kafka.server:type=ShareSessionCache,name=SharePartitionsCount
+  The number of cached share partitions.
+
+
+  ShareSessionsCount
+  kafka.server:type=ShareSessionCache,name=ShareSessionsCount
+  The number of cached share sessions.
+
+
+  NumDelayedOperations (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=ShareFetch
+  The number of delayed operations for share fetch purgatory.
+
+
+  PurgatorySize (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=ShareFetch
+  The number of requests waiting in the share fetch purgatory. This is 
high if share consumers use a large value for fetch.wait.max.ms.
+
+
+  ExpiresPerSec
+  kafka.server:type=DelayedShareFetchMetrics,name=ExpiresPerSec
+  The expired delayed share fetch operation rate per second.
+
+
+  
+
+  Coordinator Metrics
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  group-count
+  
kafka.server:type=group-coordinator-metrics,name=group-count,protocol=share
+  The total number of share groups managed by group 

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-08 Thread via GitHub


apoorvmittal10 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2600376145


##
docs/ops.html:
##
@@ -3992,6 +3980,358 @@ Share Group 
Monitoring
+  The following set of metrics are available for monitoring the share group:
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  TotalShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareFetchRequestsPerSec,topic=([-.\w]+)
+  The fetch request rate per second.
+
+
+  FailedShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareFetchRequestsPerSec,topic=([-.\w]+)
+  The share fetch request rate for requests that failed.
+
+
+  TotalShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The acknowledgement request rate per second.
+
+
+  FailedShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The share acknowledgement request rate for requests that failed.
+
+
+  RecordAcknowledgementsPerSec
+  
kafka.server:type=ShareGroupMetrics,name=RecordAcknowledgementsPerSec,ackType={Accept|Release|Reject|Renew}
+  The rate per second of records acknowledged per acknowledgement 
type.
+
+
+  PartitionLoadTimeMs
+  kafka.server:type=ShareGroupMetrics,name=PartitionLoadTimeMs
+  The time taken to load the share partitions.
+
+
+  RequestTopicPartitionsFetchRatio
+  
kafka.server:type=ShareGroupMetrics,name=RequestTopicPartitionsFetchRatio,group=([-.\w]+)
+  The ratio of topic-partitions acquired to the total number of 
topic-partitions in share fetch request.
+
+
+  TopicPartitionsAcquireTimeMs
+  
kafka.server:type=ShareGroupMetrics,name=TopicPartitionsAcquireTimeMs,group=([-.\w]+)
+  The time elapsed (in millisecond) to acquire any topic partition for 
fetch.
+
+
+  AcquisitionLockTimeoutPerSec
+  
kafka.server:type=SharePartitionMetrics,name=AcquisitionLockTimeoutPerSec,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The rate of acquisition locks for records which are not acknowledged 
within the timeout.
+
+
+  InFlightMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight messages for the share partition.
+
+
+  InFlightBatchCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight batches for the share partition.
+
+
+  InFlightBatchMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of messages in the in-flight batch.
+
+
+  FetchLockTimeMs
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockTimeMs,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The time elapsed (in milliseconds) while a share partition is held 
under lock for fetching messages.
+
+
+  FetchLockRatio
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockRatio,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The fraction of time that share partition is held under lock.
+
+
+  ShareSessionEvictionsPerSec
+  
kafka.server:type=ShareSessionCache,name=ShareSessionEvictionsPerSec
+  The share session eviction rate per second.
+
+
+  SharePartitionsCount
+  kafka.server:type=ShareSessionCache,name=SharePartitionsCount
+  The number of cached share partitions.
+
+
+  ShareSessionsCount
+  kafka.server:type=ShareSessionCache,name=ShareSessionsCount
+  The number of cached share sessions.
+
+
+  NumDelayedOperations (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=ShareFetch
+  The number of delayed operations for share fetch purgatory.
+
+
+  PurgatorySize (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=ShareFetch
+  The number of requests waiting in the share fetch purgatory. This is 
high if share consumers use a large value for fetch.wait.max.ms.
+
+
+  ExpiresPerSec
+  kafka.server:type=DelayedShareFetchMetrics,name=ExpiresPerSec
+  The expired delayed share fetch operation rate per second.
+
+
+  
+
+  Coordinator Metrics
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  group-count
+  
kafka.server:type=group-coordinator-metrics,name=group-count,protocol=share
+  The total number of share groups managed by group 

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-07 Thread via GitHub


chia7712 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2597237728


##
docs/ops.html:
##
@@ -3992,6 +3980,358 @@ Share Group 
Monitoring
+  The following set of metrics are available for monitoring the share group:
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  TotalShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareFetchRequestsPerSec,topic=([-.\w]+)
+  The fetch request rate per second.
+
+
+  FailedShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareFetchRequestsPerSec,topic=([-.\w]+)
+  The share fetch request rate for requests that failed.
+
+
+  TotalShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The acknowledgement request rate per second.
+
+
+  FailedShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The share acknowledgement request rate for requests that failed.
+
+
+  RecordAcknowledgementsPerSec
+  
kafka.server:type=ShareGroupMetrics,name=RecordAcknowledgementsPerSec,ackType={Accept|Release|Reject|Renew}
+  The rate per second of records acknowledged per acknowledgement 
type.
+
+
+  PartitionLoadTimeMs
+  kafka.server:type=ShareGroupMetrics,name=PartitionLoadTimeMs
+  The time taken to load the share partitions.
+
+
+  RequestTopicPartitionsFetchRatio
+  
kafka.server:type=ShareGroupMetrics,name=RequestTopicPartitionsFetchRatio,group=([-.\w]+)
+  The ratio of topic-partitions acquired to the total number of 
topic-partitions in share fetch request.
+
+
+  TopicPartitionsAcquireTimeMs
+  
kafka.server:type=ShareGroupMetrics,name=TopicPartitionsAcquireTimeMs,group=([-.\w]+)
+  The time elapsed (in millisecond) to acquire any topic partition for 
fetch.
+
+
+  AcquisitionLockTimeoutPerSec
+  
kafka.server:type=SharePartitionMetrics,name=AcquisitionLockTimeoutPerSec,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The rate of acquisition locks for records which are not acknowledged 
within the timeout.
+
+
+  InFlightMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight messages for the share partition.
+
+
+  InFlightBatchCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight batches for the share partition.
+
+
+  InFlightBatchMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of messages in the in-flight batch.
+
+
+  FetchLockTimeMs
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockTimeMs,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The time elapsed (in milliseconds) while a share partition is held 
under lock for fetching messages.
+
+
+  FetchLockRatio
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockRatio,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The fraction of time that share partition is held under lock.
+
+
+  ShareSessionEvictionsPerSec
+  
kafka.server:type=ShareSessionCache,name=ShareSessionEvictionsPerSec
+  The share session eviction rate per second.
+
+
+  SharePartitionsCount
+  kafka.server:type=ShareSessionCache,name=SharePartitionsCount
+  The number of cached share partitions.
+
+
+  ShareSessionsCount
+  kafka.server:type=ShareSessionCache,name=ShareSessionsCount
+  The number of cached share sessions.
+
+
+  NumDelayedOperations (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=ShareFetch
+  The number of delayed operations for share fetch purgatory.
+
+
+  PurgatorySize (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=ShareFetch
+  The number of requests waiting in the share fetch purgatory. This is 
high if share consumers use a large value for fetch.wait.max.ms.
+
+
+  ExpiresPerSec
+  kafka.server:type=DelayedShareFetchMetrics,name=ExpiresPerSec
+  The expired delayed share fetch operation rate per second.
+
+
+  
+
+  Coordinator Metrics
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  group-count
+  
kafka.server:type=group-coordinator-metrics,name=group-count,protocol=share
+  The total number of share groups managed by group 

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-07 Thread via GitHub


JimmyWang6 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2597232500


##
docs/ops.html:
##
@@ -3992,6 +3980,358 @@ Share Group 
Monitoring
+  The following set of metrics are available for monitoring the share group:
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  TotalShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareFetchRequestsPerSec,topic=([-.\w]+)
+  The fetch request rate per second.
+
+
+  FailedShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareFetchRequestsPerSec,topic=([-.\w]+)
+  The share fetch request rate for requests that failed.
+
+
+  TotalShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The acknowledgement request rate per second.
+
+
+  FailedShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The share acknowledgement request rate for requests that failed.
+
+
+  RecordAcknowledgementsPerSec
+  
kafka.server:type=ShareGroupMetrics,name=RecordAcknowledgementsPerSec,ackType={Accept|Release|Reject|Renew}
+  The rate per second of records acknowledged per acknowledgement 
type.
+
+
+  PartitionLoadTimeMs
+  kafka.server:type=ShareGroupMetrics,name=PartitionLoadTimeMs
+  The time taken to load the share partitions.
+
+
+  RequestTopicPartitionsFetchRatio
+  
kafka.server:type=ShareGroupMetrics,name=RequestTopicPartitionsFetchRatio,group=([-.\w]+)
+  The ratio of topic-partitions acquired to the total number of 
topic-partitions in share fetch request.
+
+
+  TopicPartitionsAcquireTimeMs
+  
kafka.server:type=ShareGroupMetrics,name=TopicPartitionsAcquireTimeMs,group=([-.\w]+)
+  The time elapsed (in millisecond) to acquire any topic partition for 
fetch.
+
+
+  AcquisitionLockTimeoutPerSec
+  
kafka.server:type=SharePartitionMetrics,name=AcquisitionLockTimeoutPerSec,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The rate of acquisition locks for records which are not acknowledged 
within the timeout.
+
+
+  InFlightMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight messages for the share partition.
+
+
+  InFlightBatchCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight batches for the share partition.
+
+
+  InFlightBatchMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of messages in the in-flight batch.
+
+
+  FetchLockTimeMs
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockTimeMs,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The time elapsed (in milliseconds) while a share partition is held 
under lock for fetching messages.
+
+
+  FetchLockRatio
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockRatio,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The fraction of time that share partition is held under lock.
+
+
+  ShareSessionEvictionsPerSec
+  
kafka.server:type=ShareSessionCache,name=ShareSessionEvictionsPerSec
+  The share session eviction rate per second.
+
+
+  SharePartitionsCount
+  kafka.server:type=ShareSessionCache,name=SharePartitionsCount
+  The number of cached share partitions.
+
+
+  ShareSessionsCount
+  kafka.server:type=ShareSessionCache,name=ShareSessionsCount
+  The number of cached share sessions.
+
+
+  NumDelayedOperations (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=ShareFetch
+  The number of delayed operations for share fetch purgatory.
+
+
+  PurgatorySize (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=ShareFetch
+  The number of requests waiting in the share fetch purgatory. This is 
high if share consumers use a large value for fetch.wait.max.ms.
+
+
+  ExpiresPerSec
+  kafka.server:type=DelayedShareFetchMetrics,name=ExpiresPerSec
+  The expired delayed share fetch operation rate per second.
+
+
+  
+
+  Coordinator Metrics
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  group-count
+  
kafka.server:type=group-coordinator-metrics,name=group-count,protocol=share
+  The total number of share groups managed by group 

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-07 Thread via GitHub


chia7712 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2597185157


##
docs/ops.html:
##
@@ -3992,6 +3980,358 @@ Share Group 
Monitoring
+  The following set of metrics are available for monitoring the share group:
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  TotalShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareFetchRequestsPerSec,topic=([-.\w]+)
+  The fetch request rate per second.
+
+
+  FailedShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareFetchRequestsPerSec,topic=([-.\w]+)
+  The share fetch request rate for requests that failed.
+
+
+  TotalShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The acknowledgement request rate per second.
+
+
+  FailedShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The share acknowledgement request rate for requests that failed.
+
+
+  RecordAcknowledgementsPerSec
+  
kafka.server:type=ShareGroupMetrics,name=RecordAcknowledgementsPerSec,ackType={Accept|Release|Reject|Renew}
+  The rate per second of records acknowledged per acknowledgement 
type.
+
+
+  PartitionLoadTimeMs
+  kafka.server:type=ShareGroupMetrics,name=PartitionLoadTimeMs
+  The time taken to load the share partitions.
+
+
+  RequestTopicPartitionsFetchRatio
+  
kafka.server:type=ShareGroupMetrics,name=RequestTopicPartitionsFetchRatio,group=([-.\w]+)
+  The ratio of topic-partitions acquired to the total number of 
topic-partitions in share fetch request.
+
+
+  TopicPartitionsAcquireTimeMs
+  
kafka.server:type=ShareGroupMetrics,name=TopicPartitionsAcquireTimeMs,group=([-.\w]+)
+  The time elapsed (in millisecond) to acquire any topic partition for 
fetch.
+
+
+  AcquisitionLockTimeoutPerSec
+  
kafka.server:type=SharePartitionMetrics,name=AcquisitionLockTimeoutPerSec,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The rate of acquisition locks for records which are not acknowledged 
within the timeout.
+
+
+  InFlightMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight messages for the share partition.
+
+
+  InFlightBatchCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight batches for the share partition.
+
+
+  InFlightBatchMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of messages in the in-flight batch.
+
+
+  FetchLockTimeMs
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockTimeMs,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The time elapsed (in milliseconds) while a share partition is held 
under lock for fetching messages.
+
+
+  FetchLockRatio
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockRatio,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The fraction of time that share partition is held under lock.
+
+
+  ShareSessionEvictionsPerSec
+  
kafka.server:type=ShareSessionCache,name=ShareSessionEvictionsPerSec
+  The share session eviction rate per second.
+
+
+  SharePartitionsCount
+  kafka.server:type=ShareSessionCache,name=SharePartitionsCount
+  The number of cached share partitions.
+
+
+  ShareSessionsCount
+  kafka.server:type=ShareSessionCache,name=ShareSessionsCount
+  The number of cached share sessions.
+
+
+  NumDelayedOperations (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=ShareFetch
+  The number of delayed operations for share fetch purgatory.
+
+
+  PurgatorySize (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=ShareFetch
+  The number of requests waiting in the share fetch purgatory. This is 
high if share consumers use a large value for fetch.wait.max.ms.
+
+
+  ExpiresPerSec
+  kafka.server:type=DelayedShareFetchMetrics,name=ExpiresPerSec
+  The expired delayed share fetch operation rate per second.
+
+
+  
+
+  Coordinator Metrics
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  group-count
+  
kafka.server:type=group-coordinator-metrics,name=group-count,protocol=share
+  The total number of share groups managed by group 

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-07 Thread via GitHub


JimmyWang6 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2596831337


##
docs/ops.html:
##
@@ -3992,6 +3980,358 @@ Share Group 
Monitoring
+  The following set of metrics are available for monitoring the share group:
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  TotalShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareFetchRequestsPerSec,topic=([-.\w]+)
+  The fetch request rate per second.
+
+
+  FailedShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareFetchRequestsPerSec,topic=([-.\w]+)
+  The share fetch request rate for requests that failed.
+
+
+  TotalShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The acknowledgement request rate per second.
+
+
+  FailedShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The share acknowledgement request rate for requests that failed.
+
+
+  RecordAcknowledgementsPerSec
+  
kafka.server:type=ShareGroupMetrics,name=RecordAcknowledgementsPerSec,ackType={Accept|Release|Reject|Renew}
+  The rate per second of records acknowledged per acknowledgement 
type.
+
+
+  PartitionLoadTimeMs
+  kafka.server:type=ShareGroupMetrics,name=PartitionLoadTimeMs
+  The time taken to load the share partitions.
+
+
+  RequestTopicPartitionsFetchRatio
+  
kafka.server:type=ShareGroupMetrics,name=RequestTopicPartitionsFetchRatio,group=([-.\w]+)
+  The ratio of topic-partitions acquired to the total number of 
topic-partitions in share fetch request.
+
+
+  TopicPartitionsAcquireTimeMs
+  
kafka.server:type=ShareGroupMetrics,name=TopicPartitionsAcquireTimeMs,group=([-.\w]+)
+  The time elapsed (in millisecond) to acquire any topic partition for 
fetch.
+
+
+  AcquisitionLockTimeoutPerSec
+  
kafka.server:type=SharePartitionMetrics,name=AcquisitionLockTimeoutPerSec,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The rate of acquisition locks for records which are not acknowledged 
within the timeout.
+
+
+  InFlightMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight messages for the share partition.
+
+
+  InFlightBatchCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight batches for the share partition.
+
+
+  InFlightBatchMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of messages in the in-flight batch.
+
+
+  FetchLockTimeMs
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockTimeMs,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The time elapsed (in milliseconds) while a share partition is held 
under lock for fetching messages.
+
+
+  FetchLockRatio
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockRatio,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The fraction of time that share partition is held under lock.
+
+
+  ShareSessionEvictionsPerSec
+  
kafka.server:type=ShareSessionCache,name=ShareSessionEvictionsPerSec
+  The share session eviction rate per second.
+
+
+  SharePartitionsCount
+  kafka.server:type=ShareSessionCache,name=SharePartitionsCount
+  The number of cached share partitions.
+
+
+  ShareSessionsCount
+  kafka.server:type=ShareSessionCache,name=ShareSessionsCount
+  The number of cached share sessions.
+
+
+  NumDelayedOperations (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=ShareFetch
+  The number of delayed operations for share fetch purgatory.
+
+
+  PurgatorySize (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=ShareFetch
+  The number of requests waiting in the share fetch purgatory. This is 
high if share consumers use a large value for fetch.wait.max.ms.
+
+
+  ExpiresPerSec
+  kafka.server:type=DelayedShareFetchMetrics,name=ExpiresPerSec
+  The expired delayed share fetch operation rate per second.
+
+
+  
+
+  Coordinator Metrics
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  group-count
+  
kafka.server:type=group-coordinator-metrics,name=group-count,protocol=share
+  The total number of share groups managed by group 

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-07 Thread via GitHub


JimmyWang6 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2596851804


##
docs/ops.html:
##
@@ -3992,6 +3980,358 @@ Share Group 
Monitoring
+  The following set of metrics are available for monitoring the share group:
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  TotalShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareFetchRequestsPerSec,topic=([-.\w]+)
+  The fetch request rate per second.
+
+
+  FailedShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareFetchRequestsPerSec,topic=([-.\w]+)
+  The share fetch request rate for requests that failed.
+
+
+  TotalShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The acknowledgement request rate per second.
+
+
+  FailedShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The share acknowledgement request rate for requests that failed.
+
+
+  RecordAcknowledgementsPerSec
+  
kafka.server:type=ShareGroupMetrics,name=RecordAcknowledgementsPerSec,ackType={Accept|Release|Reject|Renew}
+  The rate per second of records acknowledged per acknowledgement 
type.
+
+
+  PartitionLoadTimeMs
+  kafka.server:type=ShareGroupMetrics,name=PartitionLoadTimeMs
+  The time taken to load the share partitions.
+
+
+  RequestTopicPartitionsFetchRatio
+  
kafka.server:type=ShareGroupMetrics,name=RequestTopicPartitionsFetchRatio,group=([-.\w]+)
+  The ratio of topic-partitions acquired to the total number of 
topic-partitions in share fetch request.
+
+
+  TopicPartitionsAcquireTimeMs
+  
kafka.server:type=ShareGroupMetrics,name=TopicPartitionsAcquireTimeMs,group=([-.\w]+)
+  The time elapsed (in millisecond) to acquire any topic partition for 
fetch.
+
+
+  AcquisitionLockTimeoutPerSec
+  
kafka.server:type=SharePartitionMetrics,name=AcquisitionLockTimeoutPerSec,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The rate of acquisition locks for records which are not acknowledged 
within the timeout.
+
+
+  InFlightMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight messages for the share partition.
+
+
+  InFlightBatchCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight batches for the share partition.
+
+
+  InFlightBatchMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of messages in the in-flight batch.
+
+
+  FetchLockTimeMs
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockTimeMs,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The time elapsed (in milliseconds) while a share partition is held 
under lock for fetching messages.
+
+
+  FetchLockRatio
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockRatio,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The fraction of time that share partition is held under lock.
+
+
+  ShareSessionEvictionsPerSec
+  
kafka.server:type=ShareSessionCache,name=ShareSessionEvictionsPerSec
+  The share session eviction rate per second.
+
+
+  SharePartitionsCount
+  kafka.server:type=ShareSessionCache,name=SharePartitionsCount
+  The number of cached share partitions.
+
+
+  ShareSessionsCount
+  kafka.server:type=ShareSessionCache,name=ShareSessionsCount
+  The number of cached share sessions.
+
+
+  NumDelayedOperations (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=ShareFetch
+  The number of delayed operations for share fetch purgatory.
+
+
+  PurgatorySize (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=ShareFetch
+  The number of requests waiting in the share fetch purgatory. This is 
high if share consumers use a large value for fetch.wait.max.ms.
+
+
+  ExpiresPerSec
+  kafka.server:type=DelayedShareFetchMetrics,name=ExpiresPerSec
+  The expired delayed share fetch operation rate per second.
+
+
+  
+
+  Coordinator Metrics
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  group-count
+  
kafka.server:type=group-coordinator-metrics,name=group-count,protocol=share
+  The total number of share groups managed by group 

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-07 Thread via GitHub


JimmyWang6 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2596831337


##
docs/ops.html:
##
@@ -3992,6 +3980,358 @@ Share Group 
Monitoring
+  The following set of metrics are available for monitoring the share group:
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  TotalShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareFetchRequestsPerSec,topic=([-.\w]+)
+  The fetch request rate per second.
+
+
+  FailedShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareFetchRequestsPerSec,topic=([-.\w]+)
+  The share fetch request rate for requests that failed.
+
+
+  TotalShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The acknowledgement request rate per second.
+
+
+  FailedShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The share acknowledgement request rate for requests that failed.
+
+
+  RecordAcknowledgementsPerSec
+  
kafka.server:type=ShareGroupMetrics,name=RecordAcknowledgementsPerSec,ackType={Accept|Release|Reject|Renew}
+  The rate per second of records acknowledged per acknowledgement 
type.
+
+
+  PartitionLoadTimeMs
+  kafka.server:type=ShareGroupMetrics,name=PartitionLoadTimeMs
+  The time taken to load the share partitions.
+
+
+  RequestTopicPartitionsFetchRatio
+  
kafka.server:type=ShareGroupMetrics,name=RequestTopicPartitionsFetchRatio,group=([-.\w]+)
+  The ratio of topic-partitions acquired to the total number of 
topic-partitions in share fetch request.
+
+
+  TopicPartitionsAcquireTimeMs
+  
kafka.server:type=ShareGroupMetrics,name=TopicPartitionsAcquireTimeMs,group=([-.\w]+)
+  The time elapsed (in millisecond) to acquire any topic partition for 
fetch.
+
+
+  AcquisitionLockTimeoutPerSec
+  
kafka.server:type=SharePartitionMetrics,name=AcquisitionLockTimeoutPerSec,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The rate of acquisition locks for records which are not acknowledged 
within the timeout.
+
+
+  InFlightMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight messages for the share partition.
+
+
+  InFlightBatchCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight batches for the share partition.
+
+
+  InFlightBatchMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of messages in the in-flight batch.
+
+
+  FetchLockTimeMs
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockTimeMs,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The time elapsed (in milliseconds) while a share partition is held 
under lock for fetching messages.
+
+
+  FetchLockRatio
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockRatio,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The fraction of time that share partition is held under lock.
+
+
+  ShareSessionEvictionsPerSec
+  
kafka.server:type=ShareSessionCache,name=ShareSessionEvictionsPerSec
+  The share session eviction rate per second.
+
+
+  SharePartitionsCount
+  kafka.server:type=ShareSessionCache,name=SharePartitionsCount
+  The number of cached share partitions.
+
+
+  ShareSessionsCount
+  kafka.server:type=ShareSessionCache,name=ShareSessionsCount
+  The number of cached share sessions.
+
+
+  NumDelayedOperations (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=ShareFetch
+  The number of delayed operations for share fetch purgatory.
+
+
+  PurgatorySize (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=ShareFetch
+  The number of requests waiting in the share fetch purgatory. This is 
high if share consumers use a large value for fetch.wait.max.ms.
+
+
+  ExpiresPerSec
+  kafka.server:type=DelayedShareFetchMetrics,name=ExpiresPerSec
+  The expired delayed share fetch operation rate per second.
+
+
+  
+
+  Coordinator Metrics
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  group-count
+  
kafka.server:type=group-coordinator-metrics,name=group-count,protocol=share
+  The total number of share groups managed by group 

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-07 Thread via GitHub


apoorvmittal10 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2596632624


##
docs/ops.html:
##
@@ -3992,6 +3980,358 @@ Share Group 
Monitoring
+  The following set of metrics are available for monitoring the share group:
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  TotalShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareFetchRequestsPerSec,topic=([-.\w]+)
+  The fetch request rate per second.
+
+
+  FailedShareFetchRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareFetchRequestsPerSec,topic=([-.\w]+)
+  The share fetch request rate for requests that failed.
+
+
+  TotalShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=TotalShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The acknowledgement request rate per second.
+
+
+  FailedShareAcknowledgementRequestsPerSec
+  
kafka.server:type=BrokerTopicMetrics,name=FailedShareAcknowledgementRequestsPerSec,topic=([-.\w]+)
+  The share acknowledgement request rate for requests that failed.
+
+
+  RecordAcknowledgementsPerSec
+  
kafka.server:type=ShareGroupMetrics,name=RecordAcknowledgementsPerSec,ackType={Accept|Release|Reject|Renew}
+  The rate per second of records acknowledged per acknowledgement 
type.
+
+
+  PartitionLoadTimeMs
+  kafka.server:type=ShareGroupMetrics,name=PartitionLoadTimeMs
+  The time taken to load the share partitions.
+
+
+  RequestTopicPartitionsFetchRatio
+  
kafka.server:type=ShareGroupMetrics,name=RequestTopicPartitionsFetchRatio,group=([-.\w]+)
+  The ratio of topic-partitions acquired to the total number of 
topic-partitions in share fetch request.
+
+
+  TopicPartitionsAcquireTimeMs
+  
kafka.server:type=ShareGroupMetrics,name=TopicPartitionsAcquireTimeMs,group=([-.\w]+)
+  The time elapsed (in millisecond) to acquire any topic partition for 
fetch.
+
+
+  AcquisitionLockTimeoutPerSec
+  
kafka.server:type=SharePartitionMetrics,name=AcquisitionLockTimeoutPerSec,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The rate of acquisition locks for records which are not acknowledged 
within the timeout.
+
+
+  InFlightMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight messages for the share partition.
+
+
+  InFlightBatchCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of in-flight batches for the share partition.
+
+
+  InFlightBatchMessageCount
+  
kafka.server:type=SharePartitionMetrics,name=InFlightBatchMessageCount,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The number of messages in the in-flight batch.
+
+
+  FetchLockTimeMs
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockTimeMs,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The time elapsed (in milliseconds) while a share partition is held 
under lock for fetching messages.
+
+
+  FetchLockRatio
+  
kafka.server:type=SharePartitionMetrics,name=FetchLockRatio,group=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)
+  The fraction of time that share partition is held under lock.
+
+
+  ShareSessionEvictionsPerSec
+  
kafka.server:type=ShareSessionCache,name=ShareSessionEvictionsPerSec
+  The share session eviction rate per second.
+
+
+  SharePartitionsCount
+  kafka.server:type=ShareSessionCache,name=SharePartitionsCount
+  The number of cached share partitions.
+
+
+  ShareSessionsCount
+  kafka.server:type=ShareSessionCache,name=ShareSessionsCount
+  The number of cached share sessions.
+
+
+  NumDelayedOperations (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=ShareFetch
+  The number of delayed operations for share fetch purgatory.
+
+
+  PurgatorySize (ShareFetch)
+  
kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=ShareFetch
+  The number of requests waiting in the share fetch purgatory. This is 
high if share consumers use a large value for fetch.wait.max.ms.
+
+
+  ExpiresPerSec
+  kafka.server:type=DelayedShareFetchMetrics,name=ExpiresPerSec
+  The expired delayed share fetch operation rate per second.
+
+
+  
+
+  Coordinator Metrics
+  
+
+  Metric/Attribute name
+  Mbean name
+  Description
+
+
+  group-count
+  
kafka.server:type=group-coordinator-metrics,name=group-count,protocol=share
+  The total number of share groups managed by group 

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-07 Thread via GitHub


apoorvmittal10 commented on PR #21046:
URL: https://github.com/apache/kafka/pull/21046#issuecomment-3623483744

   KIP-932 defines `rebalance (rebalance-rate and rebalance-count)` which seems 
not there for `share group` hence not in the documentation, so KIP-932 needs 
update. Also `num-partitions` has additional tags, as included in the 
documentation, which also need update in KIP-932 doc. Is my understanding right 
@JimmyWang6?
   cc: @AndrewJSchofield 


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



Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-07 Thread via GitHub


JimmyWang6 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2596235393


##
server/src/main/java/org/apache/kafka/server/share/metrics/ShareGroupMetricsRegistry.java:
##
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.server.share.metrics;
+
+import org.apache.kafka.common.MetricNameTemplate;
+import org.apache.kafka.common.metrics.Metrics;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+public class ShareGroupMetricsRegistry {
+
+public final MetricNameTemplate shareGroupCount;
+public final MetricNameTemplate writeRate;
+public final MetricNameTemplate writeTotal;
+public final MetricNameTemplate writeLatencyAvg;
+public final MetricNameTemplate writeLatencyMax;
+public final MetricNameTemplate lastPrunedOffset;
+public final MetricNameTemplate totalShareFetchRequestsPerSec;
+public final MetricNameTemplate failedShareFetchRequestsPerSec;
+public final MetricNameTemplate totalShareAcknowledgementRequestsPerSec;
+public final MetricNameTemplate failedShareAcknowledgementRequestsPerSec;
+public final MetricNameTemplate recordAcknowledgementsPerSec;
+public final MetricNameTemplate partitionLoadTimeMs;
+public final MetricNameTemplate requestTopicPartitionsFetchRatio;
+public final MetricNameTemplate topicPartitionsAcquireTimeMs;
+public final MetricNameTemplate acquisitionLockTimeoutPerSec;
+public final MetricNameTemplate inFlightMessageCount;
+public final MetricNameTemplate inFlightBatchCount;
+public final MetricNameTemplate inFlightBatchMessageCount;
+public final MetricNameTemplate fetchLockTimeMs;
+public final MetricNameTemplate fetchLockRatio;
+public final MetricNameTemplate shareSessionEvictionsPerSec;
+public final MetricNameTemplate sharePartitionsCount;
+public final MetricNameTemplate shareSessionsCount;
+public final MetricNameTemplate delayedShareFetchExpiresPerSec;
+public final MetricNameTemplate shareFetchPurgatorySize;
+public final MetricNameTemplate shareFetchNumDelayedOperations;
+
+public ShareGroupMetricsRegistry() {
+this(new HashSet<>(), "");
+}
+
+public ShareGroupMetricsRegistry(Set tags, String metricGrpPrefix) 
{
+
+/* BrokerTopicMetrics */
+String brokerTopicGroupName = "BrokerTopicMetrics";
+Set topicTags = Set.of("topic");
+
+this.totalShareFetchRequestsPerSec = new 
MetricNameTemplate("TotalShareFetchRequestsPerSec", brokerTopicGroupName,
+"The fetch request rate per second. ", topicTags);
+
+this.failedShareFetchRequestsPerSec = new 
MetricNameTemplate("FailedShareFetchRequestsPerSec", brokerTopicGroupName,
+"The share fetch request rate for requests that failed. ", 
topicTags);
+
+this.totalShareAcknowledgementRequestsPerSec = new 
MetricNameTemplate("TotalShareAcknowledgementRequestsPerSec", 
brokerTopicGroupName,
+"The acknowledgement request rate per second. ", topicTags);
+
+this.failedShareAcknowledgementRequestsPerSec = new 
MetricNameTemplate("FailedShareAcknowledgementRequestsPerSec", 
brokerTopicGroupName,
+"The share acknowledgement request rate for requests that failed. 
", topicTags);
+
+/* Group Coordinator metrics */
+Set state = Set.of("state");
+this.shareGroupCount = new MetricNameTemplate("share-group-count", 
"GroupCoordinator",
+"The number of share groups in respective state.", state);
+
+/* Share Coordinator metrics */
+String shareCoordinatorMetrics = "share-coordinator-metrics";
+this.writeRate = new MetricNameTemplate("write-rate", 
shareCoordinatorMetrics,
+"The number of share-group state write calls per second.", tags);
+
+this.writeTotal = new MetricNameTemplate("write-total", 
shareCoordinatorMetrics,
+"The total number of share-group state write calls.", tags);
+
+this.writeLatencyAvg = new MetricNameTemplate("write-latency-avg", 
shareCoordinatorMetrics,
+"The 

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-07 Thread via GitHub


JimmyWang6 commented on PR #21046:
URL: https://github.com/apache/kafka/pull/21046#issuecomment-3621917608

   Updated the document and description based on the feedback, 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.

To unsubscribe, e-mail: [email protected]

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



Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-06 Thread via GitHub


apoorvmittal10 commented on PR #21046:
URL: https://github.com/apache/kafka/pull/21046#issuecomment-3620683914

   @JimmyWang6 Can we please update the description to how documentation looks 
now after the changes?
   


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



Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-05 Thread via GitHub


AndrewJSchofield commented on PR #21046:
URL: https://github.com/apache/kafka/pull/21046#issuecomment-3616374760

   > In the PR we have just `client metrics` as sub resource under `Share Group 
Montioring`, but should we have `coordinator` as well which can contain `group 
coordinator` and `share coordinator` metrics. The other reason for this 
suggestion is that coordinator metrics are not yammer and broker defines are 
hence the metrics name casing differs. Hence the table of metrics look odd with 
differnt casing so if we have the respective sections then it ll make sense. 
@AndrewJSchofield wdyt?
   
   I agree. It looks a bit odd with the different types of metrics mixed up 
together.


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



Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-05 Thread via GitHub


apoorvmittal10 commented on PR #21046:
URL: https://github.com/apache/kafka/pull/21046#issuecomment-3616241224

   In the PR we have just `client metrics` as sub resource under `Share Group 
Montioring`, but should we have `coordinator` as well which can contain `group 
coordinator` and `share coordinator` metrics. The other reason for this 
suggestion is that coordinator metrics are not yammer and broker defines are 
hence the metrics name casing differs. Hence the table of metrics look odd with 
differnt casing so if we have the respective sections then it ll make sense. 
@AndrewJSchofield wdyt?


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



Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-05 Thread via GitHub


apoorvmittal10 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2592139746


##
server/src/main/java/org/apache/kafka/server/share/metrics/ShareGroupMetricsRegistry.java:
##
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.server.share.metrics;
+
+import org.apache.kafka.common.MetricNameTemplate;
+import org.apache.kafka.common.metrics.Metrics;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+public class ShareGroupMetricsRegistry {
+
+public final MetricNameTemplate shareGroupCount;
+public final MetricNameTemplate writeRate;
+public final MetricNameTemplate writeTotal;
+public final MetricNameTemplate writeLatencyAvg;
+public final MetricNameTemplate writeLatencyMax;
+public final MetricNameTemplate lastPrunedOffset;
+public final MetricNameTemplate totalShareFetchRequestsPerSec;
+public final MetricNameTemplate failedShareFetchRequestsPerSec;
+public final MetricNameTemplate totalShareAcknowledgementRequestsPerSec;
+public final MetricNameTemplate failedShareAcknowledgementRequestsPerSec;
+public final MetricNameTemplate recordAcknowledgementsPerSec;
+public final MetricNameTemplate partitionLoadTimeMs;
+public final MetricNameTemplate requestTopicPartitionsFetchRatio;
+public final MetricNameTemplate topicPartitionsAcquireTimeMs;
+public final MetricNameTemplate acquisitionLockTimeoutPerSec;
+public final MetricNameTemplate inFlightMessageCount;
+public final MetricNameTemplate inFlightBatchCount;
+public final MetricNameTemplate inFlightBatchMessageCount;
+public final MetricNameTemplate fetchLockTimeMs;
+public final MetricNameTemplate fetchLockRatio;
+public final MetricNameTemplate shareSessionEvictionsPerSec;
+public final MetricNameTemplate sharePartitionsCount;
+public final MetricNameTemplate shareSessionsCount;
+public final MetricNameTemplate delayedShareFetchExpiresPerSec;
+public final MetricNameTemplate shareFetchPurgatorySize;
+public final MetricNameTemplate shareFetchNumDelayedOperations;
+
+public ShareGroupMetricsRegistry() {
+this(new HashSet<>(), "");
+}
+
+public ShareGroupMetricsRegistry(Set tags, String metricGrpPrefix) 
{
+
+/* BrokerTopicMetrics */
+String brokerTopicGroupName = "BrokerTopicMetrics";
+Set topicTags = Set.of("topic");
+
+this.totalShareFetchRequestsPerSec = new 
MetricNameTemplate("TotalShareFetchRequestsPerSec", brokerTopicGroupName,
+"The fetch request rate per second. ", topicTags);
+
+this.failedShareFetchRequestsPerSec = new 
MetricNameTemplate("FailedShareFetchRequestsPerSec", brokerTopicGroupName,
+"The share fetch request rate for requests that failed. ", 
topicTags);
+
+this.totalShareAcknowledgementRequestsPerSec = new 
MetricNameTemplate("TotalShareAcknowledgementRequestsPerSec", 
brokerTopicGroupName,
+"The acknowledgement request rate per second. ", topicTags);
+
+this.failedShareAcknowledgementRequestsPerSec = new 
MetricNameTemplate("FailedShareAcknowledgementRequestsPerSec", 
brokerTopicGroupName,
+"The share acknowledgement request rate for requests that failed. 
", topicTags);
+
+/* Group Coordinator metrics */
+Set state = Set.of("state");
+this.shareGroupCount = new MetricNameTemplate("share-group-count", 
"GroupCoordinator",
+"The number of share groups in respective state.", state);
+
+/* Share Coordinator metrics */
+String shareCoordinatorMetrics = "share-coordinator-metrics";
+this.writeRate = new MetricNameTemplate("write-rate", 
shareCoordinatorMetrics,
+"The number of share-group state write calls per second.", tags);
+
+this.writeTotal = new MetricNameTemplate("write-total", 
shareCoordinatorMetrics,
+"The total number of share-group state write calls.", tags);
+
+this.writeLatencyAvg = new MetricNameTemplate("write-latency-avg", 
shareCoordinatorMetrics,
+

Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-05 Thread via GitHub


apoorvmittal10 commented on PR #21046:
URL: https://github.com/apache/kafka/pull/21046#issuecomment-3616179944

   Thanks for the PR @JimmyWang6. `mbean` miss the metric name. In Kafka 
documentation I can see other metrics do define the mbean correctly.
   
   https://github.com/user-attachments/assets/386fa15d-1863-489a-99a0-12da1274bb99";
 />
   


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



Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-02 Thread via GitHub


JimmyWang6 commented on PR #21046:
URL: https://github.com/apache/kafka/pull/21046#issuecomment-3601699390

   Hi @apoorvmittal10 @AndrewJSchofield, gentle ping on this. Please take a 
look when you get a chance. 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.

To unsubscribe, e-mail: [email protected]

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



Re: [PR] KAFKA-19865: Document queues metrics changes in ops.html [kafka]

2025-12-02 Thread via GitHub


JimmyWang6 commented on code in PR #21046:
URL: https://github.com/apache/kafka/pull/21046#discussion_r2580859594


##
server/src/main/java/org/apache/kafka/server/share/metrics/ShareGroupMetricsRegistry.java:
##
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.server.share.metrics;
+
+import org.apache.kafka.common.MetricNameTemplate;
+import org.apache.kafka.common.metrics.Metrics;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+public class ShareGroupMetricsRegistry {
+
+public final MetricNameTemplate shareGroupCount;
+public final MetricNameTemplate writeRate;
+public final MetricNameTemplate writeTotal;
+public final MetricNameTemplate writeLatencyAvg;
+public final MetricNameTemplate writeLatencyMax;
+public final MetricNameTemplate lastPrunedOffset;
+public final MetricNameTemplate totalShareFetchRequestsPerSec;
+public final MetricNameTemplate failedShareFetchRequestsPerSec;
+public final MetricNameTemplate totalShareAcknowledgementRequestsPerSec;
+public final MetricNameTemplate failedShareAcknowledgementRequestsPerSec;
+public final MetricNameTemplate recordAcknowledgementsPerSec;
+public final MetricNameTemplate partitionLoadTimeMs;
+public final MetricNameTemplate requestTopicPartitionsFetchRatio;
+public final MetricNameTemplate topicPartitionsAcquireTimeMs;
+public final MetricNameTemplate acquisitionLockTimeoutPerSec;
+public final MetricNameTemplate inFlightMessageCount;
+public final MetricNameTemplate inFlightBatchCount;
+public final MetricNameTemplate inFlightBatchMessageCount;
+public final MetricNameTemplate fetchLockTimeMs;
+public final MetricNameTemplate fetchLockRatio;
+public final MetricNameTemplate shareSessionEvictionsPerSec;
+public final MetricNameTemplate sharePartitionsCount;
+public final MetricNameTemplate shareSessionsCount;
+public final MetricNameTemplate delayedShareFetchExpiresPerSec;
+public final MetricNameTemplate shareFetchPurgatorySize;
+public final MetricNameTemplate shareFetchNumDelayedOperations;
+
+public ShareGroupMetricsRegistry() {
+this(new HashSet<>(), "");
+}
+
+public ShareGroupMetricsRegistry(Set tags, String metricGrpPrefix) 
{
+
+/* BrokerTopicMetrics */
+String brokerTopicGroupName = "BrokerTopicMetrics";
+Set topicTags = Set.of("topic");
+
+this.totalShareFetchRequestsPerSec = new 
MetricNameTemplate("TotalShareFetchRequestsPerSec", brokerTopicGroupName,
+"The fetch request rate per second. ", topicTags);
+
+this.failedShareFetchRequestsPerSec = new 
MetricNameTemplate("FailedShareFetchRequestsPerSec", brokerTopicGroupName,
+"The share fetch request rate for requests that failed. ", 
topicTags);
+
+this.totalShareAcknowledgementRequestsPerSec = new 
MetricNameTemplate("TotalShareAcknowledgementRequestsPerSec", 
brokerTopicGroupName,
+"The acknowledgement request rate per second. ", topicTags);
+
+this.failedShareAcknowledgementRequestsPerSec = new 
MetricNameTemplate("FailedShareAcknowledgementRequestsPerSec", 
brokerTopicGroupName,
+"The share acknowledgement request rate for requests that failed. 
", topicTags);
+
+/* Group Coordinator metrics */
+Set state = Set.of("state");
+this.shareGroupCount = new MetricNameTemplate("share-group-count", 
"GroupCoordinator",
+"The number of share groups in respective state.", state);
+
+/* Share Coordinator metrics */
+String shareCoordinatorMetrics = "share-coordinator-metrics";
+this.writeRate = new MetricNameTemplate("write-rate", 
shareCoordinatorMetrics,
+"The number of share-group state write calls per second.", tags);
+
+this.writeTotal = new MetricNameTemplate("write-total", 
shareCoordinatorMetrics,
+"The total number of share-group state write calls.", tags);
+
+this.writeLatencyAvg = new MetricNameTemplate("write-latency-avg", 
shareCoordinatorMetrics,
+"The