You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/09/08 05:55:55 UTC

[GitHub] [druid] kfaraz commented on a diff in pull request #13034: prometheus-emitter supports sending metrics to pushgateway regularly …

kfaraz commented on code in PR #13034:
URL: https://github.com/apache/druid/pull/13034#discussion_r965515787


##########
extensions-contrib/prometheus-emitter/src/main/java/org/apache/druid/emitter/prometheus/PrometheusEmitter.java:
##########
@@ -91,6 +95,13 @@ public void start()
       } else {
         pushGateway = new PushGateway(address);
       }
+      exec = ScheduledExecutors.fixed(1, "PrometheusPushGatewayEmitter-%s");

Review Comment:
   The executor should also be shutdown, maybe in `close`?



##########
docs/development/extensions-contrib/prometheus.md:
##########
@@ -43,7 +43,7 @@ All the configuration parameters for the Prometheus emitter are under `druid.emi
 |`druid.emitter.prometheus.addHostAsLabel`|Flag to include the hostname as a prometheus label.|no|false|
 |`druid.emitter.prometheus.addServiceAsLabel`|Flag to include the druid service name (e.g. `druid/broker`, `druid/coordinator`, etc.) as a prometheus label.|no|false|
 |`druid.emitter.prometheus.pushGatewayAddress`|Pushgateway address. Required if using Pushgateway strategy|no|none|
-
+|`druid.emitter.prometheus.flushPeriod`|Emit metrics to Pushgateway every `flushPeriod` seconds. Required if `pushgateway` strategy is used.|no|15|

Review Comment:
   Also, the default value used by HttpEmitter is 60 seconds.



##########
docs/development/extensions-contrib/prometheus.md:
##########
@@ -43,7 +43,7 @@ All the configuration parameters for the Prometheus emitter are under `druid.emi
 |`druid.emitter.prometheus.addHostAsLabel`|Flag to include the hostname as a prometheus label.|no|false|
 |`druid.emitter.prometheus.addServiceAsLabel`|Flag to include the druid service name (e.g. `druid/broker`, `druid/coordinator`, etc.) as a prometheus label.|no|false|
 |`druid.emitter.prometheus.pushGatewayAddress`|Pushgateway address. Required if using Pushgateway strategy|no|none|
-
+|`druid.emitter.prometheus.flushPeriod`|Emit metrics to Pushgateway every `flushPeriod` seconds. Required if `pushgateway` strategy is used.|no|15|

Review Comment:
   Maybe use `flushMillis` instead as http emitter seems to be using, so that there is no ambiguity of the unit.



-- 
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@druid.apache.org

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


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