kgyrtkirk commented on code in PR #17744:
URL: https://github.com/apache/druid/pull/17744#discussion_r1969364246


##########
sql/src/main/java/org/apache/druid/sql/SqlExecutionReporter.java:
##########
@@ -101,14 +101,18 @@ public void emit()
         // Note: the dimension is "dataSource" (sic), so we log only the SQL 
resource
         // actions. Even here, for external tables, those actions are not 
always
         // datasources.
-        metricBuilder.setDimension(
-            "dataSource",
-            stmt.authResult.sqlResourceActions
-                            .stream()
-                            .map(action -> action.getResource().getName())
-                            .collect(Collectors.toList())
-                            .toString()
-        );
+        String dataSourcesResourceNames = stmt.authResult.sqlResourceActions
+                .stream()
+                .map(action -> action.getResource().getName())
+                .collect(Collectors.toList())
+                .toString();

Review Comment:
   I was looking into this a bit; it seems odd to remove the `[` with string 
operations;
   actually there is a `setDimension` method which may accept a `List`
   
   I wonder if it would be a better fix be to remove this `toString()` here and 
fix the `PrometheusEmitter` to alter the serialization of `List` -s to do 
adjustments there?



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