abhishekrb19 commented on code in PR #14935:
URL: https://github.com/apache/druid/pull/14935#discussion_r1319365940


##########
extensions-contrib/prometheus-emitter/src/main/java/org/apache/druid/emitter/prometheus/PrometheusEmitter.java:
##########
@@ -207,6 +207,15 @@ public void close()
     } else {
       exec.shutdownNow();
       flush();
+
+      if (pushGateway != null && config.isDeleteOnShutdown()) {
+        try {
+          pushGateway.delete(config.getNamespace(), 
ImmutableMap.of(config.getNamespace(), identifier));

Review Comment:
   @BartMiki - thanks for the explanation. Digging up some more, it seems like 
the pushgateway community considers this usecase an 
[anti-pattern](https://github.com/prometheus/pushgateway/tree/master#non-goals).
 Also, from their 
[mailing](https://groups.google.com/g/prometheus-developers/c/9IyUxRvhY7w) 
thread, it appears that different folks have implemented their custom TTL 
expiration strategies. So I'm wondering if any of the available open source 
tools/solutions from the thread will solve the staleness problem - instead of 
implementing a TTL-based strategy that is generally discouraged by the 
prometheus pushgateway community? @kfaraz, do you've any thoughts here?



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