You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/10/12 03:18:29 UTC

[GitHub] [pinot] jackjlli commented on a change in pull request #7551: Adding config for metrics library

jackjlli commented on a change in pull request #7551:
URL: https://github.com/apache/pinot/pull/7551#discussion_r726727827



##########
File path: pinot-common/src/main/java/org/apache/pinot/common/metrics/PinotMetricUtils.java
##########
@@ -54,35 +57,49 @@ private PinotMetricUtils() {
 
   private static PinotMetricsFactory _pinotMetricsFactory = null;
 
-  public static void init(PinotConfiguration metricsConfiguration) {
+  public static void init(PinotConfiguration metricsConfiguration, @Nullable String metricsFactoryClassName) {
     // Initializes PinotMetricsFactory.
-    initializePinotMetricsFactory(metricsConfiguration);
+    initializePinotMetricsFactory(metricsConfiguration, metricsFactoryClassName);
 
     // Initializes metrics using the metrics configuration.
     initializeMetrics(metricsConfiguration);
     registerMetricsRegistry(getPinotMetricsRegistry());
   }
 
+  public static void init(PinotConfiguration metricsConfiguration) {
+    init(metricsConfiguration, null);
+  }
+
   /**
    * Initializes PinotMetricsFactory with metrics configurations.
    * @param metricsConfiguration The subset of the configuration containing the metrics-related keys
+   * @param configuredMetricsFactoryClassName The configuration value for the desired metrics factory class. Will
+   *                                          default to Yammer if not provided.
    */
-  private static void initializePinotMetricsFactory(PinotConfiguration metricsConfiguration) {
+  private static void initializePinotMetricsFactory(PinotConfiguration metricsConfiguration,

Review comment:
       +1 on that. If there is such config specified from metricsConfiguration, then use the default one.




-- 
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: commits-unsubscribe@pinot.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org