From commits-return-16987-archive-asf-public=cust-asf.ponee.io@pulsar.apache.org Sat Nov 3 07:54:23 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id BB61E180677 for ; Sat, 3 Nov 2018 07:54:22 +0100 (CET) Received: (qmail 13970 invoked by uid 500); 3 Nov 2018 06:54:21 -0000 Mailing-List: contact commits-help@pulsar.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pulsar.apache.org Delivered-To: mailing list commits@pulsar.apache.org Received: (qmail 13954 invoked by uid 99); 3 Nov 2018 06:54:21 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Nov 2018 06:54:21 +0000 From: GitBox To: commits@pulsar.apache.org Subject: [GitHub] merlimat commented on a change in pull request #2914: Beginging to refactor function metrics to use prometheus Message-ID: <154122806087.6786.9472110155192077022.gitbox@gitbox.apache.org> Date: Sat, 03 Nov 2018 06:54:20 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit merlimat commented on a change in pull request #2914: Beginging to refactor function metrics to use prometheus URL: https://github.com/apache/pulsar/pull/2914#discussion_r230546982 ########## File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/JavaInstanceMain.java ########## @@ -186,6 +188,10 @@ public void run() { } } }); + + // registering jvm metrics to prometheus + DefaultExports.initialize(); Review comment: This we need to be careful if we're running in thread mode, since it will register multiple times and throw exception. I'd avoid this for thread-based (or process based for that matter) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services