KevinZTW opened a new pull request, #15473:
URL: https://github.com/apache/kafka/pull/15473

   Jira ticket: https://issues.apache.org/jira/browse/KAFKA-16252
   
   ### Background & Modification
   Currently, there are few document files generated automatically like the 
task `genConnectMetricsDocs` 
   However, the unwanted log information also added into it. 
   And the format is not aligned with other which has Mbean located of the 
third column.
   
   I modified the code logic so the format could follow other section in 
`ops.html`
   Also close the log since we take everything from the std as a documentation
   
   ### Testing Strategy
   Regen the docs and compare the format
   
   #### origin generated file 
   Top few lines from `connect_metrics.html` after executed the `./gradlew 
genConnectMetricsDocs`
   ```html
   [2024-03-05 18:11:45,945] INFO Metrics scheduler closed 
(org.apache.kafka.common.metrics.Metrics:694)  
   [2024-03-05 18:11:45,948] INFO Metrics reporters closed 
(org.apache.kafka.common.metrics.Metrics:704)  
   <table class="data-table"><tbody>  
   <tr>  
   <td colspan=3 class="mbeanName" style="background-color:#ccc; font-weight: 
bold;">kafka.connect:type=connect-worker-metrics</td></tr>  
   <tr>  
   <th style="width: 90px"></th>  
   <th>Attribute name</th>  
   <th>Description</th>  
   </tr>
   <tr>  
   <td></td><td>connector-count</td><td>The number of connectors run in this 
worker.</td></tr>  
   <tr>  
   <td></td><td>connector-startup-attempts-total</td><td>The total number of 
connector startups that this worker has attempted.</td></tr>  
   <tr>  
   <td></td><td>connector-startup-failure-percentage</td><td>The average 
percentage of this worker's connectors starts that failed.</td></tr>  
   <tr>  
   <td></td><td>connector-startup-failure-total</td><td>The total number of 
connector starts that failed.</td></tr>  
   ```
   
![image](https://github.com/apache/kafka/assets/38662781/2d0cac92-102e-45aa-81e3-7138aed509a9)
   
   #### fixed generated file 
   ```html
   <table class="data-table">
   <tbody>
   <tr>
   <th>Metric/Attribute name</th>
   <th>Description</th>
   <th>Mbean name</th>
   </tr>
   <tr>
   <td>connector-count</td>
   <td>The number of connectors run in this worker.</td>
   <td>kafka.connect:type=connect-worker-metrics</td>
   </tr>
   <tr>
   <td>connector-startup-attempts-total</td>
   <td>The total number of connector startups that this worker has 
attempted.</td>
   <td>kafka.connect:type=connect-worker-metrics</td>
   </tr>
   ```
   
![image](https://github.com/apache/kafka/assets/38662781/4e48d660-86e1-4706-a91d-a5d0c3bcdb37)
   
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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