Copilot commented on code in PR #16799:
URL: https://github.com/apache/pinot/pull/16799#discussion_r2341508828


##########
docker/images/pinot/etc/jmx_prometheus_javaagent/configs/server.yml:
##########
@@ -96,6 +96,15 @@ rules:
     topic_name: "$4"
     partition: "$5"
     scope: "consumer"
+- pattern: "kafka\\.consumer<type=consumer-fetch-manager-metrics, 
client-id=\\\"?(([^.]+)\\.)?(?:[^,]*?\\|\\|\\|)?([^,]+)_REALTIME-([^,]+)-(\\d+)\\\"?><>(fetch-rate|fetch-latency-avg|fetch-throttle-time-avg|bytes-consumed-rate|records-consumed-rate|fetch-size-avg|fetch-size-max|records-per-request-avg)"

Review Comment:
   [nitpick] The regex patterns contain duplicated logic for parsing client-ids 
with pipe prefixes. Consider extracting the common client-id pattern 
`\\\"?(([^.]+)\\.)?(?:[^,]*?\\|\\|\\|)?([^,]+)_REALTIME-([^,]+)-(\\d+)\\\"?` 
into a YAML anchor to reduce duplication and improve maintainability.



##########
docker/images/pinot/etc/jmx_prometheus_javaagent/configs/server.yml:
##########
@@ -116,3 +134,12 @@ rules:
     topic_name: "$4"
     partition: "$5"
     scope: "partition"
+- pattern: "kafka\\.consumer<type=consumer-fetch-manager-metrics, 
client-id=\\\"?(([^.]+)\\.)?(?:[^,]*?\\|\\|\\|)?([^,]+)_REALTIME-([^,]+)-(\\d+)\\\"?,
 topic=([^,\"]+), 
partition=([^\"]+)><>(records-lag-avg|records-lag-max|records-lead-avg|records-lead-min)"

Review Comment:
   [nitpick] The regex patterns contain duplicated logic for parsing client-ids 
with pipe prefixes. Consider extracting the common client-id pattern 
`\\\"?(([^.]+)\\.)?(?:[^,]*?\\|\\|\\|)?([^,]+)_REALTIME-([^,]+)-(\\d+)\\\"?` 
into a YAML anchor to reduce duplication and improve maintainability.



##########
docker/images/pinot/etc/jmx_prometheus_javaagent/configs/server.yml:
##########
@@ -106,6 +115,15 @@ rules:
     topic_name: "$4"
     partition: "$5"
     scope: "topic"
+- pattern: "kafka\\.consumer<type=consumer-fetch-manager-metrics, 
client-id=\\\"?(([^.]+)\\.)?(?:[^,]*?\\|\\|\\|)?([^,]+)_REALTIME-([^,]+)-(\\d+)\\\"?,
 
topic=([^\"]+)><>(bytes-consumed-rate|records-consumed-rate|fetch-size-avg|fetch-size-max|records-per-request-avg)"

Review Comment:
   [nitpick] The regex patterns contain duplicated logic for parsing client-ids 
with pipe prefixes. Consider extracting the common client-id pattern 
`\\\"?(([^.]+)\\.)?(?:[^,]*?\\|\\|\\|)?([^,]+)_REALTIME-([^,]+)-(\\d+)\\\"?` 
into a YAML anchor to reduce duplication and improve maintainability.



##########
docker/images/pinot/etc/jmx_prometheus_javaagent/configs/pinot.yml:
##########
@@ -608,6 +608,15 @@ rules:
     topic_name: "$4"
     partition: "$5"
     scope: "consumer"
+- pattern: "kafka\\.consumer<type=consumer-fetch-manager-metrics, 
client-id=\\\"?(([^.]+)\\.)?(?:[^,]*?\\|\\|\\|)?([^,]+)_REALTIME-([^,]+)-(\\d+)\\\"?><>(fetch-rate|fetch-latency-avg|fetch-throttle-time-avg|bytes-consumed-rate|records-consumed-rate|fetch-size-avg|fetch-size-max|records-per-request-avg)"

Review Comment:
   [nitpick] The regex patterns contain duplicated logic for parsing client-ids 
with pipe prefixes. Consider extracting the common client-id pattern 
`\\\"?(([^.]+)\\.)?(?:[^,]*?\\|\\|\\|)?([^,]+)_REALTIME-([^,]+)-(\\d+)\\\"?` 
into a YAML anchor to reduce duplication and improve maintainability.



##########
docker/images/pinot/etc/jmx_prometheus_javaagent/configs/pinot.yml:
##########
@@ -618,6 +627,15 @@ rules:
     topic_name: "$4"
     partition: "$5"
     scope: "topic"
+- pattern: "kafka\\.consumer<type=consumer-fetch-manager-metrics, 
client-id=\\\"?(([^.]+)\\.)?(?:[^,]*?\\|\\|\\|)?([^,]+)_REALTIME-([^,]+)-(\\d+)\\\"?,
 
topic=([^\"]+)><>(bytes-consumed-rate|records-consumed-rate|fetch-size-avg|fetch-size-max|records-per-request-avg)"

Review Comment:
   [nitpick] The regex patterns contain duplicated logic for parsing client-ids 
with pipe prefixes. Consider extracting the common client-id pattern 
`\\\"?(([^.]+)\\.)?(?:[^,]*?\\|\\|\\|)?([^,]+)_REALTIME-([^,]+)-(\\d+)\\\"?` 
into a YAML anchor to reduce duplication and improve maintainability.



##########
docker/images/pinot/etc/jmx_prometheus_javaagent/configs/pinot.yml:
##########
@@ -628,6 +646,15 @@ rules:
     topic_name: "$4"
     partition: "$5"
     scope: "partition"
+- pattern: "kafka\\.consumer<type=consumer-fetch-manager-metrics, 
client-id=\\\"?(([^.]+)\\.)?(?:[^,]*?\\|\\|\\|)?([^,]+)_REALTIME-([^,]+)-(\\d+)\\\"?,
 topic=([^,\"]+), 
partition=([^\"]+)><>(records-lag-avg|records-lag-max|records-lead-avg|records-lead-min)"

Review Comment:
   [nitpick] The regex patterns contain duplicated logic for parsing client-ids 
with pipe prefixes. Consider extracting the common client-id pattern 
`\\\"?(([^.]+)\\.)?(?:[^,]*?\\|\\|\\|)?([^,]+)_REALTIME-([^,]+)-(\\d+)\\\"?` 
into a YAML anchor to reduce duplication and improve maintainability.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to