mlbiscoc commented on code in PR #4917:
URL: https://github.com/apache/solr/pull/4917#discussion_r4037500143
##########
solr/core/src/java/org/apache/solr/metrics/SolrMetricsContext.java:
##########
@@ -160,65 +160,67 @@ public DoubleGauge doubleGauge(String metricName, String
description, OtelUnit u
public ObservableLongGauge observableLongGauge(
String metricName, String description,
Consumer<ObservableLongMeasurement> callback) {
- var observableLongGauge = observableLongGauge(metricName, description,
callback, null);
- closeables.add(observableLongGauge);
- return observableLongGauge;
+ return observableLongGauge(metricName, description, callback, null);
}
public ObservableLongGauge observableLongGauge(
String metricName,
String description,
Consumer<ObservableLongMeasurement> callback,
OtelUnit unit) {
- return metricManager.observableLongGauge(registryName, metricName,
description, callback, unit);
+ var observableLongGauge =
+ metricManager.observableLongGauge(registryName, metricName,
description, callback, unit);
+ closeables.add(observableLongGauge);
+ return observableLongGauge;
Review Comment:
Created https://issues.apache.org/jira/browse/SOLR-18456
--
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]