mlbiscoc commented on code in PR #4209:
URL: https://github.com/apache/solr/pull/4209#discussion_r2942216223
##########
solr/core/src/java/org/apache/solr/metrics/OtelRuntimeJvmMetrics.java:
##########
@@ -17,27 +17,39 @@
package org.apache.solr.metrics;
import io.opentelemetry.api.OpenTelemetry;
+import io.opentelemetry.api.common.AttributeKey;
+import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.api.metrics.MeterProvider;
+import io.opentelemetry.api.metrics.ObservableLongGauge;
import io.opentelemetry.api.trace.TracerProvider;
import io.opentelemetry.context.propagation.ContextPropagators;
import io.opentelemetry.instrumentation.runtimemetrics.java17.RuntimeMetrics;
import java.lang.invoke.MethodHandles;
+import java.lang.management.ManagementFactory;
+import org.apache.lucene.util.SuppressForbidden;
import org.apache.solr.common.util.EnvUtils;
+import org.apache.solr.metrics.otel.OtelUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** Manages JVM metrics collection using OpenTelemetry Runtime Metrics with
JFR features */
public class OtelRuntimeJvmMetrics {
private static final Logger log =
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+ private static final AttributeKey<String> STATE_KEY =
AttributeKey.stringKey("state");
Review Comment:
I could image something as generic as `state` being used again. How about
moving this to `SolrMetricProducer`? Feel free to ignore if you disagree. Don't
feel strongly about it.
--
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]