Akanksha-kedia opened a new pull request, #18414:
URL: https://github.com/apache/pinot/pull/18414

   ## Summary
   
   Closes #13588
   
   Adds `PrometheusTemplateRegexpTest` to validate the regexp patterns defined 
in the JMX exporter YAML config files under 
`docker/images/pinot/etc/jmx_prometheus_javaagent/configs/`.
   
   **What the tests cover:**
   - **Parameterized validity check**: verifies all patterns in `broker.yml`, 
`server.yml`, `controller.yml`, `minion.yml`, and `pinot.yml` compile as valid 
Java regexps — catches syntax errors introduced when editing these files
   - **Targeted correctness tests** for key patterns across all four 
components, verifying that expected JMX metric name strings match and that 
capture groups produce correct label values (`table`, `tableType`, `database`, 
`taskType`, measurement type)
   
   **Test cases included:**
   | Component | Pattern | JMX sample |
   |---|---|---|
   | Broker | meter scoped to tableNameWithType | 
`pinot.broker.myTable_REALTIME.queries` |
   | Broker | meter scoped to tableNameWithType + database prefix | 
`pinot.broker.myDb.myTable_OFFLINE.queries` |
   | Broker | meter scoped to rawTableName | `pinot.broker.myTable.queries` |
   | Broker | global gauge | `pinot.broker.totalDocuments` |
   | Server | meter scoped to tableNameWithType | 
`pinot.server.myTable_OFFLINE.segmentUploadFailure` |
   | Server | gauge scoped to tableNameWithType + partition | 
`pinot.server.queries.myTable_REALTIME.3` |
   | Controller | task-type gauge | 
`pinot.controller.numMinionTasksInProgress.SegmentGenerationAndPush` |
   | Controller | meter scoped to tableNameWithType | 
`pinot.controller.myTable_OFFLINE.segmentUploadFailure` |
   | Minion | meter scoped to tableNameWithType + taskType | 
`pinot.minion.myTable_REALTIME.SegmentGenerationAndPush.segmentUploadFailure` |
   | Minion | meter scoped to table/id | 
`pinot.minion.myTable.numberOfSegmentsQueued` |
   
   ## Test plan
   
   - [ ] `mvn -pl pinot-common test -Dtest=PrometheusTemplateRegexpTest` passes 
locally
   - [ ] Parameterized test covers all 5 YAML files
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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