shodaaan commented on code in PR #2216:
URL: https://github.com/apache/jackrabbit-oak/pull/2216#discussion_r2057758621


##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/FullGCStatsCollectorImpl.java:
##########
@@ -83,9 +84,15 @@ class FullGCStatsCollectorImpl implements 
FullGCStatsCollector {
 
     private final CounterStats counter;
     private final CounterStats failureCounter;
+    private static String METRICS_QUALIFIED_NAME_PREFIX;
 
     FullGCStatsCollectorImpl(StatisticsProvider provider) {
+        this(provider, false);
+    }
+
+    FullGCStatsCollectorImpl(StatisticsProvider provider, boolean pushMetrics) 
{
         this.provider = provider;
+        this.METRICS_QUALIFIED_NAME_PREFIX = pushMetrics ? 
FULL_GC_PUSH_METRICS_PREFIX : FULL_GC;

Review Comment:
   When fullGC runs inside the Author process, and metrics from 
VersionGarbageCollector are pulled by Prometheus, the "oak_" prefix is added to 
all of the metrics automatically.
   When running VersionGarbageCollector from oak-run, in which case the metrics 
are pushed to pushgateway, this prefix needs to be added manually.
   That is the reason for this change. 



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to