mlbiscoc commented on code in PR #3665:
URL: https://github.com/apache/solr/pull/3665#discussion_r2370239919


##########
solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java:
##########
@@ -261,39 +260,70 @@ public void setFormatter(AuditEventFormatter formatter) {
     this.formatter = formatter;
   }
 
-  // TODO SOLR-17458: Migrate to Otel
   @Override
   public void initializeMetrics(
       SolrMetricsContext parentContext, Attributes attributes, final String 
scope) {
     solrMetricsContext = parentContext.getChildContext(this);
     String className = this.getClass().getSimpleName();
     log.debug("Initializing metrics for {}", className);
-    numErrors = solrMetricsContext.meter("errors", getCategory().toString(), 
scope, className);
-    numLost = solrMetricsContext.meter("lost", getCategory().toString(), 
scope, className);
-    numLogged = solrMetricsContext.meter("count", getCategory().toString(), 
scope, className);
+
+    Attributes attrsWithCategory =
+        Attributes.builder()
+            .putAll(attributes)
+            .put(CATEGORY_ATTR, Category.SECURITY.toString())

Review Comment:
   It is mostly just a description. It isn't really necessary from an 
aggregation standpoint and no one would probably use in their dashboards but I 
kept it because of the UI PR that categorized metrics by the category label.
   
   But also I actually found it useful from a filtering standpoint to just 
seeing what metrics are available around certain categories. For example, just 
want to see all cache metrics? You can just filter by the category label or 
grep on it. I'm also thinking we can remove it later if need be.



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