ashwintumma23 opened a new issue, #17743:
URL: https://github.com/apache/druid/issues/17743

   ### Affected Version
   31.0.0
   28.0.1
   
   * Tested on these two versions, but the issue will be present on all 
supported versions
   
   ### Description
   * This issue is very similar to 
https://github.com/apache/druid/issues/17648; and was identified while 
debugging the parent issue. Credits to @sixtus for identifying the parent 
issue.  
   * Metrics reported via `SQLExecutionReporter` contain heading `[` and 
trailing `]` characters for `dataSource` dimension; which causes inconsistency 
in reporting `dataSource` names throughout all the metrics
   * Identified the issue in the following emitters; and will be able to be 
reproduce on other emitters as well
     * Prometheus Emitter
     
   
![Image](https://github.com/user-attachments/assets/8ef501a1-77b0-4723-a336-01c740954c09)
   
     * Kafka Emitter
   
   
![Image](https://github.com/user-attachments/assets/04609c5c-c6a1-44f0-9971-e0f4685a1979)
     
   
     * Logging Emitter 
   
   
![Image](https://github.com/user-attachments/assets/b4220bb4-4636-4d39-901d-35a0b82c3d18)
    
   
   #### Root Cause
   * We can see that in the following piece of code in 
[SQLExecutionReporter](https://github.com/apache/druid/blob/master/sql/src/main/java/org/apache/druid/sql/SqlExecutionReporter.java#L105),
 a List is being converted to String; which causes the `[` and ']' to be added 
to the `dataSource` label
   ```
           String dataSourcesResourceNames = stmt.authResult.sqlResourceActions
                   .stream()
                   .map(action -> action.getResource().getName())
                   .collect(Collectors.toList())
                   .toString();
   ```
   


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