janhoy commented on code in PR #4209:
URL: https://github.com/apache/solr/pull/4209#discussion_r2945149367


##########
solr/core/src/java/org/apache/solr/metrics/OtelRuntimeJvmMetrics.java:
##########
@@ -65,6 +75,38 @@ public ContextPropagators getPropagators() {
             // TODO: We should have this configurable to enable/disable 
specific JVM metrics
             .enableAllFeatures()
             .build();
+    java.lang.management.OperatingSystemMXBean osMxBean =
+        ManagementFactory.getOperatingSystemMXBean();
+    if (osMxBean instanceof com.sun.management.OperatingSystemMXBean 
extOsMxBean) {
+      systemMemoryTotalGauge =
+          solrMetricManager.observableLongGauge(
+              registryName,
+              "jvm.system.memory",

Review Comment:
   I'd rather comply with OTEL standards than with prometheus conventions since 
I see a clear trend in pushing metrics to other systems than prometheus.
   
   Note: I tried in another system to push dot separated metric names directly 
into prometheus, and while it worked, it is not pleasant to work with in 
prometheus/grafana, as you often need to escape things all the time, e.g. write 
`{"foo.bar.baz"}` rather than just `foo_bar_baz` 



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