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


##########
solr/core/src/java/org/apache/solr/metrics/SolrCoreMetricManager.java:
##########
@@ -135,8 +144,19 @@ public void registerMetricProducer(String scope, 
SolrMetricProducer producer) {
               + ", producer = "
               + producer);
     }
+
+    // NOCOMMIT SOLR-17458: These attributes may not work for standalone mode
     // use deprecated method for back-compat, remove in 9.0
-    producer.initializeMetrics(solrMetricsContext, scope);
+    producer.initializeMetrics(
+        solrMetricsContext,
+        Attributes.builder()
+            .put(CORE_ATTR, core.getCoreDescriptor().getName())
+            .put(COLLECTION_ATTR, collectionName)
+            .put(SHARD_ATTR, shardName)
+            .put(REPLICA_ATTR, replicaName)
+            .put((scope.startsWith("/")) ? HANDLER_ATTR : SCOPE_ATTR, scope)
+            .build(),
+        scope);

Review Comment:
   > Can you point me where you augment the base attributes with more so I can 
see what this looks like?
   
   @dsmiley Here is where I initialize the base attributes for 
`requestHandlerBase` that was instrumented.



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